/**
* @class Titanium.Proxy
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Proxy.yml
* <p>The base for all Titanium objects.</p>
* @description <p>On platforms that use native code (Android and iOS), the <code>Proxy</code> type represents a
JavaScript wrapper or <em>proxy</em> around a native object. Setting or getting a property
on a proxy object results in a method invokation on the native object. Likewise,
calling a method on the proxy object results in a method invokation on the native
object.</p>
<p>In Mobile Web, there is no true <code>Proxy</code> type -- all Titanium objects are ordinary JavaScript
objects.</p>
<p>Some Titanium objects are <em>createable</em>: new instances of these objects can be created using
factory methods. For example, a {@link Titanium.UI.Window Window} object can be created using the
{@link Titanium.UI#method-createWindow} method.</p>
<p>In general, developers should avoid modifying the prototype of a Titanium object, or
adding methods to a Titanium object. (Adding a simple property such as an ID value is
generally OK.)</p>
*/
/**
* @method addEventListener
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method fireEvent
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getApiName
* <p>Gets the value of the {@link Titanium.Proxy#property-apiName} property.</p>
* @returns {String}
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform mobileweb 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @method getBubbleParent
* <p>Gets the value of the {@link Titanium.Proxy#property-bubbleParent} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setBubbleParent
* <p>Sets the value of the {@link Titanium.Proxy#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getLifecycleContainer
* <p>Gets the value of the {@link Titanium.Proxy#property-lifecycleContainer} property.</p>
* @returns {Titanium.UI.Window/Titanium.UI.TabGroup}
* @platform android 3.6.0
* @platform windowsphone 4.1.0
*/
/**
* @method setLifecycleContainer
* <p>Sets the value of the {@link Titanium.Proxy#property-lifecycleContainer} property.</p>
* @param {Titanium.UI.Window/Titanium.UI.TabGroup} lifecycleContainer
<p>New value for the property.</p>
* @platform android 3.6.0
* @platform windowsphone 4.1.0
*/
/**
* @property apiName
* @type String
* @readonly
* <p>The name of the API that this proxy corresponds to.</p>
* @description <p>The value of this property is the fully qualified name of the API. For example, {@link Titanium.UI.Button Button}
returns <code>Ti.UI.Button</code>.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform mobileweb 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property [bubbleParent=true]
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property lifecycleContainer
* @type Titanium.UI.Window/Titanium.UI.TabGroup
* <p>The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.</p>
* @description <p>If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks
will also be called on the proxy. Proxies that require the activity lifecycle will need this property set
to the appropriate containing Window or TabGroup.</p>
* @platform android 3.6.0
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.Module
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Module.yml
* <p>Base type for all Titanium modules.</p>
* @description <p>A Titanium module is a non-createable Titanium object that is exposed through the
global Titanium object.</p>
<p>For example, the {@link Titanium.UI} module provides constants and factory methods related
to UI objects, as well as a few UI-related properties that are not related to a
specific object.</p>
*/
/**
* @class Titanium.UI.View
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/View.yml
* <p>An empty drawing surface or container</p>
* @description <p>The <code>View</code> is the base type for all UI widgets in Titanium.</p>
<p>You use the {@link Titanium.UI#method-createView} method or <strong><code><View></code></strong> Alloy element to create a View.</p>
<h4>Units and Coordinates</h4>
<p>Sizes and coordinates can be specified using a variety of units. If a value is
specified as a number, it is interpreted as a value in the default unit for the
current system and/or the current project.</p>
<p>When a value is specified as string, the value can consist of:</p>
<ul>
<li>A number.</li>
<li>A percentage, such as "10%", interpreted as a percentage of the parent's total size
in that dimension.</li>
<li>A number plus a unit specifier, such as "10px" or "1in". </li>
</ul>
<p>The following units are supported:</p>
<table class="doc-table" width="60%">
<tr>
<th>Unit</th>
<th>Specifier</th>
<th>Note</th>
</tr>
<tr>
<td>pixels</td>
<td>px</td>
<td></td>
</tr>
<tr>
<td>density-independent pixels</td>
<td>dip</td>
<td>Equivalent to Apple "points."</td>
</tr>
<tr>
<td>inches</td>
<td>in</td>
<td></td>
</tr>
<tr>
<td>millimeters</td>
<td>mm</td>
<td>Android, iOS only</td>
</tr>
<tr>
<td>centimeters</td>
<td>cm</td>
<td>Android, iOS only</td>
</tr>
<tr>
<td>points</td>
<td>pt</td>
<td>Typographical points of 1/72 of an inch. On Android, you can specify sizes and coordinates in typographical points. On other platforms, this unit is only used to specify font sizes. Not to be confused with Apple "points."</td>
</tr>
</table>
<p>The interpretation of the density-independent pixel (DIP) varies by platform:</p>
<ul>
<li><p>On Android, one DIP corresponds to one pixel on a 160DPI
display.</p></li>
<li><p>On iOS, one DIP corresponds to one pixel on a non-Retina display, which
is 163DPI for iPhone/iPod touch and 132DPI for the iPad. A DIP
corresponds to 2 pixels of width or height on a Retina display.</p></li>
<li><p>On Mobile Web, both DIP and pixel are equal to one browser pixel, which may
not correspond to a pixel on the display. From testing, most browsers seem to
report a DPI value of 96DPI, regardless of the actual display density.</p></li>
</ul>
<p>The absolute measures, such as inches, are dependent on the device correctly reporting
its density. On Mobile Web, in particular, these values are unlikely to be exact.</p>
<p>If no units are specified, a system-default unit is assumed. The system default unit is:</p>
<ul>
<li>Pixels on Android.</li>
<li>DIPs on iOS.</li>
<li>DIPs on Mobile Web (as described above, DIPs and pixels are interchangable on
Mobile Web).</li>
</ul>
<p>On Android and iOS, the default unit can be overriden on a per-application level by setting the
<code>ti.ui.defaultunit</code> property in <code>tiapp.xml</code>. For example, to use DIPs as the
default on all platforms, set <code>defaultunit</code> to <code>dip</code>:</p>
<pre><code><property name="ti.ui.defaultunit" type="string">dip</property>
</code></pre>
<p>(This property is not supported on Mobile Web.)</p>
<p>The value for <code>ti.ui.defaultunit</code> can be any of the unit specifiers defined above, or
<code>system</code> to specify that the platform's default unit should be used.</p>
<p>Note that prior to Release 2.0, iOS ignored any specified unit, so code that specifies
a unit may operate differently on iOS in Release 2.0. If you set the
<code>ti.ui.defaultunit</code> property to anything other than <code>system</code> or <code>dip</code>, your
application should detect and handle Retina displays manually.</p>
<p>Font sizes on iOS are treated differently than other sizes: font sizes are always
specified in typographical points. </p>
<p>For more details see: </p>
<ul>
<li><a href="http://docs.appcelerator.com/platform/latest/!/guide/UI_Composite_Layout_Behavior_Spec">UI Composite Layout Spec</a></li>
</ul>
<h4>Size and Position</h4>
<p>Titanium views are positioned using the <code>left</code>, <code>right</code>, <code>top,</code> <code>bottom</code> and <code>center</code>
properties, and sized using the <code>width</code> and <code>height</code> properties. These are
input properties, set by the user to specify layout, and not modified by the
system to indicate actual calculated positions and sizes. </p>
<p>The {@link Titanium.UI.View#property-height height} and {@link Titanium.UI.View#property-width width} properties
accept several special values:</p>
<ul>
<li>{@link Titanium.UI#property-FILL} specifies that the view should fill the parent in this
dimension.</li>
<li>{@link Titanium.UI#property-SIZE} specifies that the view should adjust this size to fit its
contents, such as a label's text or a view's children.</li>
<li><p>'auto' specifies that the view should choose either <code>FILL</code> or <code>SIZE</code> behavior.
In 2.0, the behavior of the 'auto' value is specified by the UI Composite Layout
Spec. This value is not recommended for new development and will be deprecated in
the future.</p>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p></li>
</ul>
<p>Sizes and positions can also be specified as a percentage of the parent's size, for
example, '50%'.</p>
<p>How these properties are interpreted depends on the value of the view's <code>layout</code>
property. See the description of the {@link Titanium.UI.View#property-layout layout} property
for details.</p>
<p>The {@link Titanium.UI.View#property-rect rect} property is a read-only dictionary
with the properties <code>x</code>, <code>y</code>, <code>width</code> and <code>height</code>. It provides the <em>rendered</em>
size and position of the view, and is only available once both it and its ancestors have been
fully drawn.</p>
<p>The {@link Titanium.UI.View#property-size size} property is a read-only dictionary
with the properties <code>x</code>, <code>y</code>, <code>width</code> and <code>height</code>. It provides the <em>rendered</em> size
of the view, and is only available once both it and its ancestors have been
fully drawn. </p>
<p>To determine whether the <code>size</code> and <code>rect</code> values are available, add an event listener
for the {@link Titanium.UI.View#event-postlayout postlayout} event, which is fired at the end of
a layout cycle.</p>
<h4>Accessibility</h4>
<p>Four accessibility-related view properties became available in Titanium Mobile 3.0.0 for iOS
and Android:</p>
<ul>
<li>{@link Titanium.UI.View#property-accessibilityLabel}</li>
<li>{@link Titanium.UI.View#property-accessibilityValue}</li>
<li>{@link Titanium.UI.View#property-accessibilityHint}</li>
<li>{@link Titanium.UI.View#property-accessibilityHidden}</li>
</ul>
<p>The first three, <code>accessibilityLabel</code>, <code>accessibilityValue</code> and <code>accessibilityHint</code>, are for setting text
that will be relayed to the user by the assistive service (such as TalkBack on Android or VoiceOver
on iOS). On iOS, Titanium will then take these values and set the native properties
of the same name which are defined in the <a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibilityProtocol</a>.
On Android, Titanium takes the three values and concatenates them in the order <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, and <code>accessibilityHint</code>, and then uses the result to set the native view's
<a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29"><code>contentDescription</code></a>
property.</p>
<p>You are not required to set all three properties: feel free to set just one or two as needed and
experiment with the results by turning on VoiceOver (iOS) or TalkBack (Android) on your test device.</p>
<p>The fourth property, <code>accessibilityHidden</code>, when set to <code>true</code>, indicates that the view can be ignored
by the assistive service. In iOS this sets the similarly-named
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html#//apple_ref/occ/instp/NSObject/accessibilityElementsHidden">accessibilityElementsHidden</a>
native property, which is only available in iOS 5.0 and later. On earlier versions of
iOS, this property is ignored.</p>
<p>In Android <code>accessibilityHidden</code> calls the native <a href="http://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29">View.setImportantForAccessibility(boolean)</a> method, passing <code>false</code> when
this property is set to <code>true</code> (i.e., "hidden" means it's not important). However, the
native <code>setImportantForAccessibility</code> method is available only on devices running
Android 4.1 (API level 16/Jelly Bean) or later. On earlier versions of Android, this
property is ignored.</p>
<p>No error will occur on older devices if you set <code>accessibilityHidden</code>; the value will simply be ignored. </p>
<h4>iOS: backgroundLeftCap and backgroundTopCap properties</h4>
<p>The {@link Titanium.UI.View#property-backgroundLeftCap backgroundLeftCap} and {@link Titanium.UI.View#property-backgroundTopCap backgroundTopCap} properties are
used to specify the portions of the {@link Titanium.UI.View#property-backgroundImage backgroundImage} that must not be resized when the image is streched or shrunk.</p>
<p>Given an image of width <code>w</code> and height <code>h</code>, the stretchable portion on the image is defined as a rectangle with the <code>top-left</code> point set to
<code>(backgroundLeftCap , backgroundTopCap)</code> and the <code>bottom-right</code> point set to <code>(w - backgroundLeftCap , h - backgroundTopCap)</code>. The portions not covered by
the stretchable portion keep their original size and appearance.</p>
<p>The behavior of these properties on {@link Titanium.UI.ImageView ImageView} is slightly different and depends on the iOS version on the device.</p>
<ul>
<li>For iOS 6.x and above, the behavior is as described above.</li>
<li>For iOS 5.x the computed rectangle is tiled and not streched in the stretchable portion.</li>
<li>For iOS 4.x the strechable portion is always a 1x1 region that is tiled repeatedly.</li>
</ul>
<p>For best results on ImageView set up the <code>backgroundLeftCap</code> and <code>backgroundTopCap</code> properties such that the stretchable portion is always a 1x1 box.</p>
<h4>iOS Clipping Behavior</h4>
<p>Four new view related properties became available in Titanium Mobile 3.3.0 for iOS.</p>
<ul>
<li>{@link Titanium.UI.View#property-viewShadowRadius}</li>
<li>{@link Titanium.UI.View#property-viewShadowColor}</li>
<li>{@link Titanium.UI.View#property-viewShadowOffset}</li>
<li>{@link Titanium.UI.View#property-clipMode}</li>
</ul>
<p>The first three, <code>viewShadowColor</code>, <code>viewShadowRadius</code> and <code>viewShadowOffset</code> control the shadow associated with the view.
The shadow of the view is drawn using a rounded rectangle with the arc radius set to the <code>borderRadius</code> property.</p>
<p>The <code>clipMode</code> property lets the user control the clipping behavior of the View.
Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_ENABLED} enforces all child views to be clipped to this views bounds.
Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_DISABLED} allows child views to be drawn outside the bounds of this view.
When set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT} or when this property is not set, clipping behavior is defined by the following rules applied in order.</p>
<ul>
<li>If the <code>viewShadowColor</code> is defined to be a color with alpha > 0, clipping is disabled.</li>
<li>If the <code>borderWidth</code> or <code>borderRadius</code> of the view is set to a value > 0, clipping is enabled.</li>
<li>If the view has one or more <code>children</code> clipping is enabled.</li>
<li>If none of the conditions are met, clipping is disabled.</li>
</ul>
<p>In earlier versions of Titanium Mobile, views had clipping enabled by default.</p>
* <h3>Examples</h3>
<h4>Round View Example</h4>
<p>Create a rounded view.</p>
<pre><code>var view = Titanium.UI.createView({
borderRadius:10,
backgroundColor:'red',
width:50,
height:50
});
window.add(view);
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<pre><code><Alloy>
<View id="view" borderRadius="10" backgroundColor="red" width="50" height="50" />
</Alloy>
</code></pre>
*/
/**
* @event longclick
* <p>Fired when the device detects a long click.</p>
* @description <p>A long click is generated by touching and holding on the touchscreen or holding down the
trackball button. </p>
<p>The event occurs before the finger/button is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>As the trackball can fire this event, it is not intended to return the <code>x</code> and <code>y</code>
coordinates of the touch, even when it is generated by the touchscreen. </p>
<p>A <code>longclick</code> blocks a <code>click</code>, meaning that a <code>click</code> event will not fire when a
<code>longclick</code> listener exists.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event pinch
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event swipe
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event twofingertap
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchmove
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchstart
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchcancel
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchend
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event click
* <p>Fired when the device detects a click against the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event dblclick
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event singletap
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event doubletap
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event longpress
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event focus
* <p>Fired when the view element gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event postlayout
* <p>Fired when a layout cycle is finished.</p>
* @description <p>This event is fired when the view and its ancestors have been laid out.
The {@link Titanium.UI.View#property-rect rect} and {@link Titanium.UI.View#property-size size} values
should be usable when this event is fired.</p>
<p>This event is typically triggered by either changing layout
properties or by changing the orientation of the device. Note that changing the
layout of child views or ancestors can also trigger a relayout of this view.
On Mobile Web, this event can also be triggered by resizing the browser window.</p>
<p>Note that altering any properties that affect layout from the <code>postlayout</code> callback
may result in an endless loop.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @event keypressed
* <p>Fired when a hardware key is pressed in the view.</p>
* @description <p>A keypressed event is generated by pressing a hardware key. On Android, this event can only be
fired when the property {@link Titanium.UI.View#property-focusable focusable} is set to true. On iOS the
event is generated only when using {@link Titanium.UI.TextArea Ti.UI.TextArea}, {@link Titanium.UI.TextField Ti.UI.TextField}
and {@link Titanium.UI.SearchBar Ti.UI.SearchBar}.</p>
* @param {Number} keyCode
<p>The code for the physical key that was pressed. For more details, see <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a>. This API is experimental and subject to change.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method finishLayout
* <p>Finishes a batch update of the View's layout properties and schedules a layout pass of the
view tree.</p>
* @deprecated 3.0.0 Use the <Titanium.Proxy.applyProperties> method to batch-update layout properties.
* @description <p>Since the layout pass scheduled is asynchronous, the {@link Titanium.UI.View#property-rect rect}
and {@link Titanium.UI.View#property-size size} values may not be available immediately after
<code>finishLayout</code> is called. </p>
<p>To be notified when the layout pass completes, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
<p>On Mobile Web, this method has no effect, but is included for parity.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @method startLayout
* <p>Starts a batch update of this view's layout properties.</p>
* @deprecated 3.0.0 Use the <Titanium.Proxy.applyProperties> method to batch-update layout properties.
* @description <p>To prevent a layout pass each time a property is modified, call <code>startLayout</code> before
changing any properties that may change this view's layout. This initiates a batch update
mode where layout changes are deferred.</p>
<p>Call {@link Titanium.UI.View#method-finishLayout finishLayout} to end batch update mode and trigger a
layout pass. For example:</p>
<pre><code>view.startLayout();
view.top = 50;
view.left = 50;
view.finishLayout();
</code></pre>
<p>Note that <em>any</em> property changes made during the batch update <em>may</em> be deferred until
<code>finishLayout</code> is called. This may vary somewhat by platform. For example, changing the
text of a label may trigger a layout pass. In iOS, updating the label text is
deferred, while on Mobile Web, the label text is updated immediately but the control is
not resized until <code>finishLayout</code> is called.</p>
<p>See also: {@link Titanium.UI.View#method-updateLayout updateLayout},
{@link Titanium.UI.View#method-finishLayout finishLayout},
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
<p>On Mobile Web, this method is included for parity only, and thus has no effect.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @method updateLayout
* <p>Performs a batch update of all supplied layout properties and schedules a layout pass after
they have been updated.</p>
* @deprecated 3.0.0 Use the <Titanium.Proxy.applyProperties> method to batch-update layout properties.
* @description <p>This is another way to perform a batch update. The <code>updateLayout</code> method is called with a
dictionary of layout properties to perform the batch update. For example:</p>
<pre><code>view.updateLayout({top:50, left:50});
</code></pre>
<p>This is equivalent to the following:</p>
<pre><code>view.startLayout();
view.top = 50;
view.left = 50;
view.finishLayout();
</code></pre>
<p>See also: {@link Titanium.UI.View#method-startLayout startLayout},
{@link Titanium.UI.View#method-finishLayout finishLayout},
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
<p>On Mobile Web, this method is included for parity only, and thus has no effect.</p>
* @param {Dictionary} params
<p>Layout properties to be updated.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @method animate
* <p>Animates this view.</p>
* @description <p>The {@link Titanium.UI.Animation Animation} object or dictionary passed to this method defines
the end state for the animation, the duration of the animation, and other properties.</p>
<p>Note that if you use <code>animate</code> to move a view, the view's actual <em>position</em> is changed, but
its layout properties, such as <code>top</code>, <code>left</code>, <code>center</code> and so on are not changed--these
reflect the original values set by the user, not the actual position of the view.</p>
<p>The {@link Titanium.UI.View#property-rect rect} property can be used to determine the actual size and
position of the view. Note that on Mobile Web, the <code>rect</code> property is not updated after
animation. This is a known issue <a href="https://jira.appcelerator.org/browse/TIMOB-8930">TIMOB-8930</a>.</p>
* @param {Titanium.UI.Animation/Dictionary<Titanium.UI.Animation>} animation
<p>Either a dictionary of animation properties or an
{@link Titanium.UI.Animation Animation} object.</p>
* @param {Callback<Object>} callback
<p>Function to be invoked upon completion of the animation.</p>
*/
/**
* @method remove
* <p>Removes a child view from this view's hierarchy.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
*/
/**
* @method removeAllChildren
* <p>Removes all child views from this view's hierarchy.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method toImage
* <p>Returns an image of the rendered view, as a Blob.</p>
* @description <p>The <code>honorScaleFactor</code> method is only supported on iOS.</p>
* @param {Callback<Titanium.Blob>} callback (optional)
<p>Function to be invoked upon completion. If non-null, this method will be performed
asynchronously. If null, it will be performed immediately.</p>
* @param {Boolean} honorScaleFactor (optional)
<p>Determines whether the image is scaled based on scale factor of main screen. (iOS only) </p>
<p>When set to true, image is scale factor is honored. When set to false, the image in the
blob has the same dimensions for retina and non-retina devices.</p>
* @returns {Titanium.Blob}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method convertPointToView
* <p>Translates a point from this view's coordinate system to another view's coordinate system.</p>
* @description <p>Returns <code>null</code> if either view is not in the view hierarchy. </p>
<p>Keep in mind that views may be removed from the view hierarchy if their window is blurred
or if the view is offscreen (such as in some situations with {@link Titanium.UI.ScrollableView}).</p>
<p>If this view is a {@link Titanium.UI.ScrollView}, the view's x and y offsets are subtracted from
the return value.</p>
* @param {Point} point
<p>A point in this view's coordinate system. </p>
<p>If this argument is missing an <code>x</code> or <code>y</code> property, or the properties can not be
converted into numbers, an exception will be raised.</p>
* @param {Titanium.UI.View} destinationView
<p>View that specifies the destination coordinate system to convert to. If this argument
is not a view, an exception will be raised.</p>
* @returns {Point}
* @platform android 1.8
* @platform iphone 1.8
* @platform ipad 1.8
* @platform mobileweb 2.0
* @platform windowsphone 4.1.0
*/
/**
* @method add
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>The child view is added as the last child in this view's hierarchy. </p>
<p>Although all views inherit from {@link Titanium.UI.View}, not all views are capable of
containing other views. In particular:</p>
<ul>
<li>Some views are not designed to be containers at all.</li>
<li>Some views are special-purpose containers that can only contain certain other
views.</li>
<li>Some views are top-level containers that cannot (or should not) be added to other views.</li>
</ul>
<h4>Non-Container Views</h4>
<p>The following views are not intended to act as containers that can hold other
views:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator ActivityIndicator}</li>
<li>{@link Titanium.UI.Button Button}</li>
<li>{@link Titanium.UI.ImageView ImageView}</li>
<li>{@link Titanium.UI.Label Label}</li>
<li>{@link Titanium.UI.ProgressBar ProgressBar}</li>
<li>{@link Titanium.UI.SearchBar SearchBar}</li>
<li>{@link Titanium.UI.Slider Slider}</li>
<li>{@link Titanium.UI.Switch Switch}</li>
<li>{@link Titanium.UI.TableView TableView}</li>
<li>{@link Titanium.UI.TextArea TextArea}</li>
<li>{@link Titanium.UI.TextField TextField}</li>
<li>{@link Titanium.UI.WebView WebView}</li>
</ul>
<p>Adding children to the these views <em>may</em> be supported on some platforms,
but is not guaranteed to work across platforms. Where it is supported, it may not
work as expected.</p>
<p>For maximum portability, these views should be treated as if they do not support children. <br>
Instead of adding children to these views, applications can positon other views as
siblings. For example, instead of adding a button as a child of a <code>WebView</code>, you can add
the button to the web view's parent such that it appears on top of the web view. </p>
<h4>Special-Purpose Containers</h4>
<p>A few view objects act as special-purpose containers--that is, they only manage
certain types of children, and many of them support a special means of adding
these children, instead of the general <code>add</code> method. These containers include:</p>
<ul>
<li><p>{@link Titanium.UI.ButtonBar ButtonBar} and {@link Titanium.UI.iOS.TabbedBar TabbedBar} are designed
to hold their own internally-created buttons, assigned by adding strings to the "labels" array.
Views added using the <code>add</code> method are displayed on top of these buttons.</p></li>
<li><p>{@link Titanium.UI.Picker Picker}. Can only hold <code>PickerRows</code> and <code>PickerColumns</code>, which
are added using the <code>add</code> method. Adding other types of views to a <code>Picker</code> is not
supported.</p></li>
<li><p>{@link Titanium.UI.TableView TableView} is a specialized container for
<code>TableViewSection</code> and <code>TableViewRow</code> objects. These objects must be
added using the properties and methods that <code>TableView</code> provides
for adding and removing sectons and rows.</p>
<p>On some platforms, it is possible to add arbitrary child views to a table view
using the <code>add</code> method. However, this is not guaranteed to work on all platforms,
and in general, should be avoided.</p></li>
<li><p>{@link Titanium.UI.TableViewSection TableViewSection} is a specialized container
for <code>TableViewRow</code> objects, which <em>are</em> added using the <code>add</code> method. The <code>add</code> method
on <code>TableViewSection</code> can only be used to add <code>TableViewRow</code> objects.</p></li>
<li><p>{@link Titanium.UI.iOS.Toolbar Toolbar} is designed to hold buttons and certain
other controls, added to its <code>items</code> array. Views added using the <code>add</code> method are
displayed on top of the controls in the <code>items</code> array.</p></li>
<li><p>The <code>Tab</code>, <code>TabGroup</code>, <code>NavigationGroup</code>, <code>NavigationWindow</code> and <code>SplitWindow</code> objects are
special containers that manage windows. These are discussed in the
"Top-Level Containers" section.</p></li>
</ul>
<h4>Top-Level Containers</h4>
<p>There are certain top-level containers that are not intended to be added
as the children of other views. These top-level containers include
{@link Titanium.UI.Window}, {@link Titanium.UI.iPad.SplitWindow}, {@link Titanium.UI.iOS.NavigationWindow},
and {@link Titanium.UI.TabGroup}. Other types of views must be added
to a top-level container in order to be displayed on screen.</p>
<p>The special containers {@link Titanium.UI.MobileWeb.NavigationGroup},
{@link Titanium.UI.iOS.NavigationWindow}, {@link Titanium.UI.iPad.SplitWindow},
{@link Titanium.UI.Tab}, and {@link Titanium.UI.TabGroup} manage windows.
These managed windows may be referred to as <em>children</em> of the
container, but they are not added using the <code>add</code> method.</p>
<p>Note that although a <code>NavigationGroup</code> manages windows, it is not itself a
top-level container. It must be added to a <code>Window</code> in order to be displayed.</p>
<p><code>Tab</code> is another kind of special container: it is not itself a top-level container,
but can only be used within a <code>TabGroup</code>. You cannot <code>add</code> a <code>Tab</code> to an arbitrary
container.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
*/
/**
* @method hide
* <p>Hides this view.</p>
* @param {AnimationOption} options (optional)
<p>Animation options for Android. <strong>Since Release 5.1.0.</strong></p>
*/
/**
* @method show
* <p>Makes this view visible.</p>
* @param {AnimationOption} options (optional)
<p>Animation options for Android. <strong>Since Release 5.1.0.</strong></p>
*/
/**
* @method insertAt
* <p>Inserts a view at the specified position in the {@link Titanium.UI.View#property-children children} array.</p>
* @description <p>Useful if the <code>layout</code> property is set to <code>horizontal</code> or <code>vertical</code>.</p>
* @param {Dictionary} params
<p>Pass an object with the following key-value pairs:</p>
<ul>
<li><code>view</code> (Titanium.UI.View): View to insert</li>
<li><code>position</code> (Number): Position in the {@link Titanium.UI.View#property-children children} array to
insert the view. If omitted, inserts the view to the end of the array.</li>
</ul>
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @method replaceAt
* <p>Replaces a view at the specified position in the {@link Titanium.UI.View#property-children children} array.</p>
* @description <p>Useful if the <code>layout</code> property is set to <code>horizontal</code> or <code>vertical</code>.</p>
* @param {Dictionary} params
<p>Pass an object with the following key-value pairs:</p>
<ul>
<li><code>view</code> (Titanium.UI.View): View to insert</li>
<li><code>position</code> (Number): Position in the {@link Titanium.UI.View#property-children children} array of
the view elment to replace.</li>
</ul>
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @method getAccessibilityHidden
* <p>Gets the value of the {@link Titanium.UI.View#property-accessibilityHidden} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHidden
* <p>Sets the value of the {@link Titanium.UI.View#property-accessibilityHidden} property.</p>
* @param {Boolean} accessibilityHidden
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityHint
* <p>Gets the value of the {@link Titanium.UI.View#property-accessibilityHint} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHint
* <p>Sets the value of the {@link Titanium.UI.View#property-accessibilityHint} property.</p>
* @param {String} accessibilityHint
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityLabel
* <p>Gets the value of the {@link Titanium.UI.View#property-accessibilityLabel} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityLabel
* <p>Sets the value of the {@link Titanium.UI.View#property-accessibilityLabel} property.</p>
* @param {String} accessibilityLabel
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityValue
* <p>Gets the value of the {@link Titanium.UI.View#property-accessibilityValue} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityValue
* <p>Sets the value of the {@link Titanium.UI.View#property-accessibilityValue} property.</p>
* @param {String} accessibilityValue
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAnchorPoint
* <p>Gets the value of the {@link Titanium.UI.View#property-anchorPoint} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setAnchorPoint
* <p>Sets the value of the {@link Titanium.UI.View#property-anchorPoint} property.</p>
* @param {Point} anchorPoint
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getAnimatedCenter
* <p>Gets the value of the {@link Titanium.UI.View#property-animatedCenter} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundRepeat
* <p>Gets the value of the {@link Titanium.UI.View#property-backgroundRepeat} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundRepeat
* <p>Sets the value of the {@link Titanium.UI.View#property-backgroundRepeat} property.</p>
* @param {Boolean} backgroundRepeat
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundLeftCap
* <p>Gets the value of the {@link Titanium.UI.View#property-backgroundLeftCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundLeftCap
* <p>Sets the value of the {@link Titanium.UI.View#property-backgroundLeftCap} property.</p>
* @param {Number} backgroundLeftCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundTopCap
* <p>Gets the value of the {@link Titanium.UI.View#property-backgroundTopCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundTopCap
* <p>Sets the value of the {@link Titanium.UI.View#property-backgroundTopCap} property.</p>
* @param {Number} backgroundTopCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBorderColor
* <p>Gets the value of the {@link Titanium.UI.View#property-borderColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setBorderColor
* <p>Sets the value of the {@link Titanium.UI.View#property-borderColor} property.</p>
* @param {String} borderColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getClipMode
* <p>Gets the value of the {@link Titanium.UI.View#property-clipMode} property.</p>
* @returns {Number}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setClipMode
* <p>Sets the value of the {@link Titanium.UI.View#property-clipMode} property.</p>
* @param {Number} clipMode
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getElevation
* <p>Gets the value of the {@link Titanium.UI.View#property-elevation} property.</p>
* @returns {Number}
* @platform android 5.0.0
*/
/**
* @method setElevation
* <p>Sets the value of the {@link Titanium.UI.View#property-elevation} property.</p>
* @param {Number} elevation
<p>New value for the property.</p>
* @platform android 5.0.0
*/
/**
* @method getFocusable
* <p>Gets the value of the {@link Titanium.UI.View#property-focusable} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setFocusable
* <p>Sets the value of the {@link Titanium.UI.View#property-focusable} property.</p>
* @param {Boolean} focusable
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getOverrideCurrentAnimation
* <p>Gets the value of the {@link Titanium.UI.View#property-overrideCurrentAnimation} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
*/
/**
* @method setOverrideCurrentAnimation
* <p>Sets the value of the {@link Titanium.UI.View#property-overrideCurrentAnimation} property.</p>
* @param {Boolean} overrideCurrentAnimation
<p>New value for the property.</p>
* @platform android 3.3.0
*/
/**
* @method getPullBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.View#property-pullBackgroundColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setPullBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.View#property-pullBackgroundColor} property.</p>
* @param {String} pullBackgroundColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getPreviewContext
* <p>Gets the value of the {@link Titanium.UI.View#property-previewContext} property.</p>
* @returns {Titanium.UI.View}
* @platform iphone 5.1.0
*/
/**
* @method setPreviewContext
* <p>Sets the value of the {@link Titanium.UI.View#property-previewContext} property.</p>
* @param {Titanium.UI.View} previewContext
<p>New value for the property.</p>
* @platform iphone 5.1.0
*/
/**
* @method getRotation
* <p>Gets the value of the {@link Titanium.UI.View#property-rotation} property.</p>
* @returns {Number}
* @platform android 5.4.0
*/
/**
* @method setRotation
* <p>Sets the value of the {@link Titanium.UI.View#property-rotation} property.</p>
* @param {Number} rotation
<p>New value for the property.</p>
* @platform android 5.4.0
*/
/**
* @method getRotationX
* <p>Gets the value of the {@link Titanium.UI.View#property-rotationX} property.</p>
* @returns {Number}
* @platform android 5.4.0
*/
/**
* @method setRotationX
* <p>Sets the value of the {@link Titanium.UI.View#property-rotationX} property.</p>
* @param {Number} rotationX
<p>New value for the property.</p>
* @platform android 5.4.0
*/
/**
* @method getRotationY
* <p>Gets the value of the {@link Titanium.UI.View#property-rotationY} property.</p>
* @returns {Number}
* @platform android 5.4.0
*/
/**
* @method setRotationY
* <p>Sets the value of the {@link Titanium.UI.View#property-rotationY} property.</p>
* @param {Number} rotationY
<p>New value for the property.</p>
* @platform android 5.4.0
*/
/**
* @method getScaleX
* <p>Gets the value of the {@link Titanium.UI.View#property-scaleX} property.</p>
* @returns {Number}
* @platform android 5.4.0
*/
/**
* @method setScaleX
* <p>Sets the value of the {@link Titanium.UI.View#property-scaleX} property.</p>
* @param {Number} scaleX
<p>New value for the property.</p>
* @platform android 5.4.0
*/
/**
* @method getScaleY
* <p>Gets the value of the {@link Titanium.UI.View#property-scaleY} property.</p>
* @returns {Number}
* @platform android 5.4.0
*/
/**
* @method setScaleY
* <p>Sets the value of the {@link Titanium.UI.View#property-scaleY} property.</p>
* @param {Number} scaleY
<p>New value for the property.</p>
* @platform android 5.4.0
*/
/**
* @method getSoftKeyboardOnFocus
* <p>Gets the value of the {@link Titanium.UI.View#property-softKeyboardOnFocus} property.</p>
* @returns {Number}
* @platform android 0.9
*/
/**
* @method setSoftKeyboardOnFocus
* <p>Sets the value of the {@link Titanium.UI.View#property-softKeyboardOnFocus} property.</p>
* @param {Number} softKeyboardOnFocus
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getTintColor
* <p>Gets the value of the {@link Titanium.UI.View#property-tintColor} property.</p>
* @returns {String}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setTintColor
* <p>Sets the value of the {@link Titanium.UI.View#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getTouchFeedback
* <p>Gets the value of the {@link Titanium.UI.View#property-touchFeedback} property.</p>
* @returns {Boolean}
* @platform android 6.1.0
*/
/**
* @method setTouchFeedback
* <p>Sets the value of the {@link Titanium.UI.View#property-touchFeedback} property.</p>
* @param {Boolean} touchFeedback
<p>New value for the property.</p>
* @platform android 6.1.0
*/
/**
* @method getTouchFeedbackColor
* <p>Gets the value of the {@link Titanium.UI.View#property-touchFeedbackColor} property.</p>
* @returns {String}
* @platform android 6.1.0
*/
/**
* @method setTouchFeedbackColor
* <p>Sets the value of the {@link Titanium.UI.View#property-touchFeedbackColor} property.</p>
* @param {String} touchFeedbackColor
<p>New value for the property.</p>
* @platform android 6.1.0
*/
/**
* @method getTransform
* <p>Gets the value of the {@link Titanium.UI.View#property-transform} property.</p>
* @returns {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setTransform
* <p>Sets the value of the {@link Titanium.UI.View#property-transform} property.</p>
* @param {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix} transform
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getTranslationX
* <p>Gets the value of the {@link Titanium.UI.View#property-translationX} property.</p>
* @returns {Number}
* @platform android 5.0.0
*/
/**
* @method setTranslationX
* <p>Sets the value of the {@link Titanium.UI.View#property-translationX} property.</p>
* @param {Number} translationX
<p>New value for the property.</p>
* @platform android 5.0.0
*/
/**
* @method getTranslationY
* <p>Gets the value of the {@link Titanium.UI.View#property-translationY} property.</p>
* @returns {Number}
* @platform android 5.0.0
*/
/**
* @method setTranslationY
* <p>Sets the value of the {@link Titanium.UI.View#property-translationY} property.</p>
* @param {Number} translationY
<p>New value for the property.</p>
* @platform android 5.0.0
*/
/**
* @method getTranslationZ
* <p>Gets the value of the {@link Titanium.UI.View#property-translationZ} property.</p>
* @returns {Number}
* @platform android 5.0.0
*/
/**
* @method setTranslationZ
* <p>Sets the value of the {@link Titanium.UI.View#property-translationZ} property.</p>
* @param {Number} translationZ
<p>New value for the property.</p>
* @platform android 5.0.0
*/
/**
* @method getTransitionName
* <p>Gets the value of the {@link Titanium.UI.View#property-transitionName} property.</p>
* @returns {String}
* @platform android 5.0.2
*/
/**
* @method setTransitionName
* <p>Sets the value of the {@link Titanium.UI.View#property-transitionName} property.</p>
* @param {String} transitionName
<p>New value for the property.</p>
* @platform android 5.0.2
*/
/**
* @method getViewShadowRadius
* <p>Gets the value of the {@link Titanium.UI.View#property-viewShadowRadius} property.</p>
* @returns {Number}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowRadius
* <p>Sets the value of the {@link Titanium.UI.View#property-viewShadowRadius} property.</p>
* @param {Number} viewShadowRadius
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getViewShadowColor
* <p>Gets the value of the {@link Titanium.UI.View#property-viewShadowColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowColor
* <p>Sets the value of the {@link Titanium.UI.View#property-viewShadowColor} property.</p>
* @param {String} viewShadowColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getViewShadowOffset
* <p>Gets the value of the {@link Titanium.UI.View#property-viewShadowOffset} property.</p>
* @returns {Point}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowOffset
* <p>Sets the value of the {@link Titanium.UI.View#property-viewShadowOffset} property.</p>
* @param {Point} viewShadowOffset
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getHorizontalWrap
* <p>Gets the value of the {@link Titanium.UI.View#property-horizontalWrap} property.</p>
* @returns {Boolean}
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method setHorizontalWrap
* <p>Sets the value of the {@link Titanium.UI.View#property-horizontalWrap} property.</p>
* @param {Boolean} horizontalWrap
<p>New value for the property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method getKeepScreenOn
* <p>Gets the value of the {@link Titanium.UI.View#property-keepScreenOn} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setKeepScreenOn
* <p>Sets the value of the {@link Titanium.UI.View#property-keepScreenOn} property.</p>
* @param {Boolean} keepScreenOn
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getBackgroundDisabledColor
* <p>Gets the value of the {@link Titanium.UI.View#property-backgroundDisabledColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledColor
* <p>Sets the value of the {@link Titanium.UI.View#property-backgroundDisabledColor} property.</p>
* @param {String} backgroundDisabledColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundDisabledImage
* <p>Gets the value of the {@link Titanium.UI.View#property-backgroundDisabledImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledImage
* <p>Sets the value of the {@link Titanium.UI.View#property-backgroundDisabledImage} property.</p>
* @param {String} backgroundDisabledImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedColor
* <p>Gets the value of the {@link Titanium.UI.View#property-backgroundFocusedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedColor
* <p>Sets the value of the {@link Titanium.UI.View#property-backgroundFocusedColor} property.</p>
* @param {String} backgroundFocusedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedImage
* <p>Gets the value of the {@link Titanium.UI.View#property-backgroundFocusedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedImage
* <p>Sets the value of the {@link Titanium.UI.View#property-backgroundFocusedImage} property.</p>
* @param {String} backgroundFocusedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundGradient
* <p>Gets the value of the {@link Titanium.UI.View#property-backgroundGradient} property.</p>
* @returns {Gradient}
*/
/**
* @method setBackgroundGradient
* <p>Sets the value of the {@link Titanium.UI.View#property-backgroundGradient} property.</p>
* @param {Gradient} backgroundGradient
<p>New value for the property.</p>
*/
/**
* @method getBackgroundImage
* <p>Gets the value of the {@link Titanium.UI.View#property-backgroundImage} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundImage
* <p>Sets the value of the {@link Titanium.UI.View#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
*/
/**
* @method getBackgroundSelectedColor
* <p>Gets the value of the {@link Titanium.UI.View#property-backgroundSelectedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedColor
* <p>Sets the value of the {@link Titanium.UI.View#property-backgroundSelectedColor} property.</p>
* @param {String} backgroundSelectedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedImage
* <p>Gets the value of the {@link Titanium.UI.View#property-backgroundSelectedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedImage
* <p>Sets the value of the {@link Titanium.UI.View#property-backgroundSelectedImage} property.</p>
* @param {String} backgroundSelectedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBorderRadius
* <p>Gets the value of the {@link Titanium.UI.View#property-borderRadius} property.</p>
* @returns {Number}
*/
/**
* @method setBorderRadius
* <p>Sets the value of the {@link Titanium.UI.View#property-borderRadius} property.</p>
* @param {Number} borderRadius
<p>New value for the property.</p>
*/
/**
* @method getBorderWidth
* <p>Gets the value of the {@link Titanium.UI.View#property-borderWidth} property.</p>
* @returns {Number}
*/
/**
* @method setBorderWidth
* <p>Sets the value of the {@link Titanium.UI.View#property-borderWidth} property.</p>
* @param {Number} borderWidth
<p>New value for the property.</p>
*/
/**
* @method getOpacity
* <p>Gets the value of the {@link Titanium.UI.View#property-opacity} property.</p>
* @returns {Number}
*/
/**
* @method setOpacity
* <p>Sets the value of the {@link Titanium.UI.View#property-opacity} property.</p>
* @param {Number} opacity
<p>New value for the property.</p>
*/
/**
* @method getRect
* <p>Gets the value of the {@link Titanium.UI.View#property-rect} property.</p>
* @returns {Dimension}
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getSize
* <p>Gets the value of the {@link Titanium.UI.View#property-size} property.</p>
* @returns {Dimension}
*/
/**
* @method getTouchEnabled
* <p>Gets the value of the {@link Titanium.UI.View#property-touchEnabled} property.</p>
* @returns {Boolean}
*/
/**
* @method setTouchEnabled
* <p>Sets the value of the {@link Titanium.UI.View#property-touchEnabled} property.</p>
* @param {Boolean} touchEnabled
<p>New value for the property.</p>
*/
/**
* @method getVisible
* <p>Gets the value of the {@link Titanium.UI.View#property-visible} property.</p>
* @returns {Boolean}
*/
/**
* @method setVisible
* <p>Sets the value of the {@link Titanium.UI.View#property-visible} property.</p>
* @param {Boolean} visible
<p>New value for the property.</p>
*/
/**
* @method getZIndex
* <p>Gets the value of the {@link Titanium.UI.View#property-zIndex} property.</p>
* @returns {Number}
*/
/**
* @method setZIndex
* <p>Sets the value of the {@link Titanium.UI.View#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
*/
/**
* @method getChildren
* <p>Gets the value of the {@link Titanium.UI.View#property-children} property.</p>
* @returns {Titanium.UI.View[]}
*/
/**
* @method getBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.View#property-backgroundColor} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.View#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
*/
/**
* @method getTop
* <p>Gets the value of the {@link Titanium.UI.View#property-top} property.</p>
* @returns {Number/String}
*/
/**
* @method setTop
* <p>Sets the value of the {@link Titanium.UI.View#property-top} property.</p>
* @param {Number/String} top
<p>New value for the property.</p>
*/
/**
* @method getLeft
* <p>Gets the value of the {@link Titanium.UI.View#property-left} property.</p>
* @returns {Number/String}
*/
/**
* @method setLeft
* <p>Sets the value of the {@link Titanium.UI.View#property-left} property.</p>
* @param {Number/String} left
<p>New value for the property.</p>
*/
/**
* @method getBottom
* <p>Gets the value of the {@link Titanium.UI.View#property-bottom} property.</p>
* @returns {Number/String}
*/
/**
* @method setBottom
* <p>Sets the value of the {@link Titanium.UI.View#property-bottom} property.</p>
* @param {Number/String} bottom
<p>New value for the property.</p>
*/
/**
* @method getCenter
* <p>Gets the value of the {@link Titanium.UI.View#property-center} property.</p>
* @returns {Point}
*/
/**
* @method setCenter
* <p>Sets the value of the {@link Titanium.UI.View#property-center} property.</p>
* @param {Point} center
<p>New value for the property.</p>
*/
/**
* @method getRight
* <p>Gets the value of the {@link Titanium.UI.View#property-right} property.</p>
* @returns {Number/String}
*/
/**
* @method setRight
* <p>Sets the value of the {@link Titanium.UI.View#property-right} property.</p>
* @param {Number/String} right
<p>New value for the property.</p>
*/
/**
* @method getWidth
* <p>Gets the value of the {@link Titanium.UI.View#property-width} property.</p>
* @returns {Number/String}
*/
/**
* @method setWidth
* <p>Sets the value of the {@link Titanium.UI.View#property-width} property.</p>
* @param {Number/String} width
<p>New value for the property.</p>
*/
/**
* @method getHeight
* <p>Gets the value of the {@link Titanium.UI.View#property-height} property.</p>
* @returns {Number/String}
*/
/**
* @method setHeight
* <p>Sets the value of the {@link Titanium.UI.View#property-height} property.</p>
* @param {Number/String} height
<p>New value for the property.</p>
*/
/**
* @method getLayout
* <p>Gets the value of the {@link Titanium.UI.View#property-layout} property.</p>
* @returns {String}
*/
/**
* @method setLayout
* <p>Sets the value of the {@link Titanium.UI.View#property-layout} property.</p>
* @param {String} layout
<p>New value for the property.</p>
*/
/**
* @property [accessibilityHidden=false]
* @type Boolean
* <p>Whether the view should be "hidden" from (i.e., ignored by) the accessibility service.</p>
* <p> <b>Requires:</b>
Android 4.0 and later
iOS 5.0 and later
</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityElementsHidden</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility
Protocol</a>.
The native property is only available in iOS 5.0 and later; if
<code>accessibilityHidden</code> is specified on earlier versions of iOS, it is ignored.</p>
<p>On Android, setting <code>accessibilityHidden</code> calls the native
<a href="http://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29">View.setImportantForAccessibility</a>
method. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and
later; if this property is specified on earlier versions of Android, it is ignored.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityHint=]
* @type String
* <p>Briefly describes what performing an action (such as a click) on the view will do.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityHint</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityValue} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityLabel=Title or label of the control.]
* @type String
* <p>A succint label identifying the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityLabel</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityValue} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityValue=State or value of the control.]
* @type String
* <p>A string describing the value (if any) of the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityValue</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [anchorPoint=Center of this view.]
* @type Point
* <p>Coordinate of the view about which to pivot an animation.</p>
* @description <p>Used on iOS only. For Android, use {@link Titanium.UI.Animation#property-anchorPoint}. </p>
<p>Anchor point is specified as a fraction of the view's size. For example, <code>{0, 0}</code> is at
the view's top-left corner, <code>{0.5, 0.5}</code> at its center and <code>{1, 1}</code> at its bottom-right
corner. </p>
<p>See the "Using an anchorPoint" example in {@link Titanium.UI.Animation} for a demonstration.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property animatedCenter
* @type Point
* @readonly
* <p>Current position of the view during an animation.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundRepeat=false]
* @type Boolean
* <p>Determines whether to tile a background across a view.</p>
* @description <p>Setting this to <code>true</code> makes the set <code>backgroundImage</code> repeat across the view as a series
of tiles. The tiling begins in the upper-left corner, where the upper-left corner of the
background image is rendered. The image is then tiled to fill the available space of the
view.</p>
<p>Note that setting this to <code>true</code> may incur performance penalties for large views or
background images, as the tiling must be redone whenever a view is resized.</p>
<p>On iOS, the following views do not currently support tiled backgrounds:</p>
<ul>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.TextField}</li>
<li>{@link Titanium.UI.Label}</li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundLeftCap=0]
* @type Number
* <p>Size of the left end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundTopCap=0]
* @type Number
* <p>Size of the top end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [borderColor=Same as the normal background color of this view (Android, Mobile Web), black (iOS).]
* @type String
* <p>Border color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [clipMode=Undefined. Behaves as if set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT}.]
* @type Number
* <p>View's clipping behavior.</p>
* @description <p>Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_ENABLED} enforces all child views to be clipped to this views bounds.
Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_DISABLED} allows child views to be drawn outside the bounds of this view.
When set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT} or when this property is not set, clipping behavior is inferred.
See section on iOS Clipping Behavior in {@link Titanium.UI.View}.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property elevation
* @type Number
* <p>Base elevation of the view relative to its parent in pixels.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>The elevation of a view determines the appearance of its shadow.
Higher elevations produce larger and softer shadows.</p>
<p><strong>Note:</strong> The <code>elevation</code> property only works on <code>Titanium.UI.View</code> objects.
Many Android components have a default elevation that cannot be modified.
For more information, see
<a href="https://www.google.com/design/spec/what-is-material/elevation-shadows.html">Google design guidelines: Elevation and shadows</a>.</p>
* @platform android 5.0.0
*/
/**
* @property [focusable=false]
* @type Boolean
* <p>Whether view should be focusable while navigating with the trackball.</p>
* @platform android 0.9
*/
/**
* @property [overrideCurrentAnimation=undefined but behaves as false]
* @type Boolean
* @creationOnly
* <p>When on, animate call overrides current animation if applicable.</p>
* @description <p>If this property is set to false, the animate call is ignored if the view is currently being animated.</p>
* @platform android 3.3.0
*/
/**
* @property [pullBackgroundColor=Undefined. Results in a light grey background color on the wrapper view.]
* @type String
* <p>Background color of the wrapper view when this view is used as either <Titanium.UI.ListView.pullView> or {@link Titanium.UI.TableView#property-headerPullView}.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property previewContext
* @type Titanium.UI.View
* <p>The preview context used in the 3D-Touch feature "Peek and Pop".</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Preview context to present the "Peek and Pop" of a view. Use an configured instance
of {@link Titanium.UI.iOS.PreviewContext} here.</p>
<p>Note: This property can only be used on devices running iOS9 or later and supporting 3D-Touch.
It is ignored on older devices and can manually be checked using {@link Titanium.UI.iOS#property-forceTouchSupported}.</p>
* @platform iphone 5.1.0
*/
/**
* @property rotation
* @type Number
* <p>Clockwise 2D rotation of the view in degrees.</p>
* @description <p>Translation values are applied to the static post layout value.</p>
* @platform android 5.4.0
*/
/**
* @property rotationX
* @type Number
* <p>Clockwise rotation of the view in degrees (x-axis).</p>
* @description <p>Translation values are applied to the static post layout value.</p>
* @platform android 5.4.0
*/
/**
* @property rotationY
* @type Number
* <p>Clockwise rotation of the view in degrees (y-axis).</p>
* @description <p>Translation values are applied to the static post layout value.</p>
* @platform android 5.4.0
*/
/**
* @property scaleX
* @type Number
* <p>Scaling of the view in x-axis in pixels.</p>
* @description <p>Translation values are applied to the static post layout value.</p>
* @platform android 5.4.0
*/
/**
* @property scaleY
* @type Number
* <p>Scaling of the view in y-axis in pixels.</p>
* @description <p>Translation values are applied to the static post layout value.</p>
* @platform android 5.4.0
*/
/**
* @property [softKeyboardOnFocus={@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}]
* @type Number
* <p>Determines keyboard behavior when this view is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_HIDE_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_SHOW_ON_FOCUS}
</ul></p>
* @platform android 0.9
*/
/**
* @property [tintColor=]
* @type String
* <p>The view's tintColor. This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of UIView on iOS. If no value is specified,
the tintColor of the View is inherited from its superview. </p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property [touchFeedback=false]
* @type Boolean
* <p>A material design visual construct that provides an instantaneous visual confirmation of touch point.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>This is an opt-in feature available from Android Lollipop.
Touch feedback is applied only if the backgroundColor is a solid color.</p>
* @platform android 6.1.0
*/
/**
* @property [touchFeedbackColor=Theme provided color.]
* @type String
* <p>Optional touch feedback ripple color. This has no effect unless <code>touchFeedback</code> is true.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @platform android 6.1.0
*/
/**
* @property [transform=Identity matrix]
* @type Titanium.UI.2DMatrix/Titanium.UI.3DMatrix
* <p>Transformation matrix to apply to the view.</p>
* @description <p>Android and Mobile Web only support 2DMatrix transforms.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property translationX
* @type Number
* <p>Horizontal location of the view relative to its left position in pixels.</p>
* @description <p>Translation values are applied to the static post layout value.</p>
* @platform android 5.0.0
*/
/**
* @property translationY
* @type Number
* <p>Vertical location of the view relative to its top position in pixels.</p>
* @description <p>Translation values are applied to the static post layout value.</p>
* @platform android 5.0.0
*/
/**
* @property translationZ
* @type Number
* <p>Depth of the view relative to its elevation in pixels.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>Translation values are applied to the static post layout value.</p>
* @platform android 5.0.0
*/
/**
* @property transitionName
* @type String
* <p>A name to identify this view in activity transition.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>Name should be unique in the View hierarchy.</p>
* @platform android 5.0.2
*/
/**
* @property [viewShadowRadius=Undefined. Behaves as if set to 3.]
* @type Number
* <p>Determines the blur radius used to create the shadow.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [viewShadowColor=Undefined. Behaves as if transparent.]
* @type String
* <p>Determines the color of the shadow.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [viewShadowOffset=Undefined. Behaves as if set to (0,-3)]
* @type Point
* <p>Determines the offset for the shadow of the view.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [horizontalWrap=true]
* @type Boolean
* <p>Determines whether the layout has wrapping behavior.</p>
* @description <p>For more information, see the discussion of horizontal layout mode in the description of
the {@link Titanium.UI.View#property-layout layout} property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @property [keepScreenOn=false]
* @type Boolean
* <p>Determines whether to keep the device screen on.</p>
* @description <p>When <code>true</code> the screen will not power down. Note: enabling this feature will use more
power, thereby adversely affecting run time when on battery.</p>
* @platform android 0.9
*/
/**
* @property [backgroundDisabledColor=Same as the normal background color of this view.]
* @type String
* <p>Disabled background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundDisabledImage=If `backgroundDisabledImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is disabled.
]
* @type String
* <p>Disabled background image for the view, specified as a local file path or URL.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedColor=Same as the normal background color of this view.]
* @type String
* <p>Focused background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>For normal views, the focused color is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedImage=If `backgroundFocusedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is focused.
]
* @type String
* <p>Focused background image for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the focused background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundGradient=No gradient]
* @type Gradient
* <p>A background gradient for the view.</p>
* @description <p>A gradient can be defined as either linear or radial. A linear gradient varies continuously
along a line between the <code>startPoint</code> and <code>endPoint</code>.</p>
<p>A radial gradient is interpolated between two circles, defined by <code>startPoint</code> and
<code>startRadius</code> and <code>endPoint</code> and <code>endRadius</code> respectively.</p>
<p>The start and end points and radius values can be defined in device units, in the view's
coordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center
point of the view can be specified as:</p>
<pre><code>{ x: 30, y: 30 }
</code></pre>
<p>Or:
{ x: '50%', y: '50%' }</p>
<p>When specifying multiple colors, you can specify an <em>offset</em> value for each color, defining
how far into the gradient it takes effect. For example, the following color array specifies
a gradient that goes from red to blue back to red: </p>
<pre><code>colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]
</code></pre>
<p>Mobile Web has two limitations: backfillStart and backfillEnd are ignored and the system
behaves as if they are true, and endPoint is not supported for radial gradients. </p>
<p>Android currently only supports linear gradients. It also ignores backfillStart and backfillEnd
treating them as if they are true.</p>
* <h3>Examples</h3>
<h4>Linear and Radial Gradients</h4>
<p>The following code excerpt creates two views, one with a linear gradient and one with
a radial gradient.</p>
<pre><code>var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var radialGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'radial',
startPoint: { x: 50, y: 50 },
endPoint: { x: 50, y: 50 },
colors: [ 'red', 'blue'],
startRadius: '90%',
endRadius: 0,
backfillStart: true
}
});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],
}
});
win1.add(radialGradient);
win1.add(linearGradient);
win1.open();
</code></pre>
*/
/**
* @property [backgroundImage=Default behavior when `backgroundImage` is unspecified depends on the type of view and
the platform. For generic views, no image is used. For most controls (buttons, text
fields, and so on), platform-specific default images are used.
]
* @type String
* <p>Background image for the view, specified as a local file path or URL.</p>
*/
/**
* @property [backgroundSelectedColor=Background color of this view.]
* @type String
* <p>Selected background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p><code>focusable</code> must be true for normal views.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedImage=If `backgroundSelectedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is selected.
]
* @type String
* <p>Selected background image url for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the selected background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [borderRadius=0]
* @type Number
* <p>Radius for the rounded corners of the view's border.</p>
* @description <p>Each corner is rounded using an arc of a circle.</p>
*/
/**
* @property [borderWidth=0]
* @type Number
* <p>Border width of the view.</p>
*/
/**
* @property [opacity=1.0 (opaque)]
* @type Number
* <p>Opacity of this view, from 0.0 (transparent) to 1.0 (opaque).</p>
*/
/**
* @property rect
* @type Dimension
* @readonly
* <p>The bounding box of the view relative to its parent, in system units.</p>
* @description <p>The view's bounding box is defined by its size and position. </p>
<p>The view's size is <code>rect.width</code> x <code>rect.height</code>. The view's top-left position relative to
its parent is (<code>rect.x</code> , <code>rect.y</code>). </p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property size
* @type Dimension
* @readonly
* <p>The size of the view in system units. </p>
* @description <p>Although property returns a {@link Dimension} dictionary, only the <code>width</code> and <code>height</code>
properties are valid. The position properties--<code>x</code> and <code>y</code>--are always 0.</p>
<p>To find the position <em>and</em> size of the view, use the {@link Titanium.UI.View#property-rect rect}
property instead.</p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
*/
/**
* @property [touchEnabled=true]
* @type Boolean
* <p>Determines whether view should receive touch events.</p>
* @description <p>If false, will forward the events to peers.</p>
*/
/**
* @property [visible=true]
* @type Boolean
* <p>Determines whether the view is visible.</p>
*/
/**
* @property zIndex
* @type Number
* <p>Z-index stack order position, relative to other sibling views.</p>
* @description <p>A view does not have a default z-index value, meaning that it is undefined by default.
When this property is explicitly set, regardless of its value, it causes the view to be
positioned in front of any sibling that has an undefined z-index.</p>
*/
/**
* @property children
* @type Titanium.UI.View[]
* @readonly
* <p>Array of this view's child views.</p>
*/
/**
* @property [backgroundColor=Transparent]
* @type String
* <p>Background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property top
* @type Number/String
* <p>The view's top position.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property left
* @type Number/String
* <p>View's left position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property bottom
* @type Number/String
* <p>View's bottom position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the parent
view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or a
dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property center
* @type Point
* <p>View's center position, in the parent view's coordinates.</p>
* @description <p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property right
* @type Number/String
* <p>View's right position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property width
* @type Number/String
* <p>View's width, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values: </p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</li>
</ul>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p>
<p>This is an input property for specifying the view's width dimension. To determine
the view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
*/
/**
* @property height
* @type Number/String
* <p>View height, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values:</p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li><p>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</p>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p></li>
</ul>
<p>This is an input property for specifying the view's height dimension. To determine the
view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
*/
/**
* @property [layout=Composite layout]
* @type String
* <p>Specifies how the view positions its children.
One of: 'composite', 'vertical', or 'horizontal'.</p>
* @description <p>There are three layout options:</p>
<ul>
<li><p><code>composite</code> (or <code>absolute</code>). Default layout. A child view is positioned based on its
positioning properties or "pins" (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code> and <code>center</code>).
If no positioning properties are specified, the child is centered. </p>
<p>The child is always sized based on its <code>width</code> and <code>height</code> properties, if these are
specified. If the child's height or width is <em>not</em> specified explicitly, it may be
calculated implicitly from the positioning properties. For example, if both <code>left</code> and
<code>center.x</code> are specified, they can be used to calculate the width of the child control. </p>
<p>Because the size and position properties can conflict, there is a specific precedence
order for the layout properties. For vertical positioning, the precedence
order is: <code>height</code>, <code>top</code>, <code>center.y</code>, <code>bottom</code>.</p>
<p>The following table summarizes the various combinations of properties that can
be used for vertical positioning, in order from highest precedence to lowest.
(For example, if <code>height</code>, <code>center.y</code> and <code>bottom</code> are all specified, the
<code>height</code> and <code>center.y</code> values take precedence.)</p>
<table cellpadding="6px" border="1" rules="all">
<tr>
<th>Scenario</th><th>Behavior</th>
</tr>
<tr>
<td>`height` & `top` specified</td><td>Child positioned `top` unit from
parent's top, using specified `height`;
any `center.y` and `bottom` values are ignored.</td>
</tr>
<tr>
<td>`height` & `center.y` specified</td><td>Child positioned with center at
`center.y`, using specified `height`; any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`height` & `bottom` specified</td><td>Child positioned `bottom` units from
parent's bottom, using specified `height`.</td>
</tr>
<tr>
<td>`top` & `center.y` specified</td><td>Child positioned with top edge `top` units from
parent's top and center at `center.y`. Height is determined implicitly;
any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`top` & `bottom` specified</td><td>Child positioned with top edge `top` units from
parent's top and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly. </td>
</tr>
<tr>
<td>Only `top` specified</td><td>Child positioned `top` units from parent's
top, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`center.y` and `bottom` specified</td><td>Child positioned with center at
`center.y` and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly.</td>
</tr>
<tr>
<td>Only `center.y` specified</td><td>Child positioned with center at
`center.y`, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>Only `bottom` specified</td><td>Child positioned with bottom edge `bottom`
units from parent's bottom, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`height`, `top`, `center.y`, and `bottom` unspecified</td><td>Child
centered vertically in the parent and uses the default height calculation
for the child view type.</td>
</tr>
</table>
<p>Horizontal positioning works like vertical positioning, except that the
precedence is <code>width</code>, <code>left</code>, <code>center.x</code>, <code>right</code>. </p>
<p>For complete details on composite layout rules, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>
in the Titanium Mobile Guides. </p>
<ul><li><code>vertical</code>. Children are laid out vertically from top to bottom. The first child
is laid out <code>top</code> units from its parent's bounding box. Each subsequent child is
laid out below the previous child. The space between children is equal to the
upper child's <code>bottom</code> value plus the lower child's <code>top</code> value. </li></ul>
<p>Each child is positioned horizontally as in the composite layout mode. </p>
<ul><li><code>horizontal</code>. Horizontal layouts have different behavior depending on whether wrapping
is enabled. Wrapping is enabled by default (the <code>horizontalWrap</code> property is <code>true</code>).</li></ul>
<p>With wrapping behavior, the children are laid out horizontally from left to right,
<em>in rows</em>. If a child requires more horizontal space than exists in the current row,
it is wrapped to a new row. The height of each row is equal to the maximum height of
the children in that row.</p>
<p>Wrapping behavior is available on iOS, Android and Mobile Web (Release 2.1.0 and later).
When the <code>horizontalWrap</code> property is set to true, the first row is placed at the top of the
parent view, and successive rows are placed below the first row. Each child is
positioned vertically <em>within its row</em> somewhat like composite layout mode.
In particular: </p>
<ul><li>If neither <code>top</code> or <code>bottom</code> is specified, the child is centered in the
row.</li>
<li>If either <code>top</code> or <code>bottom</code> is specified, the child is aligned to either
the top or bottom of the row, with the specified amount of padding.</li>
<li>If <em>both</em> <code>top</code> and <code>bottom</code> is specified for a given child, the properties
are both treated as padding.</li></ul>
<p>If the <code>horizontalWrap</code> property is false, the behavior is more equivalent to a vertical layout.
Children are laid or horizontally from left to right in a single row. The <code>left</code> and
<code>right</code> properties are used as padding between the children, and the <code>top</code> and <code>bottom</code>
properties are used to position the children vertically.</p>
<p>On Mobile Web <em>prior to</em> Release 2.1.0, the horizontal layout does not wrap by default,
and does not support the <code>horizontalWrap</code> property. On Android and iOS <em>prior to</em> Release
2.1.0, the horizontal layout always wraps and the <code>horizontalWrap</code> property is not supported.</p></li>
</ul>
*/
/**
* @class Modules.Map.Annotation
* @platform android 3.0.2
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/Annotation.yml
* <p>Represents a labeled point of interest on the map that the user can click on.</p>
* @description <p>The <code>Annotation</code> object gives you low-level control over annotations that can be added to
{@link Modules.Map.View map view}. An annotation must have its <code>latitude</code> and <code>longitude</code>
properties set to appear on a map.</p>
<p>Use the {@link Modules.Map#method-createAnnotation} method to create an annotation. Starting with Alloy
1.4.0, use the <strong><code><Annotation></code></strong> Alloy element to define one in XML markup.</p>
<p>An annotation can also have a title, a subtitle, and two inset buttons or views on the left
and right side of the title. All of these items are optional.</p>
<p>The controls on the left and right side of the annotation can be specified in one of two
ways:</p>
<ul>
<li><p>To display an image, set the {@link Titanium.Map.Annotation#property-leftButton leftButton} or
{@link Titanium.Map.Annotation#property-rightButton rightButton} property to an image URL. (On
iOS, you can also use a {@link Titanium.UI.iPhone.SystemButton SystemButton} constant
to use one of the native system button icons.) </p></li>
<li><p>To add another type of view to the annotation, set the
{@link Titanium.Map.Annotation#property-leftView leftView} or
{@link Titanium.Map.Annotation#property-rightView rightView} property to a {@link Titanium.UI.View View}
object.</p></li>
</ul>
<p>An annotation has two states: selected and deselected. A deselected annotation
is marked by a pin image. When the user selects the pin, the full annotation is
displayed.</p>
<p>You can specify a custom image for the map pin by setting the
{@link Modules.Map.Annotation#property-image image} property. </p>
<p>When the user clicks on an annotation, a <code>click</code> event is generated. </p>
<p>On iOS, You can add a click event listener to a specific annotation, or add a
click event listener to the map view to receive click events from all annotations
on the map.</p>
<p>On Android, you must add the click event listener to the map view; the annotation
itself does not generate these events. </p>
*/
/**
* @method getCanShowCallout
* <p>Gets the value of the {@link Modules.Map.Annotation#property-canShowCallout} property.</p>
* @returns {Boolean}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setCanShowCallout
* <p>Sets the value of the {@link Modules.Map.Annotation#property-canShowCallout} property.</p>
* @param {Boolean} canShowCallout
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getCenterOffset
* <p>Gets the value of the {@link Modules.Map.Annotation#property-centerOffset} property.</p>
* @returns {Point}
*/
/**
* @method setCenterOffset
* <p>Sets the value of the {@link Modules.Map.Annotation#property-centerOffset} property.</p>
* @param {Point} centerOffset
<p>New value for the property.</p>
*/
/**
* @method getCustomView
* <p>Gets the value of the {@link Modules.Map.Annotation#property-customView} property.</p>
* @returns {Titanium.UI.View}
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setCustomView
* <p>Sets the value of the {@link Modules.Map.Annotation#property-customView} property.</p>
* @param {Titanium.UI.View} customView
<p>New value for the property.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getDraggable
* <p>Gets the value of the {@link Modules.Map.Annotation#property-draggable} property.</p>
* @returns {Boolean}
*/
/**
* @method setDraggable
* <p>Sets the value of the {@link Modules.Map.Annotation#property-draggable} property.</p>
* @param {Boolean} draggable
<p>New value for the property.</p>
*/
/**
* @method getImage
* <p>Gets the value of the {@link Modules.Map.Annotation#property-image} property.</p>
* @returns {String/Titanium.Blob}
*/
/**
* @method setImage
* <p>Sets the value of the {@link Modules.Map.Annotation#property-image} property.</p>
* @param {String/Titanium.Blob} image
<p>New value for the property.</p>
*/
/**
* @method getLatitude
* <p>Gets the value of the {@link Modules.Map.Annotation#property-latitude} property.</p>
* @returns {Number}
*/
/**
* @method setLatitude
* <p>Sets the value of the {@link Modules.Map.Annotation#property-latitude} property.</p>
* @param {Number} latitude
<p>New value for the property.</p>
*/
/**
* @method getLongitude
* <p>Gets the value of the {@link Modules.Map.Annotation#property-longitude} property.</p>
* @returns {Number}
*/
/**
* @method setLongitude
* <p>Sets the value of the {@link Modules.Map.Annotation#property-longitude} property.</p>
* @param {Number} longitude
<p>New value for the property.</p>
*/
/**
* @method getPincolor
* <p>Gets the value of the {@link Modules.Map.Annotation#property-pincolor} property.</p>
* @returns {Number}
*/
/**
* @method setPincolor
* <p>Sets the value of the {@link Modules.Map.Annotation#property-pincolor} property.</p>
* @param {Number} pincolor
<p>New value for the property.</p>
*/
/**
* @method getSubtitle
* <p>Gets the value of the {@link Modules.Map.Annotation#property-subtitle} property.</p>
* @returns {String}
*/
/**
* @method setSubtitle
* <p>Sets the value of the {@link Modules.Map.Annotation#property-subtitle} property.</p>
* @param {String} subtitle
<p>New value for the property.</p>
*/
/**
* @method getSubtitleid
* <p>Gets the value of the {@link Modules.Map.Annotation#property-subtitleid} property.</p>
* @returns {String}
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setSubtitleid
* <p>Sets the value of the {@link Modules.Map.Annotation#property-subtitleid} property.</p>
* @param {String} subtitleid
<p>New value for the property.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Modules.Map.Annotation#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Modules.Map.Annotation#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getTitleid
* <p>Gets the value of the {@link Modules.Map.Annotation#property-titleid} property.</p>
* @returns {String}
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setTitleid
* <p>Sets the value of the {@link Modules.Map.Annotation#property-titleid} property.</p>
* @param {String} titleid
<p>New value for the property.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getLeftButton
* <p>Gets the value of the {@link Modules.Map.Annotation#property-leftButton} property.</p>
* @returns {String}
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setLeftButton
* <p>Sets the value of the {@link Modules.Map.Annotation#property-leftButton} property.</p>
* @param {String} leftButton
<p>New value for the property.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getLeftView
* <p>Gets the value of the {@link Modules.Map.Annotation#property-leftView} property.</p>
* @returns {Titanium.UI.View}
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setLeftView
* <p>Sets the value of the {@link Modules.Map.Annotation#property-leftView} property.</p>
* @param {Titanium.UI.View} leftView
<p>New value for the property.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getRightButton
* <p>Gets the value of the {@link Modules.Map.Annotation#property-rightButton} property.</p>
* @returns {String}
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setRightButton
* <p>Sets the value of the {@link Modules.Map.Annotation#property-rightButton} property.</p>
* @param {String} rightButton
<p>New value for the property.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getRightView
* <p>Gets the value of the {@link Modules.Map.Annotation#property-rightView} property.</p>
* @returns {Titanium.UI.View}
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setRightView
* <p>Sets the value of the {@link Modules.Map.Annotation#property-rightView} property.</p>
* @param {Titanium.UI.View} rightView
<p>New value for the property.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getShowInfoWindow
* <p>Gets the value of the {@link Modules.Map.Annotation#property-showInfoWindow} property.</p>
* @returns {Boolean}
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setShowInfoWindow
* <p>Sets the value of the {@link Modules.Map.Annotation#property-showInfoWindow} property.</p>
* @param {Boolean} showInfoWindow
<p>New value for the property.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property canShowCallout
* @type Boolean
* <p>Defines whether the annotation view is able to display extra information in a callout bubble.</p>
* @description <p>When this is set to <code>true</code>, the annotation view shows the callout bubble on selection.
Set this to <code>false</code> to disabled the showing of the callout bubble on selection.
This must be set before the annotation is added to the map.</p>
<p>If this value is undefined, the value is treated as <strong>explicit true</strong>.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property centerOffset
* @type Point
* <p>Defines a center offset point for the annotation.</p>
* @description <p>By default, the center point of an annotation view is placed at the coordinate point of the
associated annotation. Use this property to reposition the annotation view as needed.
Positive offset values move the annotation view down and right, while negative values
move it up and left.</p>
*/
/**
* @property customView
* @type Titanium.UI.View
* <p>Defines a custom view to be used by the annotation.</p>
* @description <p>Must be set during creation. <strong>User interaction is disabled on the view.</strong>
No view interaction events (click, touchstart etc) will be fired.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [draggable=false]
* @type Boolean
* <p>Determines whether the pin can be dragged by the user.</p>
* @description <p>When an annotation is draggable, it can be moved by the user by long pressing on the pin.</p>
*/
/**
* @property [image=If not specified, a standard map pin image is used.]
* @type String/Titanium.Blob
* <p>Image to use for the the pin.</p>
* @description <p>Must be set during creation. This is ignored if the customView property is set.</p>
*/
/**
* @property latitude
* @type Number
* <p>Latitude of the annotation, in decimal degrees.</p>
*/
/**
* @property longitude
* @type Number
* <p>Longitude of the annotation, in decimal degrees.</p>
*/
/**
* @property pincolor
* @type Number
* <p>Pin color.</p>
* @description <p>Pin color is ignored if a custom pin image is specified using {@link Modules.Map.Annotation#property-image}.</p>
*/
/**
* @property subtitle
* @type String
* <p>Secondary title of the annotation view.</p>
*/
/**
* @property subtitleid
* @type String
* <p>Key in the locale file to use for the subtitle property.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property title
* @type String
* <p>Primary title of the annotation view.</p>
*/
/**
* @property titleid
* @type String
* <p>Key in the locale file to use for the title property.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property leftButton
* @type String
* <p>Left button image on the annotation, specified as an image URL.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property leftView
* @type Titanium.UI.View
* <p>Left view that is displayed on the annotation.</p>
* @description <p>This is ignored if the <code>leftButton</code> property is set.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property rightButton
* @type String
* <p>Right button image on the annotation, specified as an image URL.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property rightView
* @type Titanium.UI.View
* <p>Right view that is displayed on the annotation.</p>
* @description <p>This is ignored if the <code>rightButton</code> property is set.</p>
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [showInfoWindow=true]
* @type Boolean
* <p>Show or hide the view that is displayed on the annotation when clicked.</p>
* @description <p>When this is false, clicking on the annotation will not center it on the map, but the
annotation will still be selected, thus triggering the click event.
If the annotation is selected, and the info window is hidden, then the next click
will deselect the annotation, thus will NOT show the info window, regardless of the current state of this property.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @class Modules.Map.Camera
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/Camera.yml
* <p>A camera object defines a point above the map's surface from which to view the map. Available in iOS 7.0 and later.</p>
* @description <p>Applying a camera to a map has the effect of giving the map a 3D-like appearance.
You can use a camera to rotate the map so that it is oriented to match the user's
heading or to apply a pitch angle to tilt the plane of the map.</p>
<p>If the app is run on pre iOS 7, camera functionality will not be available.
After creating a <code>Camera</code> object, it can be applied to the map by setting the <code>camera</code> property of the
{@link Modules.Map.View map view}.</p>
<p>Use the {@link Modules.Map#method-createCamera} method to create a camera.</p>
<p>If <code>altitude</code>, <code>eyeCoordinate</code>, and <code>centerCoordinate</code> are passed in on creation, a camera will be
returned using the specified viewing angle information.</p>
*/
/**
* @method getAltitude
* <p>Gets the value of the {@link Modules.Map.Camera#property-altitude} property.</p>
* @returns {Number}
*/
/**
* @method setAltitude
* <p>Sets the value of the {@link Modules.Map.Camera#property-altitude} property.</p>
* @param {Number} altitude
<p>New value for the property.</p>
*/
/**
* @method getCenterCoordinate
* <p>Gets the value of the {@link Modules.Map.Camera#property-centerCoordinate} property.</p>
* @returns {MapPointType}
*/
/**
* @method setCenterCoordinate
* <p>Sets the value of the {@link Modules.Map.Camera#property-centerCoordinate} property.</p>
* @param {MapPointType} centerCoordinate
<p>New value for the property.</p>
*/
/**
* @method getHeading
* <p>Gets the value of the {@link Modules.Map.Camera#property-heading} property.</p>
* @returns {Number}
*/
/**
* @method setHeading
* <p>Sets the value of the {@link Modules.Map.Camera#property-heading} property.</p>
* @param {Number} heading
<p>New value for the property.</p>
*/
/**
* @method getPitch
* <p>Gets the value of the {@link Modules.Map.Camera#property-pitch} property.</p>
* @returns {Number}
*/
/**
* @method setPitch
* <p>Sets the value of the {@link Modules.Map.Camera#property-pitch} property.</p>
* @param {Number} pitch
<p>New value for the property.</p>
*/
/**
* @method getEyeCoordinate
* <p>Gets the value of the {@link Modules.Map.Camera#property-eyeCoordinate} property.</p>
* @returns {MapPointType}
*/
/**
* @method setEyeCoordinate
* <p>Sets the value of the {@link Modules.Map.Camera#property-eyeCoordinate} property.</p>
* @param {MapPointType} eyeCoordinate
<p>New value for the property.</p>
*/
/**
* @property altitude
* @type Number
* <p>The altitude above the ground, measured in meters.</p>
*/
/**
* @property centerCoordinate
* @type MapPointType
* <p>The coordinate point on which the map should be centered.</p>
*/
/**
* @property heading
* @type Number
* <p>The heading of the camera (measured in degrees) relative to true north.</p>
* @description <p>The value 0 means that the top edge of the map view corresponds to true north.
The value 90 means the top of the map is pointing due east. The value 180 means
the top of the map points due south, and so on.</p>
*/
/**
* @property pitch
* @type Number
* <p>The viewing angle of the camera, measured in degrees.</p>
* @description <p>A value of 0 results in a camera pointed straight down at the map. Angles greater than
0 result in a camera that is pitched toward the horizon by the specified number of degrees.
The value in this property may be clamped to a maximum value to maintain map readability.
There is no fixed maximum value, though, because the actual maximum value is dependent on
the current altitude of the camera.</p>
*/
/**
* @property eyeCoordinate
* @type MapPointType
* <p>The coordinate point at which to place the camera. Only used on creation when <code>altitude</code>
and <code>centerCoordinate</code> are also provided. Setting this property at anytime other time will
have no effect.</p>
* @description <p>If the value for this parameter is equal to the value in the <code>centerCoordinate</code> parameter,
the map is displayed as if the camera is looking straight down. If this point is offset
from the <code>centerCoordinate</code> value, the map is displayed with an appropriate heading and pitch angle.</p>
*/
/**
* @class Modules.Map.Circle
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/Circle.yml
* <p>Represents a bounded area on the map.</p>
* @description <p>The <code>Circle</code> object gives you low-level control over circles that can be added to a
{@link Modules.Map.View map view}. A circle must have a <code>center</code> property and a <code>radius</code> set to appear on a map.</p>
<p>Use the {@link Modules.Map#method-createCircle} method to create a circle.</p>
*/
/**
* @method getCenter
* <p>Gets the value of the {@link Modules.Map.Circle#property-center} property.</p>
* @returns {MapPointType[]}
*/
/**
* @method setCenter
* <p>Sets the value of the {@link Modules.Map.Circle#property-center} property.</p>
* @param {Array<MapPointType>} center
<p>New value for the property.</p>
*/
/**
* @method getRadius
* <p>Gets the value of the {@link Modules.Map.Circle#property-radius} property.</p>
* @returns {Number}
*/
/**
* @method setRadius
* <p>Sets the value of the {@link Modules.Map.Circle#property-radius} property.</p>
* @param {Number} radius
<p>New value for the property.</p>
*/
/**
* @method getFillColor
* <p>Gets the value of the {@link Modules.Map.Circle#property-fillColor} property.</p>
* @returns {String}
*/
/**
* @method setFillColor
* <p>Sets the value of the {@link Modules.Map.Circle#property-fillColor} property.</p>
* @param {String} fillColor
<p>New value for the property.</p>
*/
/**
* @method getStrokeColor
* <p>Gets the value of the {@link Modules.Map.Circle#property-strokeColor} property.</p>
* @returns {String}
*/
/**
* @method setStrokeColor
* <p>Sets the value of the {@link Modules.Map.Circle#property-strokeColor} property.</p>
* @param {String} strokeColor
<p>New value for the property.</p>
*/
/**
* @method getStrokeWidth
* <p>Gets the value of the {@link Modules.Map.Circle#property-strokeWidth} property.</p>
* @returns {Number}
*/
/**
* @method setStrokeWidth
* <p>Sets the value of the {@link Modules.Map.Circle#property-strokeWidth} property.</p>
* @param {Number} strokeWidth
<p>New value for the property.</p>
*/
/**
* @method getZIndex
* <p>Gets the value of the {@link Modules.Map.Circle#property-zIndex} property.</p>
* @returns {Number}
* @platform android 4.1.0
*/
/**
* @method setZIndex
* <p>Sets the value of the {@link Modules.Map.Circle#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
* @platform android 4.1.0
*/
/**
* @property center
* @type MapPointType[]
* @creationOnly
* <p>Array with longitude and latitude values. Can also be an object with longitude and latitude.</p>
*/
/**
* @property radius
* @type Number
* @creationOnly
* <p>The radius of the circle, specified in meters. It should be zero or greater.</p>
*/
/**
* @property [fillColor=black]
* @type String
* <p>Color to use when shading the circle, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property [strokeColor=black]
* @type String
* <p>Color to use for the border of the circle, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property [strokeWidth=10]
* @type Number
* <p>Line width in pixels to use when drawing the circle.</p>
*/
/**
* @property zIndex
* @type Number
* @creationOnly
* <p>The order (depth) in which to display the circles.</p>
* @description <p>For iOS, the circles are drawn in the order in which they are added.</p>
* @platform android 4.1.0
*/
/**
* @class Modules.Map
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/Map.yml
* <p>Add-on Map module</p>
* @description <h2>Android</h2>
<p>This module is a replacement for the built-in Titanium.Map module on Android, which uses the Google Maps API v1.
The Google Maps API v1 is deprecated and Google will no longer issue new Maps API v1 keys after March 3rd, 2013. New
applications should use this module on Android.</p>
<p>Applications with existing Maps API v1 keys can continue to use the Titanium.Map module on Android,
or transition to the new ti.map add-on module.</p>
<p>For more instructions and examples of using the module, refer to the
<a href="http://docs.appcelerator.com/titanium/latest/#!/guide/Google_Maps_v2_for_Android">Google Maps v2 for Android guide</a>.</p>
<h3>Requirements</h3>
<ul>
<li>Google Maps API key (required for both development and production)</li>
<li>Google Play services SDK installed using the Android SDK manager</li>
<li>This module only works on Android devices. This module is not supported on the Android emulator</li>
</ul>
<h3>Getting Started</h3>
<ul>
<li><p>Edit the <code>modules</code> section of your tiapp.xml file to include this module:</p>
<pre><code><ti:app>
<modules>
<!-- Add this line to your modules section -->
<module platform="android">ti.map</module>
</modules>
</ti:app>
</code></pre></li>
<li><p>Obtain a Google Maps API key. For instructions, refer to the "Obtain and Add a Google API Key"
section in the
<a href="http://docs.appcelerator.com/titanium/latest/#!/guide/Google_Maps_v2_for_Android">Google Maps v2 for Android guide</a>.</p></li>
<li><p>Add the following <code>meta-tag</code> element to the Android manifest section of the tiapp.xml
file. You may need to add the <code>manifest</code> and <code>application</code> elements.</p>
<pre><code><ti:app>
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<application>
<!-- Replace "PASTE YOUR GOOGLE MAPS API KEY HERE" with the Google API key you obtained -->
<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="PASTE YOUR GOOGLE MAPS API KEY HERE"/>
</application>
</manifest>
</android>
</ti:app>
</code></pre></li>
<li><p>Instantiate the module with the <code>require('ti.map')</code> method, then make subsequent API calls with
the new map object.</p>
<pre><code>var Map = require('ti.map');
var mapview = Map.createView({mapType:Map.NORMAL_TYPE});
</code></pre></li>
</ul>
<h2>iOS</h2>
<p>This module is a replacement for the built-in Titanium.Map module on iOS.</p>
<p>For more instructions and examples of using the module, refer to the
<a href="http://docs.appcelerator.com/titanium/latest/#!/guide/iOS_Map_Kit">iOS Map Kit guide</a>.</p>
<h3>Requirements</h3>
<ul>
<li>Applications using this module must be built using Xcode 5 or later.</li>
</ul>
<h3>Getting Started</h3>
<ul>
<li><p>Edit the <code>modules</code> section of your tiapp.xml file to include this module:</p>
<pre><code><ti:app>
<modules>
<!-- Add this line to your modules section -->
<module platform="iphone">ti.map</module>
</modules>
</ti:app>
</code></pre></li>
<li><p>To use the <code>userLocation</code> property in iOS 8 and later, add either the
<a href="https://developer.apple.com/library/prerelease/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW26"><code>NSLocationWhenInUseUsageDescription</code></a>
or
<a href="https://developer.apple.com/library/prerelease/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW18"><code>NSLocationAlwaysUsageDescription</code></a>
key to the iOS plist section of the project's <code>tiapp.xml</code> file.</p>
<pre><code><ti:app>
<ios>
<plist>
<dict>
<key>NSLocationAlwaysUsageDescription</key>
<string>
Specify the reason for accessing the user's location information.
This appears in the alert dialog when asking the user for permission to
access their location.
</string>
</dict>
</plist>
</ios>
</ti:app>
</code></pre></li>
<li><p>Instantiate the module with the <code>require('ti.map')</code> method, then make subsequent API calls with
the new map object.</p>
<pre><code>var Map = require('ti.map');
var mapview = Map.createView({mapType:Map.NORMAL_TYPE});
</code></pre></li>
</ul>
<h3>Breaking Changes</h3>
<ul>
<li>The <code>addRoute</code> method no longer accepts a dictionary as a parameter. Pass a {@link Modules.Map.Route} object instead.</li>
</ul>
* <h3>Examples</h3>
<h4>Map Example</h4>
<p>This is a basic map example that places a custom annotation on the map, and
listens for click events on the annotation.</p>
<p>In this example, a custom property (<code>myid</code>) is added to the annotation object.
While adding custom members to a Titanium object is not generally recommended,
in this case it provides a mechanism for uniquely identifying an annotation. This
can be useful, for example, if the annotations are dynamically generated
and it is not practical to identify them by title.</p>
<pre><code>var Map = require('ti.map');
var win = Titanium.UI.createWindow();
var mountainView = Map.createAnnotation({
latitude:37.390749,
longitude:-122.081651,
title:"Appcelerator Headquarters",
subtitle:'Mountain View, CA',
pincolor:Map.ANNOTATION_RED,
myid:1 // Custom property to uniquely identify this annotation.
});
var mapview = Map.createView({
mapType: Map.NORMAL_TYPE,
region: {latitude:33.74511, longitude:-84.38993,
latitudeDelta:0.01, longitudeDelta:0.01},
animate:true,
regionFit:true,
userLocation:true,
annotations:[mountainView]
});
var circle = Map.createCircle({
center: { latitude: 33.74511, longitude: -84.38993 },
radius: 1000, //1km
fillColor: "#20FF0000"
});
mapview.addCircle(circle);
win.add(mapview);
// Handle click events on any annotations on this map.
mapview.addEventListener('click', function(evt) {
Ti.API.info("Clicked " + evt.clicksource + " on " + evt.latitude + "," + evt.longitude);
});
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<p>In XML markup, use the <code>View</code> element with the <code>module</code> attribute set to <code>ti.map</code> to create an
instance of a map view, then use the <code>Annotation</code> element to define an annotation.</p>
<p>In the initializer file, load the map module and assign it to the <code>Alloy.Globals.Map</code> namespace.
This variable can be used to reference map module constants in the project, as seen in the TSS
file to assign the <code>pincolor</code> attribute.</p>
<p><code>alloy.js</code>:</p>
<pre><code>// Loads the map module, which can be referenced by Alloy.Globals.Map
Alloy.Globals.Map = require("ti.map");
</code></pre>
<p><code>app/views/index.xml</code>:</p>
<pre><code><Alloy>
<Window>
<Module id="mapview" module="ti.map" onClick="report" method="createView">
<Annotation id="appcHQ" myId="1337" />
</Module>
</Window>
</Alloy>
</code></pre>
<p><code>app/styles/index.tss</code>:</p>
<pre><code>"#mapview" : {
region : {
latitude:33.74511,
longitude:-84.38993,
latitudeDelta:0.01,
longitudeDelta:0.01
}
},
"#appcHQ" : {
latitude: 37.368122,
longitude: -121.913653,
title: "Appcelerator Headquarters",
subtitle: "San Jose, CA",
pincolor: Alloy.Globals.Map.ANNOTATION_RED
}
</code></pre>
<p><code>app/controllers/index.js</code>:</p>
<pre><code>function report(e) {
Ti.API.info("Annotation " + e.title + " clicked, ID: " + e.annotation.myID);
}
$.index.open();
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method isGooglePlayServicesAvailable
* <p>Returns a code to indicate whether Google Play Services is available on the device.</p>
* @returns {Number}One of the following status codes:
<Modules.Map.SUCCESS>, <Modules.Map.SERVICE_MISSING>,
<Modules.Map.SERVICE_VERSION_UPDATE_REQUIRED>,
<Modules.Map.SERVICE_DISABLED> or <Modules.Map.SERVICE_INVALID>.
* @platform android 3.1.1
*/
/**
* @method createAnnotation
* <p>Creates and returns an instance of {@link Modules.Map.Annotation}.</p>
* @param {Dictionary<Modules.Map.Annotation>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Map.Annotation} except those marked not-creation or read-only.</p>
* @returns {Modules.Map.Annotation}
*/
/**
* @method createCamera
* <p>Creates and returns an instance of {@link Modules.Map.Camera}.</p>
* @param {Dictionary<Modules.Map.Camera>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Map.Camera} except those marked not-creation or read-only.</p>
* @returns {Modules.Map.Camera}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method createCircle
* <p>Creates and returns an instance of {@link Modules.Map.Circle}.</p>
* @param {Dictionary<Modules.Map.Circle>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Map.Circle} except those marked not-creation or read-only.</p>
* @returns {Modules.Map.Circle}
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Modules.Map#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Modules.Map#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
/**
* @method createPolygon
* <p>Creates and returns an instance of {@link Modules.Map.Polygon}.</p>
* @param {Dictionary<Modules.Map.Polygon>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Map.Polygon} except those marked not-creation or read-only.</p>
* @returns {Modules.Map.Polygon}
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @method createPolyline
* <p>Creates and returns an instance of {@link Modules.Map.Polyline}.</p>
* @param {Dictionary<Modules.Map.Polyline>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Map.Polyline} except those marked not-creation or read-only.</p>
* @returns {Modules.Map.Polyline}
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @method createRoute
* <p>Creates and returns an instance of {@link Modules.Map.Route}.</p>
* @param {Dictionary<Modules.Map.Route>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Map.Route} except those marked not-creation or read-only.</p>
* @returns {Modules.Map.Route}
*/
/**
* @method createSnapshotter
* <p>Creates and returns an instance of {@link Modules.Map.Snapshotter}.</p>
* @param {Dictionary<Modules.Map.Snapshotter>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Map.Snapshotter} except those marked not-creation or read-only.</p>
* @returns {Modules.Map.Snapshotter}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method createStreetViewPanorama
* <p>Creates and returns an instance of {@link Modules.Map.StreetViewPanorama}.</p>
* @param {Dictionary<Modules.Map.StreetViewPanorama>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Map.StreetViewPanorama} except those marked not-creation or read-only.</p>
* @returns {Modules.Map.StreetViewPanorama}
* @platform android 5.2.0
*/
/**
* @method createView
* <p>Creates and returns an instance of {@link Modules.Map.View}.</p>
* @param {Dictionary<Modules.Map.View>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Map.View} except those marked not-creation or read-only.</p>
* @returns {Modules.Map.View}
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
/**
* @property ANNOTATION_DRAG_STATE_START
* @type Number
* @readonly
* <p>Used in the {@link Modules.Map.View#event-pinchangedragstate pinchangedragstate} event
to indicate that the user started dragging the annotation.</p>
*/
/**
* @property ANNOTATION_DRAG_STATE_END
* @type Number
* @readonly
* <p>Used in the {@link Modules.Map.View#event-pinchangedragstate pinchangedragstate} event
to indicate that the user finished moving the annotation.</p>
*/
/**
* @property ANNOTATION_GREEN
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to green via the
{@link Modules.Map.Annotation#property-pincolor} property.</p>
*/
/**
* @property ANNOTATION_BLUE
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to blue via the
{@link Modules.Map.Annotation#property-pincolor} property.</p>
* @platform android 3.1.0
*/
/**
* @property ANNOTATION_AZURE
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to azure via the
{@link Modules.Map.Annotation#property-pincolor} property.</p>
* @platform android 3.1.0
*/
/**
* @property ANNOTATION_CYAN
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to cyan via the
{@link Modules.Map.Annotation#property-pincolor} property.</p>
* @platform android 3.1.0
*/
/**
* @property ANNOTATION_MAGENTA
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to magenta via the
{@link Modules.Map.Annotation#property-pincolor} property.</p>
* @platform android 3.1.0
*/
/**
* @property ANNOTATION_ORANGE
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to orange via the
{@link Modules.Map.Annotation#property-pincolor} property.</p>
* @platform android 3.1.0
*/
/**
* @property ANNOTATION_PURPLE
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to purple via the
{@link Modules.Map.Annotation#property-pincolor} property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property ANNOTATION_ROSE
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to rose via the
{@link Modules.Map.Annotation#property-pincolor} property.</p>
* @platform android 3.1.0
*/
/**
* @property ANNOTATION_YELLOW
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to yellow via the
{@link Modules.Map.Annotation#property-pincolor} property.</p>
* @platform android 3.1.0
*/
/**
* @property ANNOTATION_VIOLET
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to violet via the
{@link Modules.Map.Annotation#property-pincolor} property.</p>
* @platform android 3.1.0
*/
/**
* @property ANNOTATION_RED
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to red via the
{@link Modules.Map.Annotation#property-pincolor} property.</p>
*/
/**
* @property SATELLITE_TYPE
* @type Number
* @readonly
* <p>Used with {@link Modules.Map.View#property-mapType mapType} to display satellite imagery of the area.</p>
*/
/**
* @property SATELLITE_FLYOVER_TYPE
* @type Number
* @readonly
* <p>Used with {@link Modules.Map.View#property-mapType mapType} to display satellite flyover imagery of the area. Available in iOS 9.0 and later.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property NORMAL_TYPE
* @type Number
* @readonly
* <p>Used with {@link Modules.Map.View#property-mapType mapType} to display a street map that shows the position of all roads and some road names.</p>
*/
/**
* @property TERRAIN_TYPE
* @type Number
* @readonly
* <p>Used with {@link Modules.Map.View#property-mapType mapType} to display the terrain that shows the position of all roads and some road names.</p>
* @platform android 3.1.0
*/
/**
* @property HYBRID_TYPE
* @type Number
* @readonly
* <p>Used with {@link Modules.Map.View#property-mapType mapType} to display a satellite image of the area with road and road name information layered on top.</p>
*/
/**
* @property HYBRID_FLYOVER_TYPE
* @type Number
* @readonly
* <p>Used with {@link Modules.Map.View#property-mapType mapType} to display a satellite flyover image of the area with road and road name information layered on top. Available in iOS 9.0 and later.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property SUCCESS
* @type Number
* @readonly
* <p>Code returned from {@link Modules.Map#method-isGooglePlayServicesAvailable}. Google Play services is available, and the connection is successful.</p>
* @platform android 3.1.0
*/
/**
* @property SERVICE_MISSING
* @type Number
* @readonly
* <p>Code returned from {@link Modules.Map#method-isGooglePlayServicesAvailable}. Google Play services is not installed on the device.</p>
* @platform android 3.1.0
*/
/**
* @property SERVICE_VERSION_UPDATE_REQUIRED
* @type Number
* @readonly
* <p>Code returned from {@link Modules.Map#method-isGooglePlayServicesAvailable}. Google Play services is out of date.</p>
* @platform android 3.1.0
*/
/**
* @property SERVICE_DISABLED
* @type Number
* @readonly
* <p>Code returned from {@link Modules.Map#method-isGooglePlayServicesAvailable}. Google Play services has been disabled on this device.</p>
* @platform android 3.1.0
*/
/**
* @property SERVICE_INVALID
* @type Number
* @readonly
* <p>Code returned from {@link Modules.Map#method-isGooglePlayServicesAvailable}. The version of Google Play services installed on this device is not authentic.</p>
* @platform android 3.1.0
*/
/**
* @property OVERLAY_LEVEL_ABOVE_LABELS
* @type Number
* @readonly
* <p>Place the overlay above roadways but below map labels, shields, or point-of-interest icons. Available in iOS 7.0 and later.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property OVERLAY_LEVEL_ABOVE_ROADS
* @type Number
* @readonly
* <p>Place the overlay above map labels, shields, or point-of-interest icons but below annotations and 3D projections of buildings.
Available in iOS 7.0 and later.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @class Modules.Map.Polygon
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/Polygon.yml
* <p>Represents a bounded area on the map.</p>
* @description <p>The <code>Polygon</code> object gives you low-level control over polygons that can be added to a
{@link Modules.Map.View map view}. A polygon must have its <code>points</code> property set to appear on a map.</p>
<p>Use the {@link Modules.Map#method-createPolygon} method to create a polygon.</p>
*/
/**
* @method getPoints
* <p>Gets the value of the {@link Modules.Map.Polygon#property-points} property.</p>
* @returns {MapPointType[]}
*/
/**
* @method setPoints
* <p>Sets the value of the {@link Modules.Map.Polygon#property-points} property.</p>
* @param {Array<MapPointType>} points
<p>New value for the property.</p>
*/
/**
* @method getHoles
* <p>Gets the value of the {@link Modules.Map.Polygon#property-holes} property.</p>
* @returns {MapPointType[][]}
*/
/**
* @method setHoles
* <p>Sets the value of the {@link Modules.Map.Polygon#property-holes} property.</p>
* @param {Array<Array<MapPointType>>} holes
<p>New value for the property.</p>
*/
/**
* @method getFillColor
* <p>Gets the value of the {@link Modules.Map.Polygon#property-fillColor} property.</p>
* @returns {String}
*/
/**
* @method setFillColor
* <p>Sets the value of the {@link Modules.Map.Polygon#property-fillColor} property.</p>
* @param {String} fillColor
<p>New value for the property.</p>
*/
/**
* @method getStrokeColor
* <p>Gets the value of the {@link Modules.Map.Polygon#property-strokeColor} property.</p>
* @returns {String}
*/
/**
* @method setStrokeColor
* <p>Sets the value of the {@link Modules.Map.Polygon#property-strokeColor} property.</p>
* @param {String} strokeColor
<p>New value for the property.</p>
*/
/**
* @method getStrokeWidth
* <p>Gets the value of the {@link Modules.Map.Polygon#property-strokeWidth} property.</p>
* @returns {Number}
*/
/**
* @method setStrokeWidth
* <p>Sets the value of the {@link Modules.Map.Polygon#property-strokeWidth} property.</p>
* @param {Number} strokeWidth
<p>New value for the property.</p>
*/
/**
* @method getZIndex
* <p>Gets the value of the {@link Modules.Map.Polygon#property-zIndex} property.</p>
* @returns {Number}
* @platform android 4.1.0
*/
/**
* @method setZIndex
* <p>Sets the value of the {@link Modules.Map.Polygon#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
* @platform android 4.1.0
*/
/**
* @property points
* @type MapPointType[]
* @creationOnly
* <p>Array of map points making up the polygon. Can also be an array of longitude, latitude touples.</p>
*/
/**
* @property holes
* @type MapPointType[][]
* @creationOnly
* <p>Array of points arrays that define holes in the polygon.</p>
*/
/**
* @property [fillColor=black]
* @type String
* <p>Color to use when shading the polygon, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property [strokeColor=black]
* @type String
* <p>Color to use for the border of the polygon, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property [strokeWidth=10]
* @type Number
* <p>Line width in pixels to use when drawing the polygon.</p>
*/
/**
* @property zIndex
* @type Number
* @creationOnly
* <p>The order (depth) in which to display the polygons.</p>
* @description <p>For iOS, the polygons are drawn in the order in which they are added.</p>
* @platform android 4.1.0
*/
/**
* @class Modules.Map.Polyline
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/Polyline.yml
* <p>Represents a bounded area on the map.</p>
* @description <p>The <code>Polyline</code> object gives you low-level control over polylines that can be added to a
{@link Modules.Map.View map view}. A polyline must have its <code>points</code> property set to appear on a map.</p>
<p>Use the {@link Modules.Map#method-createPolyline} method to create a polyline.</p>
*/
/**
* @method getPoints
* <p>Gets the value of the {@link Modules.Map.Polyline#property-points} property.</p>
* @returns {MapPointType[]}
*/
/**
* @method setPoints
* <p>Sets the value of the {@link Modules.Map.Polyline#property-points} property.</p>
* @param {Array<MapPointType>} points
<p>New value for the property.</p>
*/
/**
* @method getStrokeColor
* <p>Gets the value of the {@link Modules.Map.Polyline#property-strokeColor} property.</p>
* @returns {String}
*/
/**
* @method setStrokeColor
* <p>Sets the value of the {@link Modules.Map.Polyline#property-strokeColor} property.</p>
* @param {String} strokeColor
<p>New value for the property.</p>
*/
/**
* @method getStrokeWidth
* <p>Gets the value of the {@link Modules.Map.Polyline#property-strokeWidth} property.</p>
* @returns {Number}
*/
/**
* @method setStrokeWidth
* <p>Sets the value of the {@link Modules.Map.Polyline#property-strokeWidth} property.</p>
* @param {Number} strokeWidth
<p>New value for the property.</p>
*/
/**
* @method getZIndex
* <p>Gets the value of the {@link Modules.Map.Polyline#property-zIndex} property.</p>
* @returns {Number}
* @platform android 4.1.0
*/
/**
* @method setZIndex
* <p>Sets the value of the {@link Modules.Map.Polyline#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
* @platform android 4.1.0
*/
/**
* @property points
* @type MapPointType[]
* @creationOnly
* <p>Array of map points making up the polyline. Can also be an array of longitude, latitude touples.</p>
*/
/**
* @property [strokeColor=black]
* @type String
* <p>Color to use for the the polyline, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property [strokeWidth=10]
* @type Number
* <p>Line width in pixels to use when drawing the polyline.</p>
*/
/**
* @property zIndex
* @type Number
* @creationOnly
* <p>The order (depth) in which to display the polylines.</p>
* @description <p>For iOS, the polylines are drawn in the order in which they are added.</p>
* @platform android 4.1.0
*/
/**
* @class Modules.Map.Route
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/Route.yml
* <p>Represents a path between two or more points of interest.</p>
* @description <p>The <code>Route</code> object gives you low-level control over routes that can be added to a
{@link Modules.Map.View map view}. A route must have its <code>points</code> property set to appear on a map.</p>
<p>Use the {@link Modules.Map#method-createRoute} method to create a route.</p>
<h3>iOS Platform Notes</h3>
<p>The <code>addRoute</code> method no longer accepts a dictionary as a parameter. Pass a {@link Modules.Map.Route} object instead.</p>
*/
/**
* @method getPoints
* <p>Gets the value of the {@link Modules.Map.Route#property-points} property.</p>
* @returns {MapPointType[]}
*/
/**
* @method setPoints
* <p>Sets the value of the {@link Modules.Map.Route#property-points} property.</p>
* @param {Array<MapPointType>} points
<p>New value for the property.</p>
*/
/**
* @method getColor
* <p>Gets the value of the {@link Modules.Map.Route#property-color} property.</p>
* @returns {String}
*/
/**
* @method setColor
* <p>Sets the value of the {@link Modules.Map.Route#property-color} property.</p>
* @param {String} color
<p>New value for the property.</p>
*/
/**
* @method getWidth
* <p>Gets the value of the {@link Modules.Map.Route#property-width} property.</p>
* @returns {Number}
*/
/**
* @method setWidth
* <p>Sets the value of the {@link Modules.Map.Route#property-width} property.</p>
* @param {Number} width
<p>New value for the property.</p>
*/
/**
* @method getLevel
* <p>Gets the value of the {@link Modules.Map.Route#property-level} property.</p>
* @returns {Number}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setLevel
* <p>Sets the value of the {@link Modules.Map.Route#property-level} property.</p>
* @param {Number} level
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property points
* @type MapPointType[]
* @creationOnly
* <p>Array of map points making up the route.</p>
*/
/**
* @property [color=black]
* @type String
* <p>Color to use when drawing the route, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
<p><strong>iOS Note:</strong> Changing the color of an existing route will only work on iOS 7 and later </p>
*/
/**
* @property [width=10]
* @type Number
* <p>Line width in pixels to use when drawing the route.</p>
* @description <p><strong>iOS Note:</strong> Changing the width of an existing route will only work on iOS 7 and later</p>
*/
/**
* @property [level={@link Modules.Map#property-OVERLAY_LEVEL_ABOVE_LABELS}]
* @type Number
* @creationOnly
* <p>The map level at which to place the route. Available in iOS 7.0 and later.</p>
* @description <p>Specify one of the following levels:
{@link Modules.Map#property-OVERLAY_LEVEL_ABOVE_LABELS},
{@link Modules.Map#property-OVERLAY_LEVEL_ABOVE_ROADS}.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @class Modules.Map.Snapshotter
* @platform iphone 6.0.0
* @platform ipad 6.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/Snapshotter.yml
* <p>Snapshotter is used to allow screen shots to be taken of a specified region or a mapview.</p>
* <h3>Examples</h3>
<h4>Taking a simple snapshot</h4>
<pre><code>var MapModule = require('ti.map');
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var Snapshotter = MapModule.createSnapshotter({
mapType: MapModule.HYBRID_TYPE,
region: {
latitude: 37.3382,
longitude: -121.8863,
latitudeDelta: 0.4,
longitudeDelta: 0.4
},
size: {
width: 300,
height: 200
}
});
Snapshotter.takeSnapshot({
success: function(e) {
var imageView = Ti.UI.createImageView({
image: e.image
});
win.add(imageView);
},
error: function(e) {
Ti.API.error("The snapshot could not be taken: " + e.error);
}
});
win.open();</code></pre>
*/
/**
* @method takeSnapshot
* <p>Takes a snap shot of of the map corresponding to the region property or a snap of the mapView if
passed in as a second parameter.</p>
* @param {Callback<Titanium.Blob>} success
<p>Function to be called upon successful completion.</p>
* @param {Callback} error
<p>Function to call upon receiving an error.</p>
* @returns {Titanium.Blob}
*/
/**
* @method getRegion
* <p>Gets the value of the {@link Modules.Map.Snapshotter#property-region} property.</p>
* @returns {MapRegionTypev2<Modules.Map.View.MapRegionTypev2>}
*/
/**
* @method setRegion
* <p>Sets the value of the {@link Modules.Map.Snapshotter#property-region} property.</p>
* @param {MapRegionTypev2<Modules.Map.View.MapRegionTypev2>} region
<p>New value for the property.</p>
*/
/**
* @method getShowsPointsOfInterest
* <p>Gets the value of the {@link Modules.Map.Snapshotter#property-showsPointsOfInterest} property.</p>
* @returns {Boolean}
*/
/**
* @method setShowsPointsOfInterest
* <p>Sets the value of the {@link Modules.Map.Snapshotter#property-showsPointsOfInterest} property.</p>
* @param {Boolean} showsPointsOfInterest
<p>New value for the property.</p>
*/
/**
* @method getSize
* <p>Gets the value of the {@link Modules.Map.Snapshotter#property-size} property.</p>
* @returns {SnapshotSize}
*/
/**
* @method setSize
* <p>Sets the value of the {@link Modules.Map.Snapshotter#property-size} property.</p>
* @param {SnapshotSize} size
<p>New value for the property.</p>
*/
/**
* @method getMapType
* <p>Gets the value of the {@link Modules.Map.Snapshotter#property-mapType} property.</p>
* @returns {Number}
*/
/**
* @method setMapType
* <p>Sets the value of the {@link Modules.Map.Snapshotter#property-mapType} property.</p>
* @param {Number} mapType
<p>New value for the property.</p>
*/
/**
* @method getShowsBuildings
* <p>Gets the value of the {@link Modules.Map.Snapshotter#property-showsBuildings} property.</p>
* @returns {Boolean}
*/
/**
* @method setShowsBuildings
* <p>Sets the value of the {@link Modules.Map.Snapshotter#property-showsBuildings} property.</p>
* @param {Boolean} showsBuildings
<p>New value for the property.</p>
*/
/**
* @property region
* @type MapRegionTypev2<Modules.Map.View.MapRegionTypev2>
* <p>A dictionary specifying the location and zoom level of the map.</p>
*/
/**
* @property [showsPointsOfInterest=true]
* @type Boolean
* <p>When this property is set to YES, the map displays icons and labels for
restaurants, schools, and other relevant points of interest.</p>
*/
/**
* @property size
* @type SnapshotSize
* <p>A dictionary specifying the width and height of the snapshot.</p>
*/
/**
* @property [mapType=NORMAL_TYPE]
* @type Number
* <p>Map type constant, either {@link Modules.Map#property-NORMAL_TYPE}, {@link Modules.Map#property-SATELLITE_TYPE},
{@link Modules.Map#property-TERRAIN_TYPE}, {@link Modules.Map#property-HYBRID_TYPE}, {@link Modules.Map#property-HYBRID_FLYOVER_TYPE} or
{@link Modules.Map#property-SATELLITE_FLYOVER_TYPE}.</p>
*/
/**
* @property [showsBuildings=true]
* @type Boolean
* <p>Determines whether building will be shown on the map. The mapType property must be set
to <Modules.Map.STANDARD_TYPE> for extruded buildings to be displayed.</p>
*/
/**
* @class SnapshotSize
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
* @platform mobileweb 6.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/Snapshotter.yml
* <p>Simple dictionary used as an argument to {@link Modules.Map.Snapshotter#method-setSize setSize}.</p>
*/
/**
* @property height
* @type Number
* <p>The height the be used for the snapshot.</p>
*/
/**
* @property width
* @type Number
* <p>The height the be used for the snapshot.</p>
*/
/**
* @class Modules.Map.StreetViewPanorama
* @platform android 5.2.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/StreetViewPanorama.yml
* <p>Provides panoramic 360-degree views from designated roads throughout its coverage area.</p>
* @description <p>Each street view panorama is an image, or set of images, that provides a full 360-degree view from
a single location. It provides a viewer that renders the panorama as a sphere with a camera at its center.
A window can only contain one street view.</p>
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method getPosition
* <p>Gets the value of the {@link Modules.Map.StreetViewPanorama#property-position} property.</p>
* @returns {StreetViewPosition}
*/
/**
* @method setPosition
* <p>Sets the value of the {@link Modules.Map.StreetViewPanorama#property-position} property.</p>
* @param {StreetViewPosition} position
<p>New value for the property.</p>
*/
/**
* @method getPanning
* <p>Gets the value of the {@link Modules.Map.StreetViewPanorama#property-panning} property.</p>
* @returns {Boolean}
*/
/**
* @method setPanning
* <p>Sets the value of the {@link Modules.Map.StreetViewPanorama#property-panning} property.</p>
* @param {Boolean} panning
<p>New value for the property.</p>
*/
/**
* @method getZoom
* <p>Gets the value of the {@link Modules.Map.StreetViewPanorama#property-zoom} property.</p>
* @returns {Boolean}
*/
/**
* @method setZoom
* <p>Sets the value of the {@link Modules.Map.StreetViewPanorama#property-zoom} property.</p>
* @param {Boolean} zoom
<p>New value for the property.</p>
*/
/**
* @method getStreetNames
* <p>Gets the value of the {@link Modules.Map.StreetViewPanorama#property-streetNames} property.</p>
* @returns {Boolean}
*/
/**
* @method setStreetNames
* <p>Sets the value of the {@link Modules.Map.StreetViewPanorama#property-streetNames} property.</p>
* @param {Boolean} streetNames
<p>New value for the property.</p>
*/
/**
* @method getUserNavigation
* <p>Gets the value of the {@link Modules.Map.StreetViewPanorama#property-userNavigation} property.</p>
* @returns {Boolean}
*/
/**
* @method setUserNavigation
* <p>Sets the value of the {@link Modules.Map.StreetViewPanorama#property-userNavigation} property.</p>
* @param {Boolean} userNavigation
<p>New value for the property.</p>
*/
/**
* @property position
* @type StreetViewPosition
* <p>A dictionary specifying the position of the street view.</p>
*/
/**
* @property [panning=true]
* @type Boolean
* <p>Determines whether the user is able to re-orient the camera by dragging.</p>
*/
/**
* @property [zoom=true]
* @type Boolean
* <p>Determines whether the user is able to pinch to zoom.</p>
*/
/**
* @property [streetNames=true]
* @type Boolean
* <p>Determines whether the user is able to see street names displayed.</p>
*/
/**
* @property [userNavigation=true]
* @type Boolean
* <p>Determines whether the user is able to move to a different panorama.</p>
* @description <p>If <code>true</code>, users can use a single tap on navigation links, or double tap the
view, to move to a new panorama. </p>
*/
/**
* @class StreetViewPosition
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform mobileweb 5.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/StreetViewPanorama.yml
* <p>Simple object representing a street view coordinates.</p>
*/
/**
* @property [longitude=0]
* @type Number
* <p>Longitude value for the center point of the view, in decimal degrees.</p>
*/
/**
* @property [latitude=0]
* @type Number
* <p>Latitude value for the center point of the view, in decimal degrees.</p>
*/
/**
* @class Modules.Map.View
* @platform android 3.1.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/View.yml
* <p>Map view is used for embedding native mapping capabilities as a view in your application.</p>
* @description <p>With native maps, you can control the mapping location, the type of map, the zoom level
and you can add custom annotations and routes directly to the map. Once the map view is
displayed, the user can pan, zoom and tilt the map using the native control gestures.</p>
<p>Use the {@link Modules.Map#method-createView} method to create a map view.</p>
<p>In Alloy, use the <strong><code><Module></code></strong> element with the <code>module</code> attribute set to <code>ti.map</code>
and <code>method</code> attribute set to <code>createView</code> to create a map view in XML markup:</p>
<pre><code><Module module="ti.map" method="createView" />
</code></pre>
<p>All latitude and longitude values are specified in decimal degrees. Values in degrees,
minutes and seconds (DMS) must be converted to decimal degrees before being passed to
the map view.</p>
<p>You can add {@link Modules.Map.Annotation Annotation} objects to the map to mark points of
interest. An annotation has two states: selected and deselected. A deselected annotation
is marked by a pin image. When selected, the full annotation is displayed, typically
including a title and an optional subtitle.</p>
<p>You can add {@link Modules.Map.Route Route} objects to the map to create paths between
two or more points of interest.</p>
<p>To use the <code>userLocation</code> property in iOS 8 and later, add either the
<a href="https://developer.apple.com/library/prerelease/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW26"><code>NSLocationWhenInUseUsageDescription</code></a>
or
<a href="https://developer.apple.com/library/prerelease/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW18"><code>NSLocationAlwaysUsageDescription</code></a>
key to the iOS plist section of the project's <code>tiapp.xml</code> file.</p>
<pre><code><ti:app>
<ios>
<plist>
<dict>
<key>NSLocationAlwaysUsageDescription</key>
<string>
Specify the reason for accessing the user's location information.
This appears in the alert dialog when asking the user for permission to
access their location.
</string>
</dict>
</plist>
</ios>
</ti:app>
</code></pre>
*/
/**
* @event longclick
* <p>Fired when the user makes a long-press gesture on the map.</p>
* @description <p>A long press is generated by touching and holding on the touch screen.</p>
<p>The event occurs before the finger/button is lifted.</p>
<p>The <code>longclick</code> event returns longitude and latitude of the point on the ground that was pressed.</p>
* @param {Number} latitude
<p>latitude of the point on the ground that was pressed.</p>
* @param {Number} longitude
<p>longitude of the point on the ground that was pressed.</p>
* @param {Modules.Map.View} map
<p>The map view instance.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.2.0
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event click
* <p>Fired when the user selects or deselects an annotation, a polygon, a polyline or a circle.</p>
* @description <p>Note that the <code>click</code> event is not fired every time the user clicks on the map.
It is fired in two circumstances:</p>
<ul>
<li>The user clicks on the annotation. This will select the annotation.</li>
<li>The user deselects an annotation either by clicking on the map or another annotation.</li>
<li>The user clicks on a polygon, a polyline or a circle.</li>
</ul>
<p>Note that only one annotation can be selected at any given time.</p>
<p>The <code>click</code> event includes a value, <code>clicksource</code>, which describes the part of the annotation that was clicked. The <code>clicksource</code> can be one of <code>pin</code>, <code>leftButton</code> or <code>rightButton</code> on iOS and pin<code>,</code>title<code>,</code>subtitle<code>,</code>leftPane<code>,</code>rightPane<code>,</code>infoWindow<code>or</code>null<code>on Android. If the user deselects an annotation
by clicking on the pin,</code>clicksource<code>is</code>pin<code>. If the user deselects the
annotation by clicking elsewhere in the map view,</code>clicksource<code>is</code>map`.</p>
<p>For polygon, polyline or circle, The <code>click</code> event includes the following values.
<code>clicksource</code> is a string describing the shape type. <code>map</code> is the map view instance.
<code>latitude</code> and <code>longtitude</code> is the corresponding coordinates on the map where the user
clicked in the shape.</p>
* @param {String} title
<p>Title of the annotation.</p>
* @param {String} subtitle
<p>Subtitle of the annotation.</p>
* @param {Modules.Map.View} map
<p>The map view instance.</p>
* @param {String} clicksource
<p>Source of the click event. Can be one of <code>pin</code>, <code>leftPane</code>, <code>rightPane</code>, <code>infoWindow</code> or <code>null</code>.
If it's a shape, it can be one of <code>polygon</code>, <code>polyline</code>, or <code>circle</code>. On android this also applies
for <code>title</code> and <code>subtitle</code>. </p>
* @param {Modules.Map.Annotation} annotation
<p>Annotation source object.</p>
* @param {Number} latitude
<p>Latitude of the clicked annotation or the point clicked in the polygon, polyline and circle.</p>
* @param {Number} longitude
<p>Longitude of the clicked annotation or the point clicked in the polygon, polyline and circle.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event onsnapshotready
* <p>Fired when the snapshot is ready after {@link Modules.Map.View#method-snapshot snapshot} is invoked.</p>
* @param {Titanium.Blob} snapshot
<p>snapshot of the current map</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.2.3
*/
/**
* @event pinchangedragstate
* <p>Fired when the user interacts with a draggable annotation.</p>
* @param {Modules.Map.Annotation} annotation
<p>Annotation being dragged.</p>
* @param {Modules.Map.View} map
<p>This map view.</p>
* @param {String} title
<p>Annotation title.</p>
* @param {Number} newState
<p>New drag state for the annotation, one of
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_NONE ANNOTATION_DRAG_STATE_NONE},
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_START ANNOTATION_DRAG_STATE_START},
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_DRAG ANNOTATION_DRAG_STATE_DRAG},
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_CANCEL ANNOTATION_DRAG_STATE_CANCEL} or
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_END ANNOTATION_DRAG_STATE_END}.</p>
* @param {Number} oldState
<p>Previous drag state for the annotation, one of
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_NONE ANNOTATION_DRAG_STATE_NONE},
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_START ANNOTATION_DRAG_STATE_START},
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_DRAG ANNOTATION_DRAG_STATE_DRAG},
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_CANCEL ANNOTATION_DRAG_STATE_CANCEL} or
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_END ANNOTATION_DRAG_STATE_END}.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event complete
* <p>Fired when the map completes loading.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event regionwillchange
* <p>Fired when the mapping region will change.</p>
* @param {Number} longitude
<p>Longitude value for the center point of the map, in decimal degrees.</p>
* @param {Number} latitude
<p>Latitude value for the center point of the map, in decimal degrees.</p>
* @param {Number} longitudeDelta
<p>The amount of east-to-west distance displayed on the map, measured in decimal degrees.</p>
* @param {Number} latitudeDelta
<p>The amount of north-to-south distance displayed on the map, measured in decimal degrees.</p>
* @param {Boolean} (iphone ipad) animated
<p>The regionwillchange event was caused by an <code>animation</code>, such as a animating the camera.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @event regionchanged
* <p>Fired when the mapping region finished changing.</p>
* @param {Number} longitude
<p>Longitude value for the center point of the map, in decimal degrees.</p>
* @param {Number} latitude
<p>Latitude value for the center point of the map, in decimal degrees.</p>
* @param {Number} longitudeDelta
<p>The amount of east-to-west distance displayed on the map, measured in decimal degrees.</p>
* @param {Number} latitudeDelta
<p>The amount of north-to-south distance displayed on the map, measured in decimal degrees.</p>
* @param {Boolean} (iphone ipad) animated
<p>The regionchanged event was caused by an <code>animation</code>, such as a animating the camera.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method addAnnotation
* <p>Adds a new annotation to the map.</p>
* @param {Modules.Map.Annotation} annotation
<p>a {@link Modules.Map.Annotation} instance.</p>
*/
/**
* @method addAnnotations
* <p>Adds one or more new annotations to the map.</p>
* @param {Array<Modules.Map.Annotation>} annotations
<p>Array of {@link Modules.Map.Annotation Annotation} objects</p>
*/
/**
* @method addRoute
* <p>Adds a route to the map.</p>
* @param {Modules.Map.Route} route
<p>Modules.Map.Route</p>
*/
/**
* @method deselectAnnotation
* <p>Deselects the specified annotation, so the main annotation is hidden and only
a pin image is shown.</p>
* @param {String/Modules.Map.Annotation} annotation
<p>Annotation to deselect, identified by an annotation title or a {@link Modules.Map.Annotation} reference.</p>
*/
/**
* @method removeAllAnnotations
* <p>Removes all annotations from the map.</p>
*/
/**
* @method removeAnnotation
* <p>Removes an existing annotation from the map.</p>
* @param {String/Modules.Map.Annotation} annotation
<p>Annotation to remove, identified by an annotation title or a {@link Modules.Map.Annotation} reference.</p>
*/
/**
* @method removeAnnotations
* <p>Removes one or more existing annotations from the map.</p>
* @description <p>Annotations can be identified by title or by a {@link Modules.Map.Annotation}
reference.</p>
* @param {Array<String>/Array<Modules.Map.Annotation>} annotations
<p>Array of annotations to remove.</p>
*/
/**
* @method removeRoute
* <p>Remove a previously added route.</p>
* @param {Modules.Map.Route} route
<p>An instance of {@link Modules.Map.Route}</p>
*/
/**
* @method selectAnnotation
* <p>Selects the annotation, showing the full annotation.</p>
* @param {String/Modules.Map.Annotation} annotation
<p>Annotation to show, identified by an annotation title or a {@link Modules.Map.Annotation} reference.</p>
*/
/**
* @method setMapType
* <p>Sets the type of map (satellite, normal, or terrain).</p>
* @param {Number} mapType
<p>Map type constant, either {@link Modules.Map#property-NORMAL_TYPE}, {@link Modules.Map#property-SATELLITE_TYPE},
{@link Modules.Map#property-TERRAIN_TYPE}, {@link Modules.Map#property-HYBRID_TYPE}, {@link Modules.Map#property-HYBRID_FLYOVER_TYPE} or
{@link Modules.Map#property-SATELLITE_FLYOVER_TYPE}.</p>
*/
/**
* @method setLocation
* <p>Sets the map location and zoom level.</p>
* @description <p>The location is set using a simple dictionary object, described in {@link MapLocationTypeV2}. If <code>latitudeDelta</code>
and <code>longitudeDelta</code> are set, these specified parameters bound the area of interest, which is centered
and displayed at the greatest possible zoom level. This method can only be called after the map
completes loading. Before that, use {@link Modules.Map.View#property-region region} to set the map location.
For example:</p>
<pre><code> myMapView.setLocation({
latitude:37.337681, longitude:-122.038193, animate:true,
latitudeDelta:0.04, longitudeDelta:0.04});
</code></pre>
* @param {MapLocationTypeV2} location
<p>Dictionary specifying the location and the zoom level for the map.</p>
*/
/**
* @method zoom
* <p>Zooms in or out of the map.</p>
* @description <p>Zooms in or out by specifying a relative zoom level. A positive value increases
the current zoom level and a negative value decreases the zoom level.</p>
<p>Each increase in zoom level increases the magnification by a factor of two.</p>
* @param {Number} level
<p>Relative zoom level (positive to zoom in, negative to zoom out).</p>
*/
/**
* @method snapshot
* <p>Takes a snapshot of the map</p>
* @description <p>Takes a snapshot of the current map and returns the image via {@link Modules.Map.View#event-onsnapshotready onsnapshotready} event.</p>
* @platform android 3.2.3
*/
/**
* @method animateCamera
* <p>Changes the camera used for determining the map's viewing parameters and animates the change.
Available in iOS 7.0 and later.</p>
* @param {CameraAnimationParams} animationParams
<p>Properties for controlling the camera animation. The property <code>camera</code> is required.</p>
* @param {Callback<Object>} callback
<p>A method that will be called when the camera animation completes. Optionally, the completion
of camera animations can be captured by listening for a <code>regionchanged</code> event with <code>animated</code>
set to true.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method showAnnotations
* <p>Sets the visible region so that the map displays the specified annotations. If no array is passed
annotations on the map will be shown. Available in iOS 7.0 and later.</p>
* @param {Array<Modules.Map.Annotation>} annotations (optional)
<p>An array of {@link Modules.Map.Annotation} to display.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method addPolygon
* <p>Adds a new polygon to the map.</p>
* @param {Modules.Map.Polygon} polygon
<p>a {@link Modules.Map.Polygon} instance.</p>
*/
/**
* @method addPolygons
* <p>Adds one or more new polygons to the map.</p>
* @param {Array<Modules.Map.Polygon>} polygons
<p>Array of {@link Modules.Map.Polygon Polygons} objects</p>
*/
/**
* @method removePolygon
* <p>Remove a polygon from the map.</p>
* @param {Modules.Map.Polygon} polygon
<p>A {@link Modules.Map.Polygon Polygon} object</p>
*/
/**
* @method removeAllPolygons
* <p>Remove all polygons from the map.</p>
*/
/**
* @method addPolyline
* <p>Adds a new polylines to the map.</p>
* @param {Modules.Map.Polyline} polygon
<p>a {@link Modules.Map.Polyline} instance.</p>
*/
/**
* @method addPolylines
* <p>Adds one or more new polylines to the map.</p>
* @param {Array<Modules.Map.Polyline>} polylines
<p>Array of {@link Modules.Map.Polyline Polyline} objects</p>
*/
/**
* @method removePolyline
* <p>Remove a polyline from the map.</p>
* @param {Modules.Map.Polyline} polyline
<p>An {@link Modules.Map.Polyline Polyline} object</p>
*/
/**
* @method removeAllPolylines
* <p>Remove all polylines from the map.</p>
*/
/**
* @method addCircle
* <p>Adds a new circle to the map.</p>
* @param {Modules.Map.Circle} circle
<p>a {@link Modules.Map.Circle} instance.</p>
*/
/**
* @method addCircles
* <p>Adds one or more new circles to the map.</p>
* @param {Array<Modules.Map.Circle>} circles
<p>Array of {@link Modules.Map.Circle Circle} objects</p>
*/
/**
* @method removeCircle
* <p>Remove a circle from the map.</p>
* @param {Modules.Map.Circle} circle
<p>An {@link Modules.Map.Circle Circle} object</p>
*/
/**
* @method removeAllCircles
* <p>Remove all circles from the map.</p>
*/
/**
* @method getAnimate
* <p>Gets the value of the {@link Modules.Map.View#property-animate} property.</p>
* @returns {Boolean}
*/
/**
* @method setAnimate
* <p>Sets the value of the {@link Modules.Map.View#property-animate} property.</p>
* @param {Boolean} animate
<p>New value for the property.</p>
*/
/**
* @method getAnnotations
* <p>Gets the value of the {@link Modules.Map.View#property-annotations} property.</p>
* @returns {Modules.Map.Annotation[]}
*/
/**
* @method setAnnotations
* <p>Sets the value of the {@link Modules.Map.View#property-annotations} property.</p>
* @param {Array<Modules.Map.Annotation>} annotations
<p>New value for the property.</p>
*/
/**
* @method getMapType
* <p>Gets the value of the {@link Modules.Map.View#property-mapType} property.</p>
* @returns {Number}
*/
/**
* @method setMapType
* <p>Sets the value of the {@link Modules.Map.View#property-mapType} property.</p>
* @param {Number} mapType
<p>New value for the property.</p>
*/
/**
* @method getZOrderOnTop
* <p>Gets the value of the {@link Modules.Map.View#property-zOrderOnTop} property.</p>
* @returns {Boolean}
*/
/**
* @method setZOrderOnTop
* <p>Sets the value of the {@link Modules.Map.View#property-zOrderOnTop} property.</p>
* @param {Boolean} zOrderOnTop
<p>New value for the property.</p>
*/
/**
* @method getRegion
* <p>Gets the value of the {@link Modules.Map.View#property-region} property.</p>
* @returns {MapRegionTypev2}
*/
/**
* @method setRegion
* <p>Sets the value of the {@link Modules.Map.View#property-region} property.</p>
* @param {MapRegionTypev2} region
<p>New value for the property.</p>
*/
/**
* @method getUserLocation
* <p>Gets the value of the {@link Modules.Map.View#property-userLocation} property.</p>
* @returns {Boolean}
*/
/**
* @method setUserLocation
* <p>Sets the value of the {@link Modules.Map.View#property-userLocation} property.</p>
* @param {Boolean} userLocation
<p>New value for the property.</p>
*/
/**
* @method getUserLocationButton
* <p>Gets the value of the {@link Modules.Map.View#property-userLocationButton} property.</p>
* @returns {Boolean}
* @platform android 3.1.1
*/
/**
* @method setUserLocationButton
* <p>Sets the value of the {@link Modules.Map.View#property-userLocationButton} property.</p>
* @param {Boolean} userLocationButton
<p>New value for the property.</p>
* @platform android 3.1.1
*/
/**
* @method getCompassEnabled
* <p>Gets the value of the {@link Modules.Map.View#property-compassEnabled} property.</p>
* @returns {Boolean}
* @platform android 3.2.3
*/
/**
* @method setCompassEnabled
* <p>Sets the value of the {@link Modules.Map.View#property-compassEnabled} property.</p>
* @param {Boolean} compassEnabled
<p>New value for the property.</p>
* @platform android 3.2.3
*/
/**
* @method getMapToolbarEnabled
* <p>Gets the value of the {@link Modules.Map.View#property-mapToolbarEnabled} property.</p>
* @returns {Boolean}
* @platform android 6.1.0
*/
/**
* @method setMapToolbarEnabled
* <p>Sets the value of the {@link Modules.Map.View#property-mapToolbarEnabled} property.</p>
* @param {Boolean} mapToolbarEnabled
<p>New value for the property.</p>
* @platform android 6.1.0
*/
/**
* @method getEnableZoomControls
* <p>Gets the value of the {@link Modules.Map.View#property-enableZoomControls} property.</p>
* @returns {Boolean}
* @platform android 3.1.0
*/
/**
* @method setEnableZoomControls
* <p>Sets the value of the {@link Modules.Map.View#property-enableZoomControls} property.</p>
* @param {Boolean} enableZoomControls
<p>New value for the property.</p>
* @platform android 3.1.0
*/
/**
* @method getMaxZoomLevel
* <p>Gets the value of the {@link Modules.Map.View#property-maxZoomLevel} property.</p>
* @returns {Number}
* @platform android 3.2.3
*/
/**
* @method getMinZoomLevel
* <p>Gets the value of the {@link Modules.Map.View#property-minZoomLevel} property.</p>
* @returns {Number}
* @platform android 3.2.3
*/
/**
* @method getTraffic
* <p>Gets the value of the {@link Modules.Map.View#property-traffic} property.</p>
* @returns {Boolean}
* @platform android 3.1.0
*/
/**
* @method setTraffic
* <p>Sets the value of the {@link Modules.Map.View#property-traffic} property.</p>
* @param {Boolean} traffic
<p>New value for the property.</p>
* @platform android 3.1.0
*/
/**
* @method getCamera
* <p>Gets the value of the {@link Modules.Map.View#property-camera} property.</p>
* @returns {Modules.Map.Camera}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setCamera
* <p>Sets the value of the {@link Modules.Map.View#property-camera} property.</p>
* @param {Modules.Map.Camera} camera
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getPitchEnabled
* <p>Gets the value of the {@link Modules.Map.View#property-pitchEnabled} property.</p>
* @returns {Boolean}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setPitchEnabled
* <p>Sets the value of the {@link Modules.Map.View#property-pitchEnabled} property.</p>
* @param {Boolean} pitchEnabled
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getRotateEnabled
* <p>Gets the value of the {@link Modules.Map.View#property-rotateEnabled} property.</p>
* @returns {Boolean}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setRotateEnabled
* <p>Sets the value of the {@link Modules.Map.View#property-rotateEnabled} property.</p>
* @param {Boolean} rotateEnabled
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getShowsBuildings
* <p>Gets the value of the {@link Modules.Map.View#property-showsBuildings} property.</p>
* @returns {Boolean}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setShowsBuildings
* <p>Sets the value of the {@link Modules.Map.View#property-showsBuildings} property.</p>
* @param {Boolean} showsBuildings
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getShowsPointsOfInterest
* <p>Gets the value of the {@link Modules.Map.View#property-showsPointsOfInterest} property.</p>
* @returns {Boolean}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setShowsPointsOfInterest
* <p>Sets the value of the {@link Modules.Map.View#property-showsPointsOfInterest} property.</p>
* @param {Boolean} showsPointsOfInterest
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getShowsCompass
* <p>Gets the value of the {@link Modules.Map.View#property-showsCompass} property.</p>
* @returns {Boolean}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setShowsCompass
* <p>Sets the value of the {@link Modules.Map.View#property-showsCompass} property.</p>
* @param {Boolean} showsCompass
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getShowsScale
* <p>Gets the value of the {@link Modules.Map.View#property-showsScale} property.</p>
* @returns {Boolean}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setShowsScale
* <p>Sets the value of the {@link Modules.Map.View#property-showsScale} property.</p>
* @param {Boolean} showsScale
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getShowsTraffic
* <p>Gets the value of the {@link Modules.Map.View#property-showsTraffic} property.</p>
* @returns {Boolean}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setShowsTraffic
* <p>Sets the value of the {@link Modules.Map.View#property-showsTraffic} property.</p>
* @param {Boolean} showsTraffic
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property [animate=false]
* @type Boolean
* <p>Indicates if changes to the mapping region should be animated.</p>
* @description <p>Setting this to 'false' will not stop the animation from clicking the My Location button,
since that is native Android behavior.</p>
*/
/**
* @property annotations
* @type Modules.Map.Annotation[]
* <p>An array of annotations to add to the map.</p>
* @description <p>There is no guarantee that the order of elements in the <code>annotations</code> property will be
maintained when creating, adding or deleting annotations from the Ti.Map.View object.
If the application depends on the annotations being in a set order, it should keep
references to all of the annotations in a separate array.</p>
*/
/**
* @property [mapType=NORMAL_TYPE]
* @type Number
* <p>Map type constant, either {@link Modules.Map#property-NORMAL_TYPE}, {@link Modules.Map#property-SATELLITE_TYPE},
{@link Modules.Map#property-TERRAIN_TYPE}, {@link Modules.Map#property-HYBRID_TYPE}, {@link Modules.Map#property-HYBRID_FLYOVER_TYPE} or
{@link Modules.Map#property-SATELLITE_FLYOVER_TYPE}.</p>
*/
/**
* @property [zOrderOnTop=false]
* @type Boolean
* @creationOnly
* <p>Controls wether the map view's surface is placed on top of its window.</p>
* @description <p>Please refer to <a href="https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/GoogleMapOptions#zOrderOnTop%28boolean%29">zOrderOnTop</a>
for more details.</p>
*/
/**
* @property [region=latitude 0, longitude 0]
* @type MapRegionTypev2
* <p>A dictionary specifying the location and zoom level of the map.</p>
*/
/**
* @property [userLocation=false]
* @type Boolean
* <p>Boolean indicating if the user's current device location should be shown on the
map.</p>
* @description <p>If <code>true</code>, the user's location is marked with a pin, and the My Location button will appear in the top
right corner of the screen. Starting in iOS 8, permissions must be added to tiapp.xml. Details in description.</p>
*/
/**
* @property [userLocationButton=true]
* @type Boolean
* <p>Enable or disables the My Location button. If the button is enabled, it is only shown when <code>userLocation</code>
is enabled.</p>
* @description <p>If <code>true</code>, the My Location button is enabled.</p>
* @platform android 3.1.1
*/
/**
* @property [compassEnabled=true]
* @type Boolean
* <p>Enable or disables the compass button.</p>
* @platform android 3.2.3
*/
/**
* @property [mapToolbarEnabled=true]
* @type Boolean
* <p>Enable or disables the map toolbar.</p>
* @platform android 6.1.0
*/
/**
* @property [enableZoomControls=true]
* @type Boolean
* <p>Enables or disables the built-in zoom controls.</p>
* @description <p>If enabled, the zoom controls are a pair of buttons (one for zooming in, one for zooming out) that appear on the screen.
When pressed, they cause the camera to zoom in (or out) by one zoom level. If disabled, the zoom controls are not shown.</p>
* @platform android 3.1.0
*/
/**
* @property maxZoomLevel
* @type Number
* @readonly
* <p>Returns the maximum zoom level available at the current camera position.</p>
* @description <p>Returns the maximum zoom level for the current camera position.
This takes into account what map type is currently being used.
For example, satellite or terrain may have a lower max zoom level than the base map tiles.</p>
<p>This will only give the correct value after the 'complete' event is fired.</p>
* @platform android 3.2.3
*/
/**
* @property minZoomLevel
* @type Number
* @readonly
* <p>Returns the minimum zoom level available at the current camera position.</p>
* @description <p>Returns the minimum zoom level. This is the same for every location (unlike the maximum zoom level)
but may vary between devices and map sizes.</p>
<p>This will only give the correct value after the 'complete' event is fired.</p>
* @platform android 3.2.3
*/
/**
* @property [traffic=false]
* @type Boolean
* <p>Toggles the traffic layer on or off.</p>
* @description <p>Set to <code>true</code> to display the traffic layer or <code>false</code> to hide it.
This is subject to the availability of traffic data.</p>
* @platform android 3.1.0
*/
/**
* @property camera
* @type Modules.Map.Camera
* <p>The camera used for determining the appearance of the map. Available in iOS 7.0 and later.</p>
* @description <p>A camera object defines a point above the map's surface from which to view the map. Applying a camera to a map has the
effect of giving the map a 3D-like appearance. You can use a camera to rotate the map so that it is oriented to match
the user's heading or to apply a pitch angle to tilt the plane of the map.</p>
<p>Assigning a new camera to this property updates the map immediately and without animating the change. If you want to
animate changes in camera position, use the <code>animateCamera</code> method instead.</p>
<p>You must not set this property to null. To restore the map to a flat appearance, apply a camera with a pitch angle of 0,
which yields a camera looking straight down onto the map surface.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property pitchEnabled
* @type Boolean
* <p>A Boolean value indicating whether the map camera's pitch information is used. Available in iOS 7.0 and later.</p>
* @description <p>When this property is set to <code>true</code> and a valid camera is associated with the map,
the camera's pitch angle is used to tilt the plane of the map. When this property
is set to <code>false</code>, the camera's pitch angle is ignored and the map is always displayed
as if the user is looking straight down onto it.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property rotateEnabled
* @type Boolean
* <p>A Boolean value indicating whether the map camera's heading information is used. Available in iOS 7.0 and later.</p>
* @description <p>When this property is set to <code>true</code> and a valid camera is associated with the map,
the camera's heading angle is used to rotate the plane of the map around its center
point. When this property is set to <code>false</code>, the camera's heading angle is ignored and the
map is always oriented so that true north is situated at the top of the map view.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [showsBuildings=true]
* @type Boolean
* <p>A Boolean indicating whether the map displays extruded building information. Available in iOS 7.0 and later.</p>
* @description <p>When this property is set to <code>true</code> and the camera has a pitch angle greater than zero,
the map extrudes buildings so that they extend above the map plane, creating a 3D effect.
The <code>mapType</code> property must be set to {@link Modules.Map#property-NORMAL_TYPE} for extruded buildings to be displayed.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [showsPointsOfInterest=true]
* @type Boolean
* <p>A Boolean indicating whether the map displays point-of-interest information. Available in iOS 7.0 and later.</p>
* @description <p>When this property is set to <code>true</code>, the map displays icons and labels for restaurants,
schools, and other relevant points of interest.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [showsCompass=true]
* @type Boolean
* <p>A Boolean indicating whether the map displays a compass control. Available in iOS 9.0 and later.</p>
* @description <p>When this property is set to <code>true</code>, the map displays the control that lets users change the heading
orientation of the map.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property [showsScale=false]
* @type Boolean
* <p>A Boolean indicating whether the map shows scale information. Available in iOS 9.0 and later.</p>
* @description <p>When this property is set to <code>true</code>, the map displays the scale information.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property [showsTraffic=false]
* @type Boolean
* <p>A Boolean value indicating whether the map displays traffic information. Available in iOS 9.0 and later.</p>
* @description <p>The mapType property must be set to {@link Modules.Map#property-NORMAL_TYPE} or {@link Modules.Map#property-HYBRID_TYPE} for
traffic information to be shown.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @class MapRegionTypev2
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/View.yml
* <p>Simple object representing a map location and zoom level.</p>
*/
/**
* @property bearing
* @type Number
* <p>The direction in which a vertical line on the map points, measured in degrees clockwise from north.</p>
* @description <p>For more details, see <a href="https://developers.google.com/maps/documentation/android/views#the_camera_position">Google Docs</a>.
Cannot be used in conjunction with {@link MapRegionTypev2#property-longitudeDelta longitudeDelta} or {@link MapRegionTypev2#property-latitudeDelta latitudeDelta}</p>
* @platform android 3.2.3
*/
/**
* @property longitude
* @type Number
* <p>Longitude value for the center point of the map, in decimal degrees.</p>
*/
/**
* @property latitude
* @type Number
* <p>Latitude value for the center point of the map, in decimal degrees.</p>
*/
/**
* @property longitudeDelta
* @type Number
* <p>The amount of east-to-west distance displayed on the map, measured in decimal degrees.</p>
*/
/**
* @property latitudeDelta
* @type Number
* <p>The amount of north-to-south distance displayed on the map, measured in decimal degrees.</p>
*/
/**
* @property tilt
* @type Number
* <p>The camera's position on an arc between directly over the map's center position and the surface of the Earth, measured in degrees from the nadir.</p>
* @description <p>For more details, see <a href="https://developers.google.com/maps/documentation/android/views#the_camera_position">Google Docs</a>.
Cannot be used in conjunction with {@link MapRegionTypev2#property-longitudeDelta longitudeDelta} or {@link MapRegionTypev2#property-latitudeDelta latitudeDelta}</p>
* @platform android 3.2.3
*/
/**
* @property zoom
* @type Number
* <p>The zoom level of the map.</p>
* @description <p>For more details, see <a href="https://developers.google.com/maps/documentation/android/views#zoom">Google Docs</a>.
Cannot be used in conjunction with {@link MapRegionTypev2#property-longitudeDelta longitudeDelta} or {@link MapRegionTypev2#property-latitudeDelta latitudeDelta}</p>
* @platform android 3.2.3
*/
/**
* @class MapLocationTypeV2
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/View.yml
* <p>Simple object used as an argument to {@link Modules.Map.View#method-setLocation setLocation}.</p>
*/
/**
* @property longitude
* @type Number
* <p>Longitude value for the center point of the map, in decimal degrees.</p>
*/
/**
* @property latitude
* @type Number
* <p>Latitude value for the center point of the map, in decimal degrees.</p>
*/
/**
* @property longitudeDelta
* @type Number
* <p>The amount of east-to-west distance displayed on the map, measured in decimal degrees.</p>
*/
/**
* @property latitudeDelta
* @type Number
* <p>The amount of north-to-south distance displayed on the map, measured in decimal degrees.</p>
*/
/**
* @property animate
* @type Boolean
* <p>Set to <code>true</code> to animate the move to the new location.</p>
* @description <p>If not set, the value of {@link Modules.Map.View#property-animate animate} will be used.</p>
*/
/**
* @class CameraAnimationParams
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform mobileweb 3.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.map/edit/master/apidoc/View.yml
* <p>Simple object used to control camera animations.</p>
*/
/**
* @property camera
* @type Modules.Map.Annotation
* <p>{@link Modules.Map.Camera} to be animated to.</p>
*/
/**
* @property duration
* @type Number
* <p>The amount of time (in milliseconds) that the animation will last.</p>
*/
/**
* @property curve
* @type Number
* <p>Animation curve or easing function to apply to the animation.</p>
* @description <p>Specify one of the animation constants,
{@link Titanium.UI#property-ANIMATION_CURVE_EASE_IN},
{@link Titanium.UI#property-ANIMATION_CURVE_EASE_IN_OUT},
{@link Titanium.UI#property-ANIMATION_CURVE_EASE_OUT},
or {@link Titanium.UI#property-ANIMATION_CURVE_LINEAR}.</p>
*/
/**
* @class Modules.Facebook
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/Facebook.yml
* <p>Add-on Facebook module.</p>
* @description <p>The Facebook module is used for connecting your application with
Facebook. This module supports the following features:</p>
<ul>
<li><p>Logging in to Facebook and authorizing your application with either the
{@link Modules.Facebook.LoginButton Login button} or programatically.</p></li>
<li><p>Making requests through the Facebook Graph API using the
{@link Modules.Facebook#method-requestWithGraphPath requestWithGraphPath()} method.</p></li>
<li><p>Sharing content using Facebook dialogs or the {@link Modules.Facebook.LikeButton Like button}.</p></li>
</ul>
<p><strong>Using Ti.Facebook with iOS 10 and Xcode 8</strong>
To log in using Facebook on iOS Simulator, you now must include an entitlements file that enables Keychain
Sharing Capabilities. While the entitlements file is not necessary for device build (it is self-generated),
it won't affect anything in your build. To do so, create a <code>/platform/ios/name.entitlements</code> file (replace
name with the name element in tiapp.xml) with this content:</p>
<pre><code> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>keychain-access-groups</key>
<array>
<!-- APP_ID same as the id value in the tiapp.xml file -->
<string>$(AppIdentifierPrefix)APP_ID</string>
</array>
</dict>
</plist>
</code></pre>
<p><strong>Note:</strong> As of April 30th, 2015, Facebook no longer supports version 1.0 of their API, which
includes the FQL and REST APIs. Only the Graph APIs will be supported.</p>
<p><strong>Migration from the Facebook module v4.x to v5.x</strong></p>
<ul>
<li><p><strong>dialog() method</strong> -- {@link Modules.Facebook#method-presentWebShareDialog presentWebShareDialog()} is
deprecated and removed. The module will auto determine if you have a native Facebook App installed.
{@link Modules.Facebook#property-canPresentShareDialog canPresentShareDialog()} is also deprecated and removed.
For more details, see 'Share Dialogs' and 'Request Dialogs' below.</p></li>
<li><p><strong>presentShareDialog() method</strong> -- 'name' parameter is deprecated and replaced with 'title'.
'caption' parameter is deprecated and removed.</p></li>
<li><p><strong>presentSendRequestDialog() method</strong> -- 'to' parameter is deprecated and replaced with 'recipients'.
There are a few new parameters as well, for more details,
see {@link Modules.Facebook#method-presentSendRequestDialog presentSendRequestDialog()}</p></li>
</ul>
<p>The following APIs were removed due to changes in the native Facebook SDKs and
removal of the Facebook v1.0 REST APIs:</p>
<ul>
<li><strong>appid property</strong> -- The Facebook application ID can no longer be set programmatically
in the application. Set the Facebook application ID in the <code>tiapp.xml</code> file.
For more details, see 'Getting Started' below for more details.
<strong>Migration from the Facebook module v3.x to v4.x</strong></li>
</ul>
<p>The following APIs were removed due to changes in the native Facebook SDKs and
removal of the Facebook v1.0 REST APIs:</p>
<ul>
<li><p><strong>appid property</strong> -- The Facebook application ID can no longer be set programmatically
in the application. Set the Facebook application ID in the <code>tiapp.xml</code> file.
For more details, see 'Getting Started' below for more details.</p></li>
<li><p><strong>dialog() method</strong> -- Use either
{@link Modules.Facebook#method-presentSendRequestDialog presentSendRequestDialog()},
{@link Modules.Facebook#method-presentInviteDialog presentInviteDialog()},
{@link Modules.Facebook#method-presentMessengerDialog presentMessengerDialog()},
{@link Modules.Facebook#method-presentShareDialog presentShareDialog()} or
{@link Modules.Facebook#method-presentWebShareDialog presentWebShareDialog()}.
For more details, see 'Share Dialogs' and 'Request Dialogs' below.</p></li>
<li><p><strong>forceDialogAuth property</strong> -- On Android, you can force dialog authorization with the
{@link Modules.Facebook.LoginButton#property-sessionLoginBehavior LoginButton.sessionLoginBehavior} property.</p></li>
<li><p><strong>publishInstall() method</strong> -- The underlying Facebook API has been deprecated and
is now handled automatically by the module.</p></li>
<li><p><strong>request() method</strong> -- Due to the removal of the Facebook v1.0 APIs,
all applications should call the Graph APIs instead. If you make any REST API calls
with the <code>request()</code> method, transition to the Graph APIs and use the
{@link Modules.Facebook#method-requestWithGraphPath requestWithGraphPath()} method.</p></li>
<li><p><strong>reauthorize() method</strong> -- To request additional Facebook permissions once the
user authorizes the application, use either the
{@link Modules.Facebook#method-requestNewReadPermissions requestNewReadPermissions()} or
{@link Modules.Facebook#method-requestNewPublishPermissions requestNewPublishPermissions()}.
For more details, see "Manage Read and Write Permissions" below.</p></li>
<li><p><strong>LoginButton style property</strong> -- Facebook redesigned its Login button and the
style can no longer be changed.</p></li>
</ul>
<h2>Getting Started</h2>
<p>To use the Facebook module, you need a Facebook application. To create a Facebook App,
go to the Facebook Developer App: <a href="https://developers.facebook.com/apps">developers.facebook.com/apps</a>.</p>
<ul>
<li><p>Edit the <code>modules</code> section of your tiapp.xml file to include this module:</p>
<pre><code><modules>
<!-- Add the appropriate line(s) to your modules section -->
<module platform="android">facebook</module>
<module platform="iphone">facebook</module>
</modules>
</code></pre></li>
<li><p>Instantiate the module with the <code>require('facebook')</code> method, then make subsequent API calls
with the new Facebook object.</p>
<pre><code> var fb = require('facebook');
fb.permissions = [FACEBOOK_APP_PERMISSIONS];
fb.initialize();
fb.authorize();
</code></pre></li>
</ul>
<h3>Additional iOS Setup Steps</h3>
<p>For the iOS platform, in the <code>ios plist dict</code> section of your <code>tiapp.xml</code> file, add the following keys:</p>
<ul>
<li><code>FacebookAppID</code> key with your Facebook App ID as the string value</li>
<li><code>FacebookDisplayName</code> key with your Facebook App name (the one from <code>developer.facebook.com</code>) as the string value</li>
<li><code>CFBundleURLTypes</code> key with a single-element array containing a dict as the value, where the dict contains:
<ul><li><code>CFBundleURLName</code> key with the application app ID (same value as the <code>id</code> in the <code>tiapp.xml</code> file) as the string value</li>
<li><code>CFBundleURLSchemes</code> key with a single-element array containing the Facebook App ID prefixed with <code>fb</code> as a string value</li></ul></li>
</ul>
<p>For example:</p>
<pre><code> <ti:app>
<ios>
<plist>
<dict>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<!-- Application ID same as the id value in the tiapp.xml file -->
<string>APP_ID</string>
<key>CFBundleURLSchemes</key>
<array>
<!-- Prefix the Facebook App ID with 'fb' -->
<string>fbFACEBOOK_APP_ID</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<!-- Facebook App ID -->
<string>FACEBOOK_APP_ID</string>
<key>FacebookDisplayName</key>
<!-- Facebook App Name from developer.facebook.com -->
<string>FACEBOOK_APP_NAME</string>
</dict>
</plist>
</ios>
</ti:app>
</code></pre>
<p>To enable the use of Facebook dialogs (e.g., Login, Share), you also need to include the following key and values in <code>tiapp.xml</code>
to handle the switching in and out of your app:</p>
<pre><code><key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
</code></pre>
<p>If you are using the older Ti.Facebook Module 4.0.5 and wish to support iOS9, you will instead need to include the following key
and values in <code>tiapp.xml</code> to handle the switching in and out of your app:</p>
<p><key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fbapi20130214</string>
<string>fbapi20130410</string>
<string>fbapi20130702</string>
<string>fbapi20131010</string>
<string>fbapi20131219</string>
<string>fbapi20140410</string>
<string>fbapi20140116</string>
<string>fbapi20150313</string>
<string>fbapi20150629</string>
<string>fbauth</string>
<string>fbauth2</string>
<string>fb-messenger-api20140430</string>
</array></p>
<p>For iOS9 and titanium 5.0.0.GA and above, App Transport Security is disabled by default.
If you choose to enable it, you have to set the following keys and values in <code>tiapp.xml</code> <ios> section for facebook module:</p>
<pre><code><key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>facebook.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>fbcdn.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>akamaihd.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
</code></pre>
<h3>Additional Android Setup Steps</h3>
<p>Since Facebook module v4.0.0, for the Android platform, you need to:</p>
<ul>
<li>Add the Facebook Login activity to the Android manifest</li>
<li>Add the Facebook App ID to the Android resources <code>string.xml</code> file</li>
<li>Create a Facebook proxy and associate it with the current active activity</li>
</ul>
<p><strong>Modify the Android Manifest</strong></p>
<p>Add the Facebook Login activity to the <code>android manifest</code> section of your <code>tiapp.xml</code> file.
You may need to add the <code>manifest</code> and <code>application</code> elements.</p>
<pre><code><ti:app>
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<application>
<activity android:name="com.facebook.FacebookActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:label="YourAppName"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
</application>
</manifest>
</android>
<ti:app>
</code></pre>
<p><strong>Add the Facebook App ID to Android Resources</strong></p>
<p>Add a string element to the <code>/platform/android/res/values/strings.xml</code> file with the <code>name</code>
attribute set to <code>facebook_app_id</code> and the node text set to your Facebook App ID. Create the
file if it does not exist.</p>
<pre><code><resources>
<string name="facebook_app_id">FACEBOOK_APP_ID</string>
</resources>
</code></pre>
<p><strong>Create a Facebook Proxy</strong></p>
<p>Use the {@link Modules.Facebook#method-createActivityWorker createActivityWorker()} method to create a
Facebook proxy. Pass the method a dictionary with the <code>lifecycleContainer</code> property set to
the current active instance of a standalone Window (window not contained in a tab group) or TabGroup.
Create the proxy before calling the <code>open()</code> method on either the window or tab group.</p>
<p>The Facebook module needs to hook into the lifecycle events of the current active activity
in order to synchronize its state between various activities in the application, for example,
to update the label of the Login button when the user logs in or out of Facebook.</p>
<p>Attach the proxy to the Window or TabGroup object, so it does not get garbage collected.</p>
<pre><code>win.fbProxy = fb.createActivityWorker({lifecycleContainer: win});
</code></pre>
<h2>Module API Usage</h2>
<h3>Facebook Login and Authorization</h3>
<p>To use Facebook, a user must logged into Facebook and explicitly authorize the application to
perform certain actions, such as accessing profile information or posting status messages.</p>
<p>There are two ways to initiate the login process:</p>
<ul>
<li><p>Call {@link Modules.Facebook#method-authorize authorize} to prompt the user to login and authorize
the application. Before calling this method, set the {@link Modules.Facebook#property-permissions} property
if additional permissions are needed.</p></li>
<li><p>Create a Facebook {@link Modules.Facebook.LoginButton LoginButton} to allow the user to
log in if desired. You can add either read permissions or write permissions,
otherwise the default is to request for the <code>public_profile</code> permission.
Note that Facebook does not support setting both <code>readPermissions</code> and <code>publishPermissions</code>
properties at the same time when using the LoginButton.</p></li>
</ul>
<p>Which approach you take depends on your UI and how central Facebook is to your
application.</p>
<h3>Manage Read and Write Permissions</h3>
<p>In order to read or write content to a user's Facebook page, you need to request permission from
the user. You can either request permissions when the user authorizes your application or
request permissions on the fly.</p>
<p>Before the user logs in and authorizes the application, you can request permissions for the
application to use by either:</p>
<ul>
<li>Setting the {@link Modules.Facebook#property-permissions} property if you are using <code>authorize()</code> method to
have the user login and authorize the application.</li>
<li>Setting either the {@link Modules.Facebook.LoginButton#property-readPermissions readPermissions} or
{@link Modules.Facebook.LoginButton#property-publishPermissions publishPermissions} on an instance of a LoginButton.
Do not set both properties or the application will throw an error.</li>
</ul>
<p>For a complete list of permissions, see the <a href="https://developers.facebook.com/docs/facebook-login/permissions/">official Facebook Permissions Reference</a></p>
<p><strong>Refresh Application Permissions</strong></p>
<p>Since the user can selectively turn application permissions on and off from their Facebook
page, the application may need to refresh its granted permissions.</p>
<p>To refresh the application's permissions, call the
{@link Modules.Facebook#method-refreshPermissionsFromServer refreshPermissionsFromServer()} method, then
listen for the {@link Modules.Facebook#event-tokenUpdated} event to be notified when permissions are updated.</p>
<pre><code>fb.addEventListener('tokenUpdated', function(e) {
Ti.API.info('Updated permissions: ' + JSON.stringify(fb.permissions));
});
fb.refreshPermissionsFromServer();
</code></pre>
<p><strong>Request Additional Read Permissions</strong></p>
<p>To request additional read permissions once the user authorizes your application, use the
{@link Modules.Facebook#method-requestNewReadPermissions requestNewReadPermissions()} method.</p>
<p>Check the {@link Modules.Facebook#property-permissions} property to make sure the user accepted the request for
additional permissions.</p>
<pre><code>var fb = require('facebook');
fb.requestNewReadPermissions(['read_stream','user_hometown', etc...], function(e) {
if (e.success) {
fb.requestWithGraphPath(...);
} else if (e.cancelled) {
....
} else {
Ti.API.debug('Failed authorization due to: ' + e.error);
}
});
</code></pre>
<p><strong>Request Additional Write Permissions</strong></p>
<p>To request additional write permissions once the user authorizes your application, use the
{@link Modules.Facebook#method-requestNewPublishPermissions requestNewPublishPermissions()} method.
Note that in addition to passing the permissions to request, you need to also pass an <code>AUDIENCE_*</code>
constant to indicate the default audience when positing content.</p>
<p>Check the {@link Modules.Facebook#property-permissions} property to make sure the user accepted the request for
additional permissions.</p>
<pre><code>var fb = require('facebook');
fb.requestNewPublishPermissions(['read_stream','user_hometown', etc...], fb.AUDIENCE_FRIENDS, function(e) {
if (e.success) {
fb.requestWithGraphPath(...);
} else if (e.cancelled) {
....
} else {
Ti.API.debug('Failed authorization due to: ' + e.error);
}
});
</code></pre>
<h3>Share Dialogs</h3>
<p>The Share dialog prompts a person to publish an individual story or an Open Graph story
to their timeline. This does not require the user to authorize your app or any extended permissions,
so it is the easiest way to enable sharing.</p>
<p>The Share dialog uses the Facebook apps interface, so the Facebook app needs to be installed. If
the Facebook app is not installed, the application can use the Feed dialog that presents the
dialog in a web-based view as a back up if the Share dialog is not available.</p>
<p>To present a Share dialog to a user, use the {@link Modules.Facebook#property-canPresentShareDialog} property to
check if the application can use the Share dialog. If the application supports the Share dialog,
call the {@link Modules.Facebook#method-presentShareDialog presentShareDialog()} to present it, else call the
{@link Modules.Facebook#method-presentWebShareDialog presentWebShareDialog()} method to present the Feed dialog.</p>
<p>Pass either method parameters you want to add to the post, such as a link or picture, or to
share the user's status, do not pass any parameters to the methods.</p>
<p>To monitor if the share request succeeded or not, listen to the {@link Modules.Facebook#event-shareCompleted}
event.</p>
<pre><code> fb.addEventListener('shareCompleted', function (e) {
if (e.success) {
Ti.API.info('Share request succeeded.');
} else {
Ti.API.warn('Failed to share.');
}
});
fb.presentShareDialog({
link: 'https://appcelerator.com/',
title: 'great product',
description: 'Titanium is a great product',
picture: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png'
});
</code></pre>
<p>For details on the Share dialog, see the
<a href="https://developers.facebook.com/docs/sharing/reference/share-dialog">official Facebook Share Dialogs documentation</a>.</p>
<h3>Requests Dialog</h3>
<p>A request dialog allows a user to invite another user to use your application.
Facebook will send a private message to the recipient.
The typical use case is to invite another user to play a game.
If you want to invite people to your application which is not a game, use the
{@link Modules.Facebook#method-presentInviteDialog presentInviteDialog()} method instead.</p>
<p>To send a request to a user, call the
{@link Modules.Facebook#method-presentSendRequestDialog presentSendRequestDialog()} method and pass the
method a dictionary with the <code>message</code> property set the message you want to send the invited user.
Optional: You can set the <code>title</code> property with a title string. You can also set the <code>data</code> property
with a dictionary of custom parameters. If you want to preselect users to send invite to, you can set
the <code>to</code> property with string of values that are facebook ids seperated by comma.</p>
<p>To monitor if the request succeeded or not, listen to the {@link Modules.Facebook#event-requestDialogCompleted} event.</p>
<pre><code> fb.addEventListener('requestDialogCompleted', function (e) {
if (e.success) {
Ti.API.info('request succeeded.');
} else {
Ti.API.warn('Failed to share.');
}
});
fb.presentSendRequestDialog({
message: 'Go to https://appcelerator.com/',
title: 'Invitation to Appcelerator',
recipients: ['123456789', '123456788'],
data: {
badge_of_awesomeness: '1',
social_karma: '5'
}
});
</code></pre>
<p>For details on request dialogs see the
<a href="https://developers.facebook.com/docs/games/requests/v2.2">official Facebook Request Dialogs documentation</a>.</p>
<h3>Messenger Dialog</h3>
<p>A messenger dialog allows a user to send content to the Facebook Messenger using your application.</p>
<p>To send a message to a user, call the {@link Modules.Facebook#method-presentMessengerDialog presentMessengerDialog()} method
and pass the method a dictionary with the optional values "title", "description", "link", "to", "placeID"
and "referal".</p>
<pre><code> fb.presentMessengerDialog({
title: "Appcelerator Titanium rocks!", // The title of the link
description: "Shared from my Titanium application", // The description of the link
link: "https://appcelerator.com", // The link you want to share
referal: "ti_app", // The referal to be added as a suffix to your link
placeID: "my_id", // The ID for a place to tag with this content
to: [] // List of IDs for taggable people to tag with this content
});
</code></pre>
<p>For details on dialog see the
<a href="https://developers.facebook.com/docs/messenger">official Facebook Messenger Dialogs documentation</a>.</p>
<h3>Messenger Button</h3>
<p>The Messenger button provides a quick mechanism for users to share content to the Facebook Messenger.
A click on the button can share the content to multiple users.</p>
<p>To create a Messenger button, call the {@link Modules.Facebook#method-createMessengerButton createMessengerButton()}
method and pass the "mode" and "style" properties:</p>
<pre><code>var messengerButton = fb.createMessengerButton({
mode: fb.MESSENGER_BUTTON_MODE_RECTANGULAR
style: fb.MESSENGER_BUTTON_STYLE_BLUE
});
win.add(messengerButton);
</code></pre>
<p>For more information, see the {@link Modules.Facebook.MessengerButton MessengerButton API reference}.</p>
<h3>Like Button</h3>
<p>The Like button provides a quick mechanism for users to share content. A click on the button
will share the content on the user's Facebook page.</p>
<p>To create a Like button, call the {@link Modules.Facebook#method-createLikeButton createLikeButton()} method
and pass it a dictionary with the <code>objectID</code> assigned to either a URL or Open Graph object ID
you want to share. Add the button instance to a view to display it.</p>
<pre><code>var likeButton = fb.createLikeButton({
objectID: "https://www.facebook.com/appcelerator"
});
win.add(likeButton);
</code></pre>
<p>For more information, see the {@link Modules.Facebook.LikeButton LikeButton API reference}.</p>
* <h3>Examples</h3>
<h4>Alloy Example</h4>
<p>Displays the Facebook Login and Like buttons in a window.</p>
<p><code>app/alloy.js</code>:</p>
<pre><code>// Make API calls to Alloy.Globals.Facebook
Alloy.Globals.Facebook = require('facebook');
</code></pre>
<p><code>app/views/index.xml</code>:</p>
<pre><code><Alloy>
<Window backgroundColor="white">
<LoginButton id="fbLogin" module="facebook" top="25" />
<LikeButton id="fbLike" module="facebook" top="100" />
</Window>
</Alloy>
</code></pre>
<p><code>app/controllers/index.js</code>:</p>
<pre><code>$.fbLike.objectID = "http://www.facebook.com/appcelerator";
if (OS_ANDROID) {
$.index.fbProxy = Alloy.Globals.Facebook.createActivityWorker({lifecycleContainer: $.index});
}
$.index.open();
</code></pre><h4>Authorize</h4>
<p>Shows official Facebook dialog for logging in the user and prompting the user to approve your
requested permissions. Listen for the module's {@link Modules.Facebook#event-login login} event to
determine whether the request succeeded.</p>
<pre><code>var fb = require('facebook');
fb.addEventListener('login', function(e) {
if (e.success) {
alert('login from uid: '+e.uid+', name: '+ JSON.parse(e.data).name);
label.text = 'Logged In = ' + fb.loggedIn;
}
else if (e.cancelled) {
// user cancelled
alert('cancelled');
}
else {
alert(e.error);
}
});
fb.authorize();
</code></pre><h4>Logout</h4>
<p>Logout the user and forget the authorization token. The
{@link Modules.Facebook#method-logout logout} event is fired after the user is logged out.</p>
<pre><code>fb.addEventListener('logout', function(e) {
alert('Logged out');
});
fb.logout();
</code></pre><h4>Authorize/Logout Using the Facebook LoginButton</h4>
<p>You can use the the native Facebook {@link Modules.Facebook.LoginButton LoginButton}
to allow the user to log in as required. The button updates its state automatically depending
on whether the user is logged in or not. When the user is logged in, then the button
will show "Logout", and vice-versa.</p>
<p>Note that you don't need to set a click listener or anything else on the button.
To be notified when the user logs in or out, add event listeners for the
{@link Modules.Facebook#event-login login} and {@link Modules.Facebook#method-logout logout} events
provided by the Facebook module, as in the example below.</p>
<pre><code>// Don't forget to set your requested permissions, else the login button won't be effective.
var win = Ti.UI.createWindow({backgroundColor: 'white'});
var fb = require('facebook');
fb.addEventListener('login', function(e) {
if (e.success) {
alert('Logged in');
}
});
fb.addEventListener('logout', function(e) {
alert('Logged out');
});
if (Ti.Platform.name === 'android') {
win.fbProxy = fb.createActivityWorker({lifecycleContainer: win});
}
// Add the button. Note that it doesn't need a click event listener.
win.add(fb.createLoginButton({
readPermissions: ['read_stream','email'],
top: 50
}));
win.open()
</code></pre><h4>Simple Graph API Call</h4>
<p>This example makes a call to the "me" graph path, which represents the current
user. The JSON results are simply displayed in an alert. This example assumes
the user is already logged in. You can check this with {@link Modules.Facebook#property-loggedIn}.</p>
<pre><code>fb.requestWithGraphPath('me', {}, 'GET', function(e) {
if (e.success) {
alert(e.result);
} else if (e.error) {
alert(e.error);
} else {
alert('Unknown response');
}
});
</code></pre><h4>Post a Photo Using the Graph API from the Gallery.</h4>
<p>This example posts a photo to the user's account using the Graph API.
This requires the "publish_actions" permission.</p>
<pre><code>var B1_TITLE = 'Upload Photo from Gallery with Graph API';
var b1 = Ti.UI.createButton({
title:B1_TITLE,
left: 10, right: 10, top: 0, height: 80
});
b1.addEventListener('click', function() {
Titanium.Media.openPhotoGallery({
success:function(event)
{
b1.title = 'Uploading Photo...';
var data = {picture: event.media};
// If publish_actions permission is not granted, request it
if (fb.permissions.indexOf('publish_actions') < 0) {
fb.requestNewPublishPermissions(['publish_actions'], fb.AUDIENCE_FRIENDS, function(e) {
if (e.success) {
Ti.API.info('Permissions:'+fb.permissions);
fb.requestWithGraphPath('me/photos', data, "POST", showRequestResult);
}
if (e.error) {
Ti.API.info('Publish permission error');
}
if (e.cancelled) {
Ti.API.info('Publish permission cancelled');
}
});
} else {
fb.requestWithGraphPath('me/photos', data, "POST", showRequestResult);
}
},
cancel:function()
{
},
error:function(error)
{
},
allowEditing:true
});
});
</code></pre>
<p>For more information on posting photos, see:</p>
<ul>
<li><a href="https://developers.facebook.com/docs/graph-api/reference/v2.2/photo">Photo in the Facebook Graph API Reference</a></li>
</ul><h4>Post a Photo Using the Graph API with an image in resources directory</h4>
<p>This example posts a photo to the user's account using the Graph API.
This requires the "publish_actions" permission.</p>
<pre><code>var b2 = Ti.UI.createButton({
title: 'Upload Photo from file with Graph API',
left: 10,
right: 10,
top: 90,
height: 80
});
b2.addEventListener('click', function() {
b2.title = 'Uploading Photo...';
var f = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'images', 'flower.jpg');
var blob = f.read();
var data = {
caption: 'behold, a flower',
picture: blob
};
// If publish_actions permission is not granted, request it
if (fb.permissions.indexOf('publish_actions') < 0) {
fb.requestNewPublishPermissions(['publish_actions'], fb.AUDIENCE_FRIENDS, function(e) {
if (e.success) {
Ti.API.info('Permissions:'+fb.permissions);
fb.requestWithGraphPath('me/photos', data, "POST", showRequestResult);
}
if (e.error) {
Ti.API.info('Publish permission error');
}
if (e.cancelled) {
Ti.API.info('Publish permission cancelled');
}
});
} else {
fb.requestWithGraphPath('me/photos', data, "POST", showRequestResult);
}
});
</code></pre>
<p>For more information on posting photos, see:</p>
<ul>
<li><a href="https://developers.facebook.com/docs/graph-api/reference/v2.2/photo">Photo in the Facebook Graph API Reference</a></li>
</ul><h4>Show the Share Dialog</h4>
<p>This example shows how to use the Share Dialog.</p>
<pre><code>var wallDialog = Ti.UI.createButton({
title: 'Share URL with Share Dialog',
top: 135,
left: 10,
right: 10,
height: 40
});
wallDialog.addEventListener('click', function() {
if (fb.getCanPresentShareDialog()) {
fb.presentShareDialog({
link: 'https://appcelerator.com/',
name: 'great product',
description: 'Titanium is a great product',
caption: 'it rocks too',
picture: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png'
});
} else {
fb.presentWebShareDialog({
link: 'https://appcelerator.com/',
name: 'great product',
description: 'Titanium is a great product',
caption: 'it rocks too',
picture: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png'
});
}
});
</code></pre>
<p>For more information on Facebook Dialogs, see:</p>
<ul>
<li><a href="https://developers.facebook.com/docs/sharing/reference/share-dialog">Facebook Share Dialog Reference</a></li>
</ul><h4>Show the Invite Dialog</h4>
<p>This example shows how to use the Invite Dialog.</p>
<pre><code>var wallDialog = Ti.UI.createButton({
title: 'Invite friends!',
top: 135,
left: 10,
right: 10,
height: 40
});
wallDialog.addEventListener('click', function() {
FB.presentInviteDialog({
appLink: "https://fb.me/xxxxxxxx",
appPreviewImageLink: "https://www.mydomain.com/my_invite_image.jpg"
});
});
</code></pre>
<p>For more information on Invite Dialogs, see:
* <a href="https://developers.facebook.com/docs/app-invites/ios">Facebook Invite Dialog Reference</a></p><h4>Share content to the Facebook Messenger</h4>
<p>This example shows how to share images, GIF's and videos to the Facebook messenger.</p>
<pre><code>var btn = Ti.UI.createButton({
title: "Share media to messenger"
});
btn.addEventListener("click", function(e) {
var media = [
Ti.UI.createView({height: 30,width:30,backgroundColor: "#ff0"}).toImage(), // Image blob
Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, "test.gif").read(), // GIF Blob
Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, "movie.mp4").read() // Video Blob
];
var options = Ti.UI.createOptionDialog({
options: ["Photo", "GIF", "Video", "Cancel"],
cancel: 3
});
options.addEventListener("click", function(e) {
if (e.index == 3) {
return;
}
FB.shareMediaToMessenger({
media: media[e.index],
metadata: "Ti rocks!",
link: "https://appcelerator.com",
//renderAsSticker: true // Only for photos e.g. selfies
});
});
options.show();
});
</code></pre>
<p>For more information on sharing media to the Facebook Messenger, see:</p>
<ul>
<li><a href="https://developers.facebook.com/docs/messenger">Facebook Messenger Reference</a></li>
</ul><h4>Requesting additional permissions</h4>
<p>This example shows how to use the <code>requestNewPublishPermissions</code> method to request additional permissions
to publish a post to the user's wall.</p>
<pre><code>fb.requestNewPublishPermissions(['publish_actions'], fb.AUDIENCE_FRIENDS, function(e) {
if (e.success) {
fb.requestWithGraphPath('me/feed', null, "POST", showRequestResult);
} else {
Ti.API.debug('Failed authorization due to: ' + e.error);
}
});
</code></pre>
*/
/**
* @event login
* <p>Fired at session login.</p>
* @param {Boolean} success
<p>Indicates if the user was logged in successfully.
Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
* @param {Number} cancelled
<p>Indicates if the user canceled the login request by closing the dialog.</p>
* @param {String} error
<p>Error message, if any returned.
Will be undefined if <code>success</code> is <code>true</code>.</p>
* @param {Number} code
<p>Error code.
Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @param {String} uid
<p>User ID returned by Facebook if the login was successful.</p>
* @param {String} data
<p>Data returned by Facebook when we query for the UID (using graph path "me")
after a successful login. Data is in JSON format, and includes information
such as user name, locale and gender.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event logout
* <p>Fired at session logout.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event requestDialogCompleted
* <p>Fired when the Send Request dialog is closed.</p>
* @param {Boolean} success
<p>Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
* @param {Number} cancelled
<p>Indicates if the user canceled the request by closing the dialog.</p>
* @param {String} error
<p>Error message, if any returned.
Will be undefined if <code>success</code> is <code>true</code>.</p>
* @param {Dictionary} data
<p>data returned by Facebook. See Facebook reference for details.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 4.0.2
* @platform iphone 4.0.2
* @platform ipad 4.0.2
*/
/**
* @event shareCompleted
* <p>Fired when the Share dialog or Web Share dialog is closed.</p>
* @param {Boolean} success
<p>Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
* @param {Number} cancelled
<p>Indicates if the user canceled the request by closing the dialog.</p>
* @param {String} error
<p>Error message, if any returned.
Will be undefined if <code>success</code> is <code>true</code>.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @event inviteCompleted
* <p>Fired when the Invite dialog is closed.</p>
* @param {Boolean} success
<p>Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
* @param {Number} cancelled
<p>Indicates if the user canceled the request by closing the dialog.</p>
* @param {String} error
<p>Error message, if any returned.
Will be undefined if <code>success</code> is <code>true</code>.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @event tokenUpdated
* <p>Fired when {@link Modules.Facebook#method-refreshPermissionsFromServer refreshPermissionsFromServer} is completed.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method authorize
* <p>Prompts the user to log in (if not already logged in) and authorize your application.
You can also use {@link Modules.Facebook.LoginButton LoginButton} to log in.</p>
* @description <p>Be sure to set your required {@link Modules.Facebook#property-permissions permissions} before
calling <code>authorize</code>.</p>
<p>A {@link Modules.Facebook#event-login login} event is generated to indicate a successful or
unsuccessful login attempt.</p>
<h4>iOS Platform Notes</h4>
<p>On iOS, do not request any write permissions before calling this method. Use the
{@link Modules.Facebook#method-requestNewPublishPermissions requestNewPublishPermissions()}
to request write permissions once the user authorizes the application.</p>
<h4>Prior to Release 4.0.0</h4>
<p>Set the {@link Modules.Facebook#property-appid appid} property as well as the <code>permissions</code> property
before calling <code>authorize()</code>.</p>
*/
/**
* @method createActivityWorker
* <p>Creates a Facebook proxy to hook into the activity of either a standalone {@link Titanium.UI.Window}
(not inside a TabGroup) or {@link Titanium.UI.TabGroup}.</p>
* @description <p>Set the <code>lifecycleContainer</code> property in the dictionary passed to the method to either
the current active instance of a {@link Titanium.UI.Window} or {@link Titanium.UI.TabGroup} in order to monitor the activity's
lifecycle events, required by Facebook to synchronize its state between various
activities in the application.</p>
<p>The proxy object must be created before calling the <code>open()</code> method on the associated Window
or TabGroup.</p>
* @param {Dictionary<Titanium.Proxy>} parameters
<p>Properties to set on a new object, including any defined by {@link Titanium.Proxy} except
those marked not-creation or read-only.</p>
<p><strong>Note:</strong> You must set the <code>lifecycleContainer</code> property.</p>
* @returns {Titanium.Proxy}
* @platform android 4.0.0
*/
/**
* @method dialog
* <p>Opens a supported Facebook dialog.</p>
* @removed 4.0.0
* @description <p>For a list of dialogs, parameters, and response formats, see the
<a href="https://developers.facebook.com/docs/javascript/reference/FB.ui">official documentation for Facebook Dialogs</a>.</p>
<p>The callback is invoked when the dialog is closed, either because the user
approved the action, or canceled the dialog.</p>
* @param {String} action
<p>Specifies which dialog to show, such as "feed".</p>
* @param {Object} params
<p>A dictionary object for pre-filling some of the dialog's fields.</p>
* @param {Callback<FacebookDialogResponse>} callback
<p>Callback to invoke when the user completes or cancels the dialog.</p>
*/
/**
* @method initialize
* <p>Loads a cached Facebook session if available, then fires the <code>login</code> event.</p>
* @deprecated 5.0.0
* @description <p>Be sure to set your {@link Modules.Facebook#event-login login} and {@link Modules.Facebook#method-logout logout}
event listeners before calling <code>initialize</code>.</p>
* @param {Number} timeout
<p>Sets initialize timeout in milliseconds.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method logCustomEvent
* <p>Logs a custom event to Facebook.</p>
* @description <p><strong>From the Facebook API Reference:</strong></p>
<p>Events are not sent immediately when logged. They're cached and flushed out to the Facebook servers
in a number of situations:</p>
<ul>
<li>when an event count threshold is passed (currently 100 logged events).</li>
<li>when a time threshold is passed (currently 15 seconds).</li>
<li>when an app has gone to background and is then brought back to the foreground.</li>
</ul>
<p>Some things to note when logging events:</p>
<ul>
<li>There is a limit on the number of unique event names an app can use, on the order of 300.</li>
<li>Event names must be between 2 and 40 characters and must consist of alphanumeric
characters, <code>_</code>, <code>-</code> or spaces.</li>
</ul>
* @param {String} event
<p>Arbitrary string to log as an event.</p>
* @param {Number} valueToSum (optional)
<p>An arbitrary number that can represent any value (e.g., a price or a quantity).
When reported, all of the valueToSum properties will be summed together in Facebook Analytics for Apps.</p>
* @param {Object} params (optional)
<p>A dictionary object containing optional parameters.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method logPurchase
* <p>Log a purchase of the specified amount, in the specified currency.</p>
* @param {Number} amount
<p>Purchase amount to be logged, as expressed in the specified currency.
This value will be rounded to the thousandths place (e.g., 12.34567 becomes 12.346).</p>
* @param {String} currency
<p>Currency, is denoted as, e.g. "USD", "EUR", "GBP". See ISO-4217 for specific values.</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method logout
* <p>Clears the OAuth <code>accessToken</code> and logs out the user.</p>
*/
/**
* @method publishInstall
* <p>Manually publish an attributed install to the facebook graph.</p>
* @removed 4.0.0
* @description <p>Be sure to set your {@link Modules.Facebook#property-appid appid} before calling <code>publishInstall</code>.</p>
* @platform android 3.4.1
* @platform iphone 3.4.1
* @platform ipad 3.4.1
*/
/**
* @method presentInviteDialog
* <p>Opens a supported Facebook Invite dialog from the Facebook App.</p>
* @description <p>To monitor if the share request succeeded or not, listen to the
{@link Modules.Facebook#event-shareCompleted} event.</p>
* @param {InviteDialogParams} params
<p>A dictionary object containing required and optional parameters.</p>
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method presentShareDialog
* <p>Opens a supported Facebook Share dialog from the Facebook App.</p>
* @description <p>Be sure to check if the device can support this method by calling {@link Modules.Facebook#method-getCanPresentShareDialog getCanPresentShareDialog}
before using this method. If true, you can use this method. If false, the Facebook application
is probably not installed in the device. In this case, use {@link Modules.Facebook#method-presentWebShareDialog presentWebShareDialog}
instead.</p>
<p>Listen for the {@link Modules.Facebook#event-shareCompleted} to be notified if the attempt was
successful or not.</p>
* @param {ShareDialogParams} params
<p>A dictionary object containing optional parameters.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method presentMessengerDialog
* <p>Opens a supported Messenger dialog from the Facebook Messenger App.</p>
* @description <p>Be sure to check if the device can support this method by calling {@link Titanium.Platform#method-canOpenURL canOpenURL} with "fb-messenger-api://"
before using this method. If true, you can use this method. If false, the Facebook Messenger application
is probably not installed in the device.</p>
<p>Listen for the {@link Modules.Facebook#event-shareCompleted} to be notified if the attempt was
successful or not.</p>
* @param {MessengerDialogParams} params
<p>A dictionary object containing optional parameters.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method presentWebShareDialog
* <p>Opens a web version of the Share dialog (Feed dialog). Does not depend on the Facebook app.</p>
* @removed 5.0.0
* @description <p>This is a fallback for when Share dialog is not available.</p>
<p>Listen for the {@link Modules.Facebook#event-shareCompleted} to be notified if the attempt was
successful or not.</p>
* @param {ShareDialogParams} params
<p>A dictionary object containing optional parameters.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method presentSendRequestDialog
* <p>Opens an App Request dialog.</p>
* @description <p>A <code>requestDialogCompleted</code> event is generated to indicate if the request attempt was successful or unsuccessful,
and the resultURL.</p>
* @param {RequestDialogParams} params
<p>A dictionary object containing parameters.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method reauthorize
* <p>Makes a request to Facebook for additional permissions.</p>
* @removed 4.0.0
* @description <p>iOS 6's facebook login forbids minimum authorization to include write permissions.
In order to make any write actions, the app must reauthorize asking for the additional
permissions. If the application already has these permissions, there will be no user
interaction.</p>
* @param {Array<String>} permissions
<p>Array of additional permissions to request. For a complete list of permissions, see the
<a href="http://developers.facebook.com/docs/reference/api/permissions/">official Facebook Permissions Reference</a></p>
* @param {String} audience
<p>The extent of the visibility write permissions will have.
The value of audience should be one of "me", "friends", or "everyone"</p>
* @param {Callback<FacebookReauthResponse>} callback
<p>Callback to invoke when the request completes.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method refreshPermissionsFromServer
* <p>Makes a request to Facebook to get the latest permissions granted.</p>
* @description <p>Facebook now grants total control over granted permissions, and if the user modified the permissions
outside of your app your cached token may not be updated.</p>
<p>Listen for the {@link Modules.Facebook#event-tokenUpdated} event to be notified if the attempt was
successful.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method request
* <p>Makes a request to the legacy Facebook REST API.</p>
* @removed 4.0.0 As of April 30, 2014, Facebook no longer supports its version 1.0 REST API. Use the
<Modules.Facebook.requestWithGraphPath> method to make Facebook Graph API requests.
* @description <p>For details on API calls and responses, see the
<a href="http://developers.facebook.com/docs/reference/rest/">offical Facebook REST API documentation</a>.</p>
* @param {String} method
<p>The REST API method to call.</p>
* @param {Object} params
<p>A dictionary object for setting parameters required by the call, if any.</p>
* @param {Callback<FacebookRESTResponse>} callback
<p>Callback to invoke when the request completes.</p>
*/
/**
* @method requestWithGraphPath
* <p>Makes a Facebook Graph API request.</p>
* @description <p>If the request requires user authorization, the user must be logged in, and your app
must be authorized to make the request. You can check the
{@link Modules.Facebook#property-loggedIn loggedIn} property to determine if the user is logged in.</p>
<p>Every Facebook object has an associated path. For example, "me" requests information about
the current user.</p>
<p>For a complete list of Graph API methods, parameters and return types, see the
<a href="https://developers.facebook.com/docs/graph-api">official Facebook Graph API documentation</a>.</p>
* @param {String} path
<p>Graph API path to request.</p>
* @param {Dictionary} params
<p>A dictionary object for setting parameters required by the call, if any.</p>
* @param {String} httpMethod
<p>The HTTP method (GET/POST/DELETE) to use for the call.</p>
* @param {Callback<FacebookGraphResponse>} callback
<p>Callback to invoke when the request completes.</p>
*/
/**
* @method requestNewReadPermissions
* <p>Makes a request to Facebook for additional read permissions.</p>
* @description <p>Note that it is not an error for the user to 'Skip' your requested permissions,
so you should check the module's <code>permissions</code> property following the call.</p>
* @param {Array<String>} permissions
<p>Array of additional permissions to request. For a complete list of permissions, see the
<a href="https://developers.facebook.com/docs/facebook-login/permissions/v2.2">official Facebook Permissions Reference</a></p>
* @param {Callback<FacebookPermissionResponse>} callback
<p>Callback to invoke when the request completes.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method requestNewPublishPermissions
* <p>Makes a request to Facebook for additional write permissions.</p>
* @description <p>Note that it is not an error for the user to 'Skip' your requested permissions,
so you should check the module's <code>permissions</code> property following the call.</p>
* @param {Array<String>} permissions
<p>Array of additional permissions to request. For a complete list of permissions, see the
<a href="https://developers.facebook.com/docs/facebook-login/permissions/v2.2">official Facebook Permissions Reference</a></p>
* @param {Number} audience
<p>The extent of the visibility write permissions will have.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Modules.Facebook#property-AUDIENCE_NONE}
<li> {@link Modules.Facebook#property-AUDIENCE_ONLY_ME}
<li> {@link Modules.Facebook#property-AUDIENCE_FRIENDS}
<li> {@link Modules.Facebook#property-AUDIENCE_EVERYONE}
</ul></p>
* @param {Callback<FacebookPermissionResponse>} callback
<p>Callback to invoke when the request completes.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method fetchDeferredAppLink
* <p>Fetch the deferred app link</p>
* @description <p>Deferred deep linking allows you to send people to a custom view after they installed your app via the app store.</p>
* @param {Callback<FacebookDeferredAppLinkResponse>} callback
<p>Callback to invoke when the request completes.</p>
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method shareMediaToMessenger
* <p>Call this method to open Messenger and share an image, animated GIF or video.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method getAccessToken
* <p>Gets the value of the {@link Modules.Facebook#property-accessToken} property.</p>
* @returns {String}
*/
/**
* @method getAppid
* <p>Gets the value of the {@link Modules.Facebook#property-appid} property.</p>
* @removed 4.0.0 Set the Facebook App ID in the `tiapp.xml` file. See "Getting Started" above for details.
* @returns {String}
*/
/**
* @method setAppid
* <p>Sets the value of the {@link Modules.Facebook#property-appid} property.</p>
* @removed 4.0.0 Set the Facebook App ID in the `tiapp.xml` file. See "Getting Started" above for details.
* @param {String} appid
<p>New value for the property.</p>
*/
/**
* @method getCanPresentOpenGraphActionDialog
* <p>Gets the value of the {@link Modules.Facebook#property-canPresentOpenGraphActionDialog} property.</p>
* @returns {Boolean}
* @platform android 4.0.0
*/
/**
* @method getCanPresentShareDialog
* <p>Gets the value of the {@link Modules.Facebook#property-canPresentShareDialog} property.</p>
* @removed 5.0.0
* @returns {Boolean}
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method getExpirationDate
* <p>Gets the value of the {@link Modules.Facebook#property-expirationDate} property.</p>
* @returns {Date}
*/
/**
* @method getForceDialogAuth
* <p>Gets the value of the {@link Modules.Facebook#property-forceDialogAuth} property.</p>
* @removed 4.0.0
* @returns {Boolean}
*/
/**
* @method setForceDialogAuth
* <p>Sets the value of the {@link Modules.Facebook#property-forceDialogAuth} property.</p>
* @removed 4.0.0
* @param {Boolean} forceDialogAuth
<p>New value for the property.</p>
*/
/**
* @method getLoggedIn
* <p>Gets the value of the {@link Modules.Facebook#property-loggedIn} property.</p>
* @returns {Boolean}
*/
/**
* @method getLoginBehavior
* <p>Gets the value of the {@link Modules.Facebook#property-loginBehavior} property.</p>
* @returns {Number}
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method setLoginBehavior
* <p>Sets the value of the {@link Modules.Facebook#property-loginBehavior} property.</p>
* @param {Number} loginBehavior
<p>New value for the property.</p>
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method getPermissions
* <p>Gets the value of the {@link Modules.Facebook#property-permissions} property.</p>
* @returns {String[]}
*/
/**
* @method setPermissions
* <p>Sets the value of the {@link Modules.Facebook#property-permissions} property.</p>
* @param {Array<String>} permissions
<p>New value for the property.</p>
*/
/**
* @method getUid
* <p>Gets the value of the {@link Modules.Facebook#property-uid} property.</p>
* @returns {String}
*/
/**
* @method createLikeButton
* <p>Creates and returns an instance of {@link Modules.Facebook.LikeButton}.</p>
* @param {Dictionary<Modules.Facebook.LikeButton>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Facebook.LikeButton} except those marked not-creation or read-only.</p>
* @returns {Modules.Facebook.LikeButton}
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method createLoginButton
* <p>Creates and returns an instance of {@link Modules.Facebook.LoginButton}.</p>
* @param {Dictionary<Modules.Facebook.LoginButton>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Facebook.LoginButton} except those marked not-creation or read-only.</p>
* @returns {Modules.Facebook.LoginButton}
*/
/**
* @method createMessengerButton
* <p>Creates and returns an instance of {@link Modules.Facebook.MessengerButton}.</p>
* @param {Dictionary<Modules.Facebook.MessengerButton>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Facebook.MessengerButton} except those marked not-creation or read-only.</p>
* @returns {Modules.Facebook.MessengerButton}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property AUDIENCE_NONE
* @type Number
* @readonly
* <p>Invalid default audience.</p>
* @removed 5.0.0
* @description <p>Use to set the default audience with either {@link Modules.Facebook.LoginButton#property-audience LoginButton.audience}
or {@link Modules.Facebook#method-requestNewPublishPermissions}.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property AUDIENCE_ONLY_ME
* @type Number
* @readonly
* <p>Published content is only visible to the user.</p>
* @description <p>Use to set the default audience with either {@link Modules.Facebook.LoginButton#property-audience LoginButton.audience}
or {@link Modules.Facebook#method-requestNewPublishPermissions}.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property AUDIENCE_FRIENDS
* @type Number
* @readonly
* <p>Published content is only visible to the user and user's friends.</p>
* @description <p>Use to set the default audience with either {@link Modules.Facebook.LoginButton#property-audience LoginButton.audience}
or {@link Modules.Facebook#method-requestNewPublishPermissions}.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property AUDIENCE_EVERYONE
* @type Number
* @readonly
* <p>Published content is visible to all Facebook users.</p>
* @description <p>Use to set the default audience with either {@link Modules.Facebook.LoginButton#property-audience LoginButton.audience}
or {@link Modules.Facebook#method-requestNewPublishPermissions}.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property ACTION_TYPE_NONE
* @type Number
* @readonly
* <p>No action type.</p>
* @description <p>Use to set the actionType with {@link Modules.Facebook#method-presentSendRequestDialog presentSendRequestDialog()}</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property ACTION_TYPE_SEND
* @type Number
* @readonly
* <p>The user is sending an object to the friends.</p>
* @description <p>Use to set the actionType with {@link Modules.Facebook#method-presentSendRequestDialog presentSendRequestDialog()}</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property ACTION_TYPE_ASK_FOR
* @type Number
* @readonly
* <p>The user is asking for an object from friends.</p>
* @description <p>Use to set the actionType with {@link Modules.Facebook#method-presentSendRequestDialog presentSendRequestDialog()}</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property ACTION_TYPE_TURN
* @type Number
* @readonly
* <p>It is the turn of the friends to play against the user in a match.</p>
* @description <p>Use to set the actionType with {@link Modules.Facebook#method-presentSendRequestDialog presentSendRequestDialog()}</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property FILTER_NONE
* @type Number
* @readonly
* <p>No filter all friends can be displayed.</p>
* @description <p>Use to set the filter with {@link Modules.Facebook#method-presentSendRequestDialog presentSendRequestDialog()}</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property FILTER_APP_USERS
* @type Number
* @readonly
* <p>Friends using the app can be displayed.</p>
* @description <p>Use to set the filter with {@link Modules.Facebook#method-presentSendRequestDialog presentSendRequestDialog()}</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property FILTER_APP_NON_USERS
* @type Number
* @readonly
* <p>Friends not using the app can be displayed.</p>
* @description <p>Use to set the filter with {@link Modules.Facebook#method-presentSendRequestDialog presentSendRequestDialog()}</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property BUTTON_STYLE_NORMAL
* @type Number
* @readonly
* <p>Use with {@link Modules.Facebook.LoginButton#property-style LoginButton.style} to specify
the default login button reading "Connect" or "Login".</p>
* @removed 4.0.0
*/
/**
* @property BUTTON_STYLE_WIDE
* @type Number
* @readonly
* <p>Use with {@link Modules.Facebook.LoginButton#property-style LoginButton.style} to specify
a wide login button reading "Connect with Facebook" or "Login with Facebook".</p>
* @removed 4.0.0
*/
/**
* @property LOGIN_BEHAVIOR_BROWSER
* @type Number
* @readonly
* <p>Opens login window in the default Web Browser (Safari/Firefox etc...)</p>
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property LOGIN_BEHAVIOR_NATIVE
* @type Number
* @readonly
* <p>Opens login window with the native Facebook app. On iOS it will attempt to
fallback to <Titanium.Modules.Facebook.LOGIN_BEHAVIOR_BROWSER> if the Facebook app
is not installed or Facebook chooses it internally. For Android use
<Titanium.Modules.Facebook.LOGIN_BEHAVIOR_NATIVE_WITH_FALLBACK> to get this behavior.</p>
<p>Note: As of today (Facebook SDK 4.11.0), Facebook seems to not allow logging in using
the Facebook app to login, so this constant won't work proper on iOS. This issue is
discussed <a href="https://developers.facebook.com/bugs/786729821439894/?search_id">here</a>.</p>
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property LOGIN_BEHAVIOR_SYSTEM_ACCOUNT
* @type Number
* @readonly
* <p>Attempts to login with through the Facebook account currently signed in through
Settings.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property LOGIN_BEHAVIOR_WEB
* @type Number
* @readonly
* <p>Opens login window through a modal browser window.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property LOGIN_BEHAVIOR_NATIVE_WITH_FALLBACK
* @type Number
* @readonly
* <p>Opens login window with the native Facebook app. On Android it will attempt to
fallback to <Titanium.Modules.Facebook.LOGIN_BEHAVIOR_BROWSER> if the Facebook app
is not installed. For iOS use <Titanium.Modules.Facebook.NATIVE> to get this behavior.</p>
* @platform android 5.4.0
*/
/**
* @property LOGIN_BEHAVIOR_DEVICE_AUTH
* @type Number
* @readonly
* <p>Expose Facebook Login for devices such as Android TV and Fire TV.</p>
* @platform android 5.4.0
*/
/**
* @property SSO_ONLY
* @type Number
* @readonly
* <p>Only attempt single sign-on.</p>
* @description <p>Use with the {@link Modules.Facebook.LoginButton#property-sessionLoginBehavior LoginButton.sessionLoginBehavior} property.</p>
* @platform android 4.0.0
*/
/**
* @property SSO_WITH_FALLBACK
* @type Number
* @readonly
* <p>Attempt single sign-on, then fallback to dialog authorization.</p>
* @description <p>Use with the {@link Modules.Facebook.LoginButton#property-sessionLoginBehavior LoginButton.sessionLoginBehavior} property.</p>
* @platform android 4.0.0
*/
/**
* @property SUPPRESS_SSO
* @type Number
* @readonly
* <p>Do not attempt single sign-on and only use dialog authorization.</p>
* @description <p>Use with the {@link Modules.Facebook.LoginButton#property-sessionLoginBehavior LoginButton.sessionLoginBehavior} property.</p>
* @platform android 4.0.0
*/
/**
* @property SHARE_DIALOG_MODE_AUTOMATIC
* @type Number
* @readonly
* <p>Acts with the most appropriate mode that is available.</p>
* @description <p>Use with {@link Modules.Facebook#method-presentShareDialog presentShareDialog()}.</p>
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property SHARE_DIALOG_MODE_NATIVE
* @type Number
* @readonly
* <p>Displays the dialog in the main native Facebook app.</p>
* @description <p>Use with {@link Modules.Facebook#method-presentShareDialog presentShareDialog()}.</p>
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property SHARE_DIALOG_MODE_SHARE_SHEET
* @type Number
* @readonly
* <p>Displays the dialog in the iOS integrated share sheet.</p>
* @description <p>Use with {@link Modules.Facebook#method-presentShareDialog presentShareDialog()}.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property SHARE_DIALOG_MODE_BROWSER
* @type Number
* @readonly
* <p>Displays the dialog in Safari.</p>
* @description <p>Use with {@link Modules.Facebook#method-presentShareDialog presentShareDialog()}.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property SHARE_DIALOG_MODE_WEB
* @type Number
* @readonly
* <p>Displays the dialog in a web view within the app.</p>
* @description <p>Use with {@link Modules.Facebook#method-presentShareDialog presentShareDialog()}.</p>
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property SHARE_DIALOG_MODE_FEED_BROWSER
* @type Number
* @readonly
* <p>Displays the feed dialog in Safari.</p>
* @description <p>Use with {@link Modules.Facebook#method-presentShareDialog presentShareDialog()}.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property SHARE_DIALOG_MODE_FEED_WEB
* @type Number
* @readonly
* <p>Displays the feed dialog in a webview within the app.</p>
* @description <p>Use with {@link Modules.Facebook#method-presentShareDialog presentShareDialog()}.</p>
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property accessToken
* @type String
* @readonly
* <p>OAuth token set after a successful <code>authorize</code>.</p>
*/
/**
* @property appid
* @type String
* <p>Your Facebook application id. You need to set this for anything to work.</p>
* @removed 4.0.0 Set the Facebook App ID in the `tiapp.xml` file. See "Getting Started" above for details.
*/
/**
* @property canPresentOpenGraphActionDialog
* @type Boolean
* @readonly
* <p>Checks if the device can support the use of the Facebook Open Graph action dialog from the Facebook App.</p>
* @platform android 4.0.0
*/
/**
* @property canPresentShareDialog
* @type Boolean
* @readonly
* <p>Checks if the device can support the use of the Facebook Share dialog from the Facebook App.</p>
* @removed 5.0.0
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property expirationDate
* @type Date
* @readonly
* <p>Time at which the <code>accessToken</code> expires.</p>
*/
/**
* @property [forceDialogAuth=true]
* @type Boolean
* <p>Indicates whether the login should use the traditional dialog-based
authentication.</p>
* @removed 4.0.0
* @description <p>Set to <code>false</code> to enable Single-Sign-On (SSO) in cases where the official Facebook app is on the
device. Default is <code>true</code>, meaning the traditional, dialog-based
authentication is used rather than SSO. See the
<a href="http://developers.facebook.com/docs/guides/mobile">Facebook Mobile Guide</a> for
details of their Single-Sign-On scheme.</p>
<p>To use the built-in iOS 6 login, set this property to <code>false</code>.
This property is read-only on Mobile Web.</p>
*/
/**
* @property loggedIn
* @type Boolean
* @readonly
* <p>Indicates if the user is logged in.</p>
*/
/**
* @property MESSENGER_BUTTON_MODE_CIRCULAR
* @type Number
* @readonly
* <p>Use with {@link Modules.Facebook.MessengerButton#property-mode MessengerButton.mode} to specify
the default send button reading "Send".</p>
* @description <p>You can localize the button by localizing "Send" in your strings.xml. Learn more about
that topic <a href="http://docs.appcelerator.com/platform/latest/#!/guide/Internationalization">here</a>.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property MESSENGER_BUTTON_MODE_RECTANGULAR
* @type Number
* @readonly
* <p>Use with {@link Modules.Facebook.MessengerButton#property-mode MessengerButton.mode} to specify
the default send button reading "Send".</p>
* @description <p>You can localize the button by localizing "Send" in your strings.xml. Learn more about
that topic <a href="http://docs.appcelerator.com/platform/latest/#!/guide/Internationalization">here</a>.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property MESSENGER_BUTTON_STYLE_BLUE
* @type Number
* @readonly
* <p>Use with {@link Modules.Facebook.MessengerButton#property-style MessengerButton.style} to specify
the default send button style.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property MESSENGER_BUTTON_STYLE_WHITE
* @type Number
* @readonly
* <p>Use with {@link Modules.Facebook.MessengerButton#property-style MessengerButton.style} to specify
the default send button style.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property MESSENGER_BUTTON_STYLE_WHITE_BORDERED
* @type Number
* @readonly
* <p>Use with {@link Modules.Facebook.MessengerButton#property-style MessengerButton.style} to specify
the default send button style.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property [loginBehavior=Defaults to <Titanium.Modules.Facebook.LOGIN_BEHAVIOR_NATIVE_WITH_FALLBACK> on Android and <Titanium.Modules.Facebook.LOGIN_BEHAVIOR_BROWSER> on iOS (which uses the native Safari Dialog internally).]
* @type Number
* @creationOnly
* <p>Defines the behavior that the module will attempt to use for authorize().</p>
* @description <p>Be sure to set this before calling authorize if this is needed. It is
recommended to follow Facebook's <a href="https://developers.facebook.com/blog/post/2015/10/29/Facebook-Login-iOS9">guidelines</a>
for ideal login behavior</p>
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property permissions
* @type String[]
* <p>Array of permissions to request for your app.</p>
* @description <p>Be sure the permissions you want are set before calling
{@link Modules.Facebook#method-authorize authorize}.</p>
<p>For a complete list of permissions, see the
<a href="https://developers.facebook.com/docs/facebook-login/permissions/v2.2">official Facebook Permissions Reference</a></p>
<h4>iOS Platform Notes</h4>
<p>On iOS, do not request any write permissions before calling the <code>authorize()</code> method. Use the
{@link Modules.Facebook#method-requestNewPublishPermissions requestNewPublishPermissions()}
to request write permissions once the user authorizes the application.</p>
<p><strong>Prior to Release 4.0.0</strong></p>
<p>To use the build-in iOS 6 login, this property cannot contain any of the following:
offline_access, publish_actions, publish_stream, publish_checkins,
ads_management, create_event, rsvp_event, manage_friendlists, manage_notifications,
or manage_pages.</p>
*/
/**
* @property uid
* @type String
* @readonly
* <p>Unique user ID returned from Facebook.</p>
*/
/**
* @class FacebookGraphResponse
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/Facebook.yml
* <p>Argument passed to the graph API callback, in response to a
{@link Modules.Facebook#method-requestWithGraphPath requestWithGraphPath} call.</p>
*/
/**
* @property path
* @type String
* <p>Graph API path of the original request.</p>
*/
/**
* @property result
* @type String
* <p>If successful, returns the JSON response returned by Facebook.
If the request is not successfully completed, the result is undefined.</p>
*/
/**
* @class FacebookPermissionResponse
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/Facebook.yml
* <p>Argument passed to the dialog callback when a dialog is completed or canceled.</p>
* @description <p>The <code>success</code> and <code>cancelled</code> properties may not be reliable for dialogs. In the event
that the user canceled the dialog, the <code>result</code> field is <code>undefined</code>.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if successful</p>
* @description <p>Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.
Will be undefined if <code>success</code> is <code>true</code>.</p>
* @description <p>Will be undefined if <code>success</code> is <code>true</code>.</p>
*/
/**
* @property cancelled
* @type Boolean
* <p>Indicates if the user canceled the dialog.</p>
*/
/**
* @class FacebookReauthResponse
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/Facebook.yml
* <p>Argument passed to the reauthorize callback when the request is completed or canceled.</p>
* @removed 4.0.0
*/
/**
* @property cancelled
* @type Boolean
* <p>Indicates if the user canceled the dialog.</p>
*/
/**
* @class FacebookDialogResponse
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/Facebook.yml
* <p>Argument passed to the dialog callback when a dialog is completed or canceled.</p>
* @removed 4.0.0
* @description <p>The <code>success</code> and <code>cancelled</code> properties may not be reliable for dialogs. In the event
that the user canceled the dialog, the <code>result</code> field is <code>undefined</code>.</p>
*/
/**
* @property cancelled
* @type Boolean
* <p>Indicates if the user canceled the dialog.</p>
*/
/**
* @property result
* @type String
* <p>If successful, returns the JSON response containing the <code>post_id</code> of the new post.
If the user canceled the dialog, the results is undefined.</p>
*/
/**
* @class FacebookRESTResponse
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/Facebook.yml
* <p>Argument passed to the REST API callback when a request completes (successfully
or unsuccessfully).</p>
* @removed 4.0.0
*/
/**
* @property method
* @type String
* <p>REST method call you specified.</p>
*/
/**
* @property result
* @type String
* <p>If successful, returns the JSON response returned by Facebook.
If the request is not successfully completed, the result is undefined.</p>
*/
/**
* @class ShareDialogParams
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/Facebook.yml
* <p>Optional parameters to pass to either the
{@link Modules.Facebook#method-presentShareDialog presentShareDialog()} or
{@link Modules.Facebook#method-presentWebShareDialog presentWebShareDialog()} methods.</p>
*/
/**
* @property caption
* @type String
* <p>Caption for the link.</p>
* @removed 5.0.0
*/
/**
* @property description
* @type String
* <p>Description associated with the link.</p>
*/
/**
* @property link
* @type String
* <p>URL to share.</p>
*/
/**
* @property name
* @type String
* <p>Name or title associated with the link.</p>
* @removed 5.0.0
*/
/**
* @property title
* @type String
* <p>Title associated with the link.</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property picture
* @type String
* <p>Link to a thumbnail to associate with the link.</p>
*/
/**
* @property [mode=Modules.Facebook.SHARE_DIALOG_MODE_AUTOMATIC]
* @type Number
* <p>The mode to select for presenting a share dialog.</p>
* @description <p>The automatic mode will progressively check the availability of different modes and
open the most appropriate mode for the dialog that is available.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Modules.Facebook#property-SHARE_DIALOG_MODE_AUTOMATIC}
<li> {@link Modules.Facebook#property-SHARE_DIALOG_MODE_NATIVE}
<li> {@link Modules.Facebook#property-SHARE_DIALOG_MODE_SHARE_SHEET}
<li> {@link Modules.Facebook#property-SHARE_DIALOG_MODE_BROWSER}
<li> {@link Modules.Facebook#property-SHARE_DIALOG_MODE_WEB}
<li> {@link Modules.Facebook#property-SHARE_DIALOG_MODE_FEED_BROWSER}
<li> {@link Modules.Facebook#property-SHARE_DIALOG_MODE_FEED_WEB}
</ul></p>
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @class MessengerDialogParams
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/Facebook.yml
* <p>Optional parameters to pass to either the
{@link Modules.Facebook#method-presentMessengerDialog presentMessengerDialog()} method.</p>
*/
/**
* @property title
* @type String
* <p>The title to display for this link.</p>
* @description <p>This value may be discarded for specially handled links (ex: iTunes URLs).</p>
*/
/**
* @property description
* @type String
* <p>The description of the link.</p>
* @description <p>If not specified, this field is automatically populated by information scraped from the contentURL,
typically the title of the page. This value may be discarded for specially handled links (ex: iTunes URLs).</p>
*/
/**
* @property link
* @type String
* <p>URL for the content being shared.</p>
* @description <p>This URL will be checked for all link meta tags for linking in platform specific ways.
See Facebook documentation for App Links (<a href="https://developers.facebook.com/docs/applinks/">https://developers.facebook.com/docs/applinks/</a>).</p>
*/
/**
* @property picture
* @type String
* <p>Link to a thumbnail to associate with the link.</p>
*/
/**
* @property to
* @type Arra[]
* <p>List of IDs for taggable people to tag with this content.</p>
* @description <p>See Facebook documentation for Taggable Friends (<a href="https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends">https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends</a>)</p>
*/
/**
* @property placeID
* @type String
* <p>The ID for a place to tag with this content.</p>
*/
/**
* @property referal
* @type String
* <p>A value to be added to the referrer URL when a person follows a link from this shared content on feed.</p>
*/
/**
* @class RequestDialogParams
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/Facebook.yml
* <p>Parameters to pass to {@link Modules.Facebook#method-presentSendRequestDialog presentSendRequestDialog()} method.</p>
*/
/**
* @property message
* @type String
* <p>Message to send with the request.</p>
*/
/**
* @property title
* @type String
* <p>Title of request.</p>
*/
/**
* @property to
* @type Arra[]
* <p>Array of pre-selected facebook ids.</p>
* @removed 5.0.0
*/
/**
* @property recipients
* @type Arra[]
* <p>Array of pre-selected facebook ids.</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property recipientSuggestions
* @type Arra[]
* <p>An array of user IDs that will be included in the dialog as the first suggested friends. Cannot be used together with filters.</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property data
* @type Dictionary
* <p>Additional data to send with the request object.</p>
*/
/**
* @property actionType
* @type Number
* <p>The nature of the request. Required if objectID is set.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Modules.Facebook#property-ACTION_TYPE_NONE}
<li> {@link Modules.Facebook#property-ACTION_TYPE_SEND}
<li> {@link Modules.Facebook#property-ACTION_TYPE_ASK_FOR}
<li> {@link Modules.Facebook#property-ACTION_TYPE_TURN}
</ul></p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property filters
* @type Number
* <p>The set of friends someone sees if a multi-friend selector is shown.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Modules.Facebook#property-FILTER_NONE}
<li> {@link Modules.Facebook#property-FILTER_APP_USERS}
<li> {@link Modules.Facebook#property-FILTER_APP_NON_USERS}
</ul></p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property objectID
* @type String
* <p>The Open Graph object ID of the object being sent. Required if actionType is set.</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @class ShareToMessengerParams
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/Facebook.yml
* <p>Parameters to pass to {@link Modules.Facebook#method-shareMediaToMessenger shareMediaToMessenger()} method.</p>
*/
/**
* @property media
* @type Titanium.Blob
* <p>Media to send with the messenger. Allowed media are images, GIF's and videos represented
as Blobs.</p>
*/
/**
* @property metadata
* @type String
* <p>Pass additional information to be sent to Messenger which is sent back to the user's app when
they reply to an attributed message.</p>
*/
/**
* @property link
* @type String
* <p>Optional property describing the www source URL of the content.</p>
* @description <p>Setting this property improves performance by allowing Messenger to download the content directly
rather than uploading the content from your app. This option is only used for animated GIFs.</p>
*/
/**
* @property [renderAsSticker=false]
* @type Boolean
* <p>Optional property describing whether the content should be rendered like a sticker.</p>
* @description <p>Setting this property informs Messenger that the media content should be rendered as a sticker.
This option is only used for static images.</p>
*/
/**
* @class InviteDialogParams
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/Facebook.yml
* <p>Parameters to pass to {@link Modules.Facebook#method-presentInviteDialog presentInviteDialog()} method.</p>
*/
/**
* @property appLink
* @type String
* <p>An app link target that will be used as a target when the user accept the invite.</p>
* @description <p>This is a requirement. You can find out more about app links <a href="https://developers.facebook.com/docs/applinks">here</a>.</p>
*/
/**
* @property appPreviewImageLink
* @type String
* <p>A URL to a preview image that will be displayed with the app invite</p>
* @description <p>This is optional. If you don't include it a fallback image will be used.</p>
*/
/**
* @class FacebookDeferredAppLinkResponse
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/Facebook.yml
* <p>Object returned from the {@link Modules.Facebook#method-fetchDeferredAppLink fetchDeferredAppLink()} method</p>
*/
/**
* @property url
* @type String
* <p>The URL returned from the server.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the response has succeded and the response contain a URL.</p>
*/
/**
* @property error
* @type String
* <p>A string that contain the error.</p>
*/
/**
* @class Modules.Facebook.LikeButton
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/LikeButton.yml
* <p>A Facebook Like button.</p>
* @description <p>Use the {@link Modules.Facebook#method-createLikeButton createLikeButton()} method to create a Like button.
You must set the {@link Modules.Facebook.LikeButton#property-objectId} before the button is rendered.</p>
<p>By default, the Like button displays a button with a social sentence ('x number of users like y')
next to it. To change the Like button style, set the
{@link Modules.Facebook.LikeButton#property-likeViewStyle} property.</p>
<p>The Like button does not require a click event handler or any listeners.
Click events on the button are automatically handled by the Facebook module.</p>
<p>Facebook policies state:</p>
<blockquote>
Please note that you will have to submit your integration
of the Like button for review via the Status and Review tab in the App Dashboard.
You will also need to abide by our Platform Policy 4.14: if you use the Like button
on iOS or Android, don't collect or use any information from it.
</blockquote>
<p>See the <a href="https://developers.facebook.com/docs/android/like-button">official Facebook Like Button documentation for Android</a>
or the <a href="https://developers.facebook.com/docs/ios/like-button">official Facebook Like Button documentation for iOS</a>
for more information.</p>
<h4>Android Platform Notes</h4>
<p>If the <code>objectId</code> property is not set before the button is rendered,
the Like button will not be displayed.</p>
<h4>iOS Platform Notes</h4>
<p>Do not set the <code>width</code> or <code>height</code> properties of the button to the <code>Ti.UI.SIZE</code> dimension.
This prevents the button from being clicked.</p>
<p>If the <code>objectId</code> property is not set before the button is rendered,
the application will throw an error.</p>
* <h3>Examples</h3>
<h4>Like button to share Appcelerator's Facebook page</h4>
<pre><code>var likeButton = fb.createLikeButton({
top: 230,
height: "50%", // Note: on iOS setting Ti.UI.SIZE dimensions prevents the button from being clicked
width: "50%",
objectID: "<a href="https://www.facebook.com/appcelerator">https://www.facebook.com/appcelerator</a>",
foregroundColor: "white",
likeViewStyle: 'box_count',
auxiliaryViewPosition: 'inline',
horizontalAlignment: 'left',
soundEnabled: true // iOS only
});
if (Ti.Platform.osname == 'android') {
likeButton.height = Ti.UI.SIZE;
likeButton.width = Ti.UI.SIZE;
}
win.add(likeButton);</code></pre>
*/
/**
* @method getAuxiliaryViewPosition
* <p>Gets the value of the {@link Modules.Facebook.LikeButton#property-auxiliaryViewPosition} property.</p>
* @returns {String}
*/
/**
* @method setAuxiliaryViewPosition
* <p>Sets the value of the {@link Modules.Facebook.LikeButton#property-auxiliaryViewPosition} property.</p>
* @param {String} auxiliaryViewPosition
<p>New value for the property.</p>
*/
/**
* @method getForegroundColor
* <p>Gets the value of the {@link Modules.Facebook.LikeButton#property-foregroundColor} property.</p>
* @returns {String/Number}
*/
/**
* @method setForegroundColor
* <p>Sets the value of the {@link Modules.Facebook.LikeButton#property-foregroundColor} property.</p>
* @param {String/Number} foregroundColor
<p>New value for the property.</p>
*/
/**
* @method getHorizontalAlign
* <p>Gets the value of the {@link Modules.Facebook.LikeButton#property-horizontalAlign} property.</p>
* @returns {String}
*/
/**
* @method setHorizontalAlign
* <p>Sets the value of the {@link Modules.Facebook.LikeButton#property-horizontalAlign} property.</p>
* @param {String} horizontalAlign
<p>New value for the property.</p>
*/
/**
* @method getLikeViewStyle
* <p>Gets the value of the {@link Modules.Facebook.LikeButton#property-likeViewStyle} property.</p>
* @returns {String}
*/
/**
* @method setLikeViewStyle
* <p>Sets the value of the {@link Modules.Facebook.LikeButton#property-likeViewStyle} property.</p>
* @param {String} likeViewStyle
<p>New value for the property.</p>
*/
/**
* @method getObjectId
* <p>Gets the value of the {@link Modules.Facebook.LikeButton#property-objectId} property.</p>
* @removed 5.0.0
* @returns {String}
*/
/**
* @method setObjectId
* <p>Sets the value of the {@link Modules.Facebook.LikeButton#property-objectId} property.</p>
* @removed 5.0.0
* @param {String} objectId
<p>New value for the property.</p>
*/
/**
* @method getObjectID
* <p>Gets the value of the {@link Modules.Facebook.LikeButton#property-objectID} property.</p>
* @returns {String}
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @method setObjectID
* <p>Sets the value of the {@link Modules.Facebook.LikeButton#property-objectID} property.</p>
* @param {String} objectID
<p>New value for the property.</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @method getObjectType
* <p>Gets the value of the {@link Modules.Facebook.LikeButton#property-objectType} property.</p>
* @removed 5.0.0
* @returns {String}
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method setObjectType
* <p>Sets the value of the {@link Modules.Facebook.LikeButton#property-objectType} property.</p>
* @removed 5.0.0
* @param {String} objectType
<p>New value for the property.</p>
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method getSoundEnabled
* <p>Gets the value of the {@link Modules.Facebook.LikeButton#property-soundEnabled} property.</p>
* @returns {Boolean}
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method setSoundEnabled
* <p>Sets the value of the {@link Modules.Facebook.LikeButton#property-soundEnabled} property.</p>
* @param {Boolean} soundEnabled
<p>New value for the property.</p>
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property [auxiliaryViewPosition=inline]
* @type String
* <p>Position of the auxiliary view (social sentence or count box)
in relation to the button.</p>
* @description <p>Set to one of the following values:</p>
<ul>
<li><code>top</code>: Position the auxiliary view above the button</li>
<li><code>inline</code>: Position the auxiliary view next to the button</li>
<li><code>bottom</code>: Position the auxiliary view below the button</li>
</ul>
*/
/**
* @property [foregroundColor=black]
* @type String/Number
* <p>Text color of the social sentence as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property [horizontalAlign=left]
* @type String
* <p>Horizontal alignment of the button.</p>
* @description <p>Set to one of the following values:</p>
<ul>
<li><code>left</code>: Left align the button in the parent view.</li>
<li><code>center</code>: Center the button in the parent view.</li>
<li><code>right</code>: Right align the button in the parent view.</li>
</ul>
*/
/**
* @property [likeViewStyle=standard]
* @type String
* <p>Style of the button.</p>
* @description <p>Set to one of the following values:</p>
<ul>
<li><code>box_count</code>: Button with a total like count box.</li>
<li><code>button</code>: Button without social sentence or count box (Deprecated and removed in 5.0.0).</li>
<li><code>standard</code>: Button with the social sentence ('x number of users like y').</li>
</ul>
*/
/**
* @property objectId
* @type String
* <p>Page URL or Open Graph object ID to like.</p>
* @removed 5.0.0
* @description <p>This property must be set before rendering the button.</p>
*/
/**
* @property objectID
* @type String
* <p>Page URL or Open Graph object ID to like.</p>
* @description <p>This property must be set before rendering the button.</p>
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property objectType
* @type String
* <p>Object type.</p>
* @removed 5.0.0
* @description <p>Set to one of the following:</p>
<ul>
<li><code>page</code>: Page object.</li>
<li><code>openGraphObject</code>: Open Graph object.</li>
<li><code>unknown</code>: Unknown object. The Facebook server will try to query for the object.</li>
</ul>
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property soundEnabled
* @type Boolean
* <p>Determines if a sound should be played when the button is clicked.</p>
* @description <p>Set to <code>true</code> for sound.</p>
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @class Modules.Facebook.LoginButton
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/LoginButton.yml
* <p>A Facebook login button.</p>
* @description <p>Use the {@link Modules.Facebook#method-createLoginButton createLoginButton()} method
to create a Login button. If you want to request user permissions when the
user logs in, set either the {@link Modules.Facebook.LoginButton#property-readPermissions} or
{@link Modules.Facebook.LoginButton#property-publishPermissions} property, but do not set both. If both
properties are set, the application will throw an exception. If neither property is set, by
default, only the <code>user_profile</code> permission is requested.</p>
<p>The Login button does not require a click event handler or any listeners.
Click events on the button are automatically handled by the Facebook module.</p>
<p>The button changes its label to reflect the current state of the Facebook
session. For example, if the user is already logged in, the button will show "Logout".</p>
<h4>Android Platform Notes</h4>
<p>In Android, the button's width will change depending on the current state it is in. When
logged out, it will show "Log in with Facebook" and its width will match the length of
the text. When logged in, it will show "Log out" and its width will match the length of
the text.</p>
<h4>iOS Platform Notes</h4>
<p>In iOS, the width of the button can be changed using the <code>width</code> property.</p>
<h4>Prior to Release 4.0.0</h4>
<p>Before using the Login button, set the {@link Modules.Facebook#property-appid appid} property
and {@link Modules.Facebook#property-permissions permissions} property. </p>
*/
/**
* @method getAudience
* <p>Gets the value of the {@link Modules.Facebook.LoginButton#property-audience} property.</p>
* @returns {Number}
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method setAudience
* <p>Sets the value of the {@link Modules.Facebook.LoginButton#property-audience} property.</p>
* @param {Number} audience
<p>New value for the property.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method getReadPermissions
* <p>Gets the value of the {@link Modules.Facebook.LoginButton#property-readPermissions} property.</p>
* @returns {String[]}
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method setReadPermissions
* <p>Sets the value of the {@link Modules.Facebook.LoginButton#property-readPermissions} property.</p>
* @param {Array<String>} readPermissions
<p>New value for the property.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method getPublishPermissions
* <p>Gets the value of the {@link Modules.Facebook.LoginButton#property-publishPermissions} property.</p>
* @returns {String[]}
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method setPublishPermissions
* <p>Sets the value of the {@link Modules.Facebook.LoginButton#property-publishPermissions} property.</p>
* @param {Array<String>} publishPermissions
<p>New value for the property.</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method getSessionLoginBehavior
* <p>Gets the value of the {@link Modules.Facebook.LoginButton#property-sessionLoginBehavior} property.</p>
* @returns {Number}
* @platform android 4.0.0
*/
/**
* @method setSessionLoginBehavior
* <p>Sets the value of the {@link Modules.Facebook.LoginButton#property-sessionLoginBehavior} property.</p>
* @param {Number} sessionLoginBehavior
<p>New value for the property.</p>
* @platform android 4.0.0
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Modules.Facebook.LoginButton#property-style} property.</p>
* @removed 4.0.0
* @returns {Number}
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Modules.Facebook.LoginButton#property-style} property.</p>
* @removed 4.0.0
* @param {Number} style
<p>New value for the property.</p>
*/
/**
* @property [audience=Modules.Facebook.AUDIENCE_ONLY_ME]
* @type Number
* <p>Default audience to use for Facebook posts if publish permissions are requested.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Modules.Facebook#property-AUDIENCE_NONE}
<li> {@link Modules.Facebook#property-AUDIENCE_ONLY_ME}
<li> {@link Modules.Facebook#property-AUDIENCE_FRIENDS}
<li> {@link Modules.Facebook#property-AUDIENCE_EVERYONE}
</ul></p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property readPermissions
* @type String[]
* <p>Requested read permissions.</p>
* @description <p>For a complete list of permissions, see the
<a href="https://developers.facebook.com/docs/facebook-login/permissions/">official Facebook Permissions Reference</a>.</p>
<p>Sets the permissions to use when the session is opened. The permissions here can
only be read permissions. If any publish permissions are included, the login
attempt by the user will fail. The LoginButton can only be associated with either
read permissions or publish permissions, but not both. Using both the <code>readPermissions</code>
and <code>publishPermissions</code> property on the same instance of LoginButton will result in an
exception being thrown.</p>
<p>Set this property before the session is open. If this property is set
after the session is opened, and the list of permissions passed in is not a subset
of the permissions granted during the authorization, it will log an error.</p>
<p>Since the session can be automatically opened when the LoginButton is constructed, it is
important to always pass in a consistent set of permissions to this property, or manage
the setting of permissions outside of the LoginButton class altogether (by managing
the session explicitly).</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property publishPermissions
* @type String[]
* <p>Requested write permissions.</p>
* @description <p>For a complete list of permissions, see the
<a href="https://developers.facebook.com/docs/facebook-login/permissions/">official Facebook Permissions Reference</a>.</p>
<p>Sets the permissions to use when the session is opened. The permissions here should
only be write permissions. If any read permissions are included, the login
attempt by the user will fail. The LoginButton can only be associated with either
read permissions or publish permissions, but not both. Using both the <code>readPermissions</code>
and <code>publishPermissions</code> property on the same instance of LoginButton will result in an
exception being thrown.</p>
<p>Set this property before the session is open. If this property is set
after the session is opened, and the list of permissions passed in is not a subset
of the permissions granted during the authorization, it will log an error.</p>
<p>Since the session can be automatically opened when the LoginButton is constructed, it is
important to always pass in a consistent set of permissions to this property, or manage
the setting of permissions outside of the LoginButton class altogether (by managing
the session explicitly).</p>
* @platform android 4.0.0
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property [sessionLoginBehavior=Modules.Facebook.SSO_WITH_FALLBACK]
* @type Number
* <p>Login behavior for the session.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Modules.Facebook#property-SSO_ONLY}
<li> {@link Modules.Facebook#property-SSO_WITH_FALLBACK}
<li> {@link Modules.Facebook#property-SUPPRESS_SSO}
</ul></p>
* @platform android 4.0.0
*/
/**
* @property style
* @type Number
* <p>Sets the login button style.</p>
* @removed 4.0.0
* @description <p>All versions of the button include the Facebook logo.</p>
<p>Use {@link Modules.Facebook#property-BUTTON_STYLE_WIDE BUTTON_STYLE_WIDE} to show a wider version of the button
that includes the text, "Login with Facebook" or "Connect with Facebook".</p>
<p>Use {@link Modules.Facebook#property-BUTTON_STYLE_NORMAL BUTTON_STYLE_NORMAL} to show a
narrower button that simply says, "Login" or "Connect".</p>
*/
/**
* @class Modules.Facebook.MessengerButton
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator-modules/ti.facebook/edit/master/apidoc/MessengerButton.yml
* <p>A Facebook Messenger button.</p>
* @description <p>Use the [createMessengerButton()](Modules.Facebook. createMessengerButton) method to create a Messenger button.
You must set the {@link Modules.Facebook.MessengerButton#property-mode} and {@link Modules.Facebook.MessengerButton#property-style}
before the button is rendered.</p>
<p>The messenger button differences between a rectangular and a circular button mode. In addition, you can set
different styles by using the constants {@link Modules.Facebook#property-MESSENGER_BUTTON_STYLE_BLUE}, {@link Modules.Facebook#property-MESSENGER_BUTTON_STYLE_WHITE}
or {@link Modules.Facebook#property-MESSENGER_BUTTON_STYLE_WHITE_BORDERED}) to personalize the button. Note: The mode and style property can only be set
on creation. The title of the button can be localized by setting a localization for the key "Send".</p>
<p>The messenger button has a click event to interact with the Facebook messenger. This can for example be done by
calling {@link Modules.Facebook#method-presentMessengerDialog}. </p>
<p>This functionality is currently iOS-only.</p>
* <h3>Examples</h3>
<h4>Messenger button to share the Appcelerator website.</h4>
<pre><code>var fb = require("facebook");
var messengerButton = fb.createMessengerButton({
mode: fb.MESSENGER_BUTTON_MODE_RECTANGULAR
style: fb.MESSENGER_BUTTON_STYLE_BLUE
});
messengerButton.addEventListener("click", function() {
fb.presentMessengerDialog({
title: "Appcelerator Titanium rocks!", // The title of the link
description: "Shared from my Titanium application", // The description of the link
link: "<a href="https://appcelerator.com">https://appcelerator.com</a>", // The link you want to share
to: [] // The user id's you want to preselect in the dialog
});
});
win.add(messengerButton);</code></pre>
*/
/**
* @method getMode
* <p>Gets the value of the {@link Modules.Facebook.MessengerButton#property-mode} property.</p>
* @returns {Number}
*/
/**
* @method setMode
* <p>Sets the value of the {@link Modules.Facebook.MessengerButton#property-mode} property.</p>
* @param {Number} mode
<p>New value for the property.</p>
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Modules.Facebook.MessengerButton#property-style} property.</p>
* @returns {Number}
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Modules.Facebook.MessengerButton#property-style} property.</p>
* @param {Number} style
<p>New value for the property.</p>
*/
/**
* @property [mode=Modules.Facebook.MESSENGER_BUTTON_MODE_RECTANGULAR]
* @type Number
* @creationOnly
* <p>The mode of the messenger button.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Modules.Facebook#property-MESSENGER_BUTTON_MODE_CIRCULAR}
<li> {@link Modules.Facebook#property-MESSENGER_BUTTON_MODE_RECTANGULAR}
</ul></p>
*/
/**
* @property [style=Modules.Facebook.MESSENGER_BUTTON_STYLE_BLUE]
* @type Number
* @creationOnly
* <p>The style of the messenger button.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Modules.Facebook#property-MESSENGER_BUTTON_STYLE_BLUE}
<li> {@link Modules.Facebook#property-MESSENGER_BUTTON_STYLE_WHITE}
<li> {@link Modules.Facebook#property-MESSENGER_BUTTON_STYLE_WHITE_BORDERED}
</ul></p>
*/
/**
* @class Modules.Nfc.NdefMessage
* @platform android 1.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NdefMessage.yml
* <p>Represents an immutable NDEF message.</p>
* @description <p>Use the {@link Modules.Nfc#method-createNdefMessage} method to create an NDEF message.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/NdefMessage.html">NdefMessage</a></p>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
* @platform android 3.0.0
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method toByte
* <p>Return the NDEF message as raw bytes.</p>
* @returns {Titanium.Blob}
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Modules.Nfc.NdefMessage#property-bubbleParent} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Modules.Nfc.NdefMessage#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
* @platform android 3.0.0
*/
/**
* @method getRecords
* <p>Gets the value of the {@link Modules.Nfc.NdefMessage#property-records} property.</p>
* @returns {Modules.Nfc.NdefRecord[]}
*/
/**
* @method setRecords
* <p>Sets the value of the {@link Modules.Nfc.NdefMessage#property-records} property.</p>
* @param {Array<Modules.Nfc.NdefRecord>} records
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
* @platform android 3.0.0
*/
/**
* @property records
* @type Modules.Nfc.NdefRecord[]
* <p>NDEF records inside this NDEF message.</p>
*/
/**
* @class Modules.Nfc.NdefRecord
* @platform android 1.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NdefRecord.yml
* <p>Represents an immutable NDEF record.</p>
* @description <p>The NDEF record is the base type for more type-specific NDEF records. You will generally
work with the type-specific NDEF records (e.g. NdefRecordText, NdefRecordUri, etc.) which have
more applicable properties for each type of record.</p>
<p>Use one of the {@link Modules.Nfc#method-createNdefRecordApplication}, {@link Modules.Nfc#method-createNdefRecordEmpty},
{@link Modules.Nfc#method-createNdefRecordExternal}, {@link Modules.Nfc#method-createNdefRecordMedia}, {@link Modules.Nfc#method-createNdefRecordSmartPoster},
{@link Modules.Nfc#method-createNdefRecordText}, {@link Modules.Nfc#method-createNdefRecordUnknown}, or {@link Modules.Nfc#method-createNdefRecordUri} method
variants to create an NDEF record.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/NdefRecord.html">NdefRecord</a></p>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
* @platform android 3.0.0
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getRecordType
* <p>Returns the record type.</p>
* @description <p>This is the class name of the NDEF record (e.g. NdefRecordText)</p>
* @returns {String}
*/
/**
* @method getId
* <p>Returns the variable length ID.</p>
* @returns {String}
*/
/**
* @method getTnf
* <p>Returns the 3-bit TNF.</p>
* @returns {Number}
*/
/**
* @method getType
* <p>Returns the variable length Type field.</p>
* @returns {String}
*/
/**
* @method getHashCode
* <p>Returns the integer hash code for this object.</p>
* @returns {Number}
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Modules.Nfc.NdefRecord#property-bubbleParent} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Modules.Nfc.NdefRecord#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
* @platform android 3.0.0
*/
/**
* @method getPayload
* <p>Gets the value of the {@link Modules.Nfc.NdefRecord#property-payload} property.</p>
* @returns {Titanium.Blob}
*/
/**
* @method setPayload
* <p>Sets the value of the {@link Modules.Nfc.NdefRecord#property-payload} property.</p>
* @param {Titanium.Blob} payload
<p>New value for the property.</p>
*/
/**
* @method getRecordType
* <p>Gets the value of the {@link Modules.Nfc.NdefRecord#property-recordType} property.</p>
* @returns {String}
*/
/**
* @method getId
* <p>Gets the value of the {@link Modules.Nfc.NdefRecord#property-id} property.</p>
* @returns {String}
*/
/**
* @method getTnf
* <p>Gets the value of the {@link Modules.Nfc.NdefRecord#property-tnf} property.</p>
* @returns {Number}
*/
/**
* @method getType
* <p>Gets the value of the {@link Modules.Nfc.NdefRecord#property-type} property.</p>
* @returns {String}
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
* @platform android 3.0.0
*/
/**
* @property payload
* @type Titanium.Blob
* <p>The variable length payload for the record.</p>
*/
/**
* @property recordType
* @type String
* @readonly
* <p>The record type.</p>
*/
/**
* @property id
* @type String
* @readonly
* <p>The variable length ID.</p>
*/
/**
* @property tnf
* @type Number
* @readonly
* <p>The 3-bit TNF.</p>
*/
/**
* @property type
* @type String
* @readonly
* <p>The variable length Type field.</p>
*/
/**
* @property hashCode
* @type Number
* @readonly
* <p>The integer hash code for this object.</p>
*/
/**
* @class Modules.Nfc.NdefRecordApplication
* @platform android 1.0.0
* @extends Modules.Nfc.NdefRecord
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NdefRecord.yml
* <p>Represents an immutable NDEF record indicating the package that should be used to handle the entire NDEF message.</p>
* @description <p>This record type was introduced in Android 4.0 (API level 14).</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/NdefRecord.html#createApplicationRecord%28java.lang.String%29">createApplicationRecord</a></p>
*/
/**
* @method getPackageName
* <p>Gets the value of the {@link Modules.Nfc.NdefRecordApplication#property-packageName} property.</p>
* @returns {String}
*/
/**
* @method setPackageName
* <p>Sets the value of the {@link Modules.Nfc.NdefRecordApplication#property-packageName} property.</p>
* @param {String} packageName
<p>New value for the property.</p>
*/
/**
* @property packageName
* @type String
* <p>Application package name.</p>
*/
/**
* @class Modules.Nfc.NdefRecordEmpty
* @platform android 1.0.0
* @extends Modules.Nfc.NdefRecord
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NdefRecord.yml
* <p>Represents an immutable NDEF record that is empty.</p>
*/
/**
* @class Modules.Nfc.NdefRecordExternal
* @platform android 1.0.0
* @extends Modules.Nfc.NdefRecord
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NdefRecord.yml
* <p>Represents an immutable NDEF record containing external (application-specific) data.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/nfc/NdefRecord.html#createExternal%28java.lang.String, java.lang.String, byte%5b%5d%29">createExternal</a></p>
*/
/**
* @method getDomain
* <p>Gets the value of the {@link Modules.Nfc.NdefRecordExternal#property-domain} property.</p>
* @returns {String}
*/
/**
* @method setDomain
* <p>Sets the value of the {@link Modules.Nfc.NdefRecordExternal#property-domain} property.</p>
* @param {String} domain
<p>New value for the property.</p>
*/
/**
* @method getDomainType
* <p>Gets the value of the {@link Modules.Nfc.NdefRecordExternal#property-domainType} property.</p>
* @returns {String}
*/
/**
* @method setDomainType
* <p>Sets the value of the {@link Modules.Nfc.NdefRecordExternal#property-domainType} property.</p>
* @param {String} domainType
<p>New value for the property.</p>
*/
/**
* @property domain
* @type String
* <p>Domain name of issuing organization.</p>
*/
/**
* @property domainType
* @type String
* <p>Domain-specific type of data.</p>
*/
/**
* @class Modules.Nfc.NdefRecordMedia
* @platform android 1.0.0
* @extends Modules.Nfc.NdefRecord
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NdefRecord.yml
* <p>Represents an immutable NDEF record containing MIME data.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/nfc/NdefRecord.html#createMime%28java.lang.String, byte%5b%5d%29">createMime</a></p>
*/
/**
* @method getMimeType
* <p>Gets the value of the {@link Modules.Nfc.NdefRecordMedia#property-mimeType} property.</p>
* @returns {String}
*/
/**
* @method setMimeType
* <p>Sets the value of the {@link Modules.Nfc.NdefRecordMedia#property-mimeType} property.</p>
* @param {String} mimeType
<p>New value for the property.</p>
*/
/**
* @property mimeType
* @type String
* <p>A valid MIME type.</p>
*/
/**
* @class Modules.Nfc.NdefRecordSmartPoster
* @platform android 1.0.0
* @extends Modules.Nfc.NdefRecord
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NdefRecord.yml
* <p>Represents an immutable NDEF record containing a Smart Poster message.</p>
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Modules.Nfc.NdefRecordSmartPoster#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Modules.Nfc.NdefRecordSmartPoster#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getUri
* <p>Gets the value of the {@link Modules.Nfc.NdefRecordSmartPoster#property-uri} property.</p>
* @returns {String}
*/
/**
* @method setUri
* <p>Sets the value of the {@link Modules.Nfc.NdefRecordSmartPoster#property-uri} property.</p>
* @param {String} uri
<p>New value for the property.</p>
*/
/**
* @method getAction
* <p>Gets the value of the {@link Modules.Nfc.NdefRecordSmartPoster#property-action} property.</p>
* @returns {Number}
*/
/**
* @method setAction
* <p>Sets the value of the {@link Modules.Nfc.NdefRecordSmartPoster#property-action} property.</p>
* @param {Number} action
<p>New value for the property.</p>
*/
/**
* @method getMimeType
* <p>Gets the value of the {@link Modules.Nfc.NdefRecordSmartPoster#property-mimeType} property.</p>
* @returns {String}
*/
/**
* @method setMimeType
* <p>Sets the value of the {@link Modules.Nfc.NdefRecordSmartPoster#property-mimeType} property.</p>
* @param {String} mimeType
<p>New value for the property.</p>
*/
/**
* @property title
* @type String
* <p>Title for the Smart Poster.</p>
*/
/**
* @property uri
* @type String
* <p>Uri for the external resource.</p>
*/
/**
* @property action
* @type Number
* <p>Recommended action.</p>
*/
/**
* @property mimeType
* @type String
* <p>A valid MIME type for the external resource.</p>
*/
/**
* @class Modules.Nfc.NdefRecordText
* @platform android 1.0.0
* @extends Modules.Nfc.NdefRecord
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NdefRecord.yml
* <p>Represents an immutable NDEF record containing text.</p>
*/
/**
* @method getText
* <p>Gets the value of the {@link Modules.Nfc.NdefRecordText#property-text} property.</p>
* @returns {String}
*/
/**
* @method setText
* <p>Sets the value of the {@link Modules.Nfc.NdefRecordText#property-text} property.</p>
* @param {String} text
<p>New value for the property.</p>
*/
/**
* @method getLanguageCode
* <p>Gets the value of the {@link Modules.Nfc.NdefRecordText#property-languageCode} property.</p>
* @returns {String}
*/
/**
* @method setLanguageCode
* <p>Sets the value of the {@link Modules.Nfc.NdefRecordText#property-languageCode} property.</p>
* @param {String} languageCode
<p>New value for the property.</p>
*/
/**
* @method getEncoding
* <p>Gets the value of the {@link Modules.Nfc.NdefRecordText#property-encoding} property.</p>
* @returns {String}
*/
/**
* @method setEncoding
* <p>Sets the value of the {@link Modules.Nfc.NdefRecordText#property-encoding} property.</p>
* @param {String} encoding
<p>New value for the property.</p>
*/
/**
* @property text
* @type String
* <p>Text.</p>
*/
/**
* @property languageCode
* @type String
* <p>Language code. Defaults to current locale.</p>
*/
/**
* @property encoding
* @type String
* <p>Encoding format. Default is ENCODING_UTF8 ("UTF-8");</p>
*/
/**
* @class Modules.Nfc.NdefRecordUnknown
* @platform android 1.0.0
* @extends Modules.Nfc.NdefRecord
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NdefRecord.yml
* <p>Represents an immutable NDEF record containing an unknown data format.</p>
*/
/**
* @class Modules.Nfc.NdefRecordUri
* @platform android 1.0.0
* @extends Modules.Nfc.NdefRecord
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NdefRecord.yml
* <p>Represents an immutable NDEF record containing a URI.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/nfc/NdefRecord.html#createUri%28java.lang.String%29">createUri</a></p>
*/
/**
* @method getUri
* <p>Gets the value of the {@link Modules.Nfc.NdefRecordUri#property-uri} property.</p>
* @returns {String}
*/
/**
* @method setUri
* <p>Sets the value of the {@link Modules.Nfc.NdefRecordUri#property-uri} property.</p>
* @param {String} uri
<p>New value for the property.</p>
*/
/**
* @property uri
* @type String
* <p>URI or URL.</p>
*/
/**
* @class Modules.Nfc
* @platform android 1.0.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/Nfc.yml
* <p>Near Field Communication (NFC) module</p>
* @description <p>This module provides access to Near Field Communication (NFC) functionality, allowing applications to read and write <br>
NFC tags. A "tag" may actually be another device that appears as a tag.</p>
<h3>NFC Resources</h3>
<ul>
<li><a href="http://developer.android.com/guide/topics/connectivity/nfc/index.html">Near Field Communication</a></li>
<li><a href="http://developer.android.com/reference/android/nfc/package-summary.html">android.nfc</a></li>
</ul>
<h3>Requirements</h3>
<ul>
<li>An NFC capable device is required.</li>
<li>Android API level 10</li>
</ul>
<h3>Getting Started</h3>
<ul>
<li>View the <a href="http://docs.appcelerator.com/titanium/latest/#!/guide/Using_Titanium_Modules">Using Titanium Modules</a>
document for instructions on getting started with using this module in your application.</li>
</ul>
<h3>Accessing the Module</h3>
<ul>
<li><p>Use <code>require</code> to access this module from JavaScript:</p>
<pre><code>var nfc = require("ti.nfc");
</code></pre>
<p>The <code>nfc</code> variable is a reference to the Module object.</p></li>
</ul>
<h3>Tag Dispatching and Intent Filters</h3>
<ul>
<li><p>The Android <a href="http://developer.android.com/guide/topics/connectivity/nfc/nfc.html#tag-dispatch">tag dispatch system</a>
is responsible for dispatching NFC messages to the appropriate application. In the
situation where you are not using foreground dispatching, you will need to define intent-filters in the
tiapp.xml file to specify which types of NFC messages the application wants to receive. By using intent-filters in
the tiapp.xml file, the application will be automatically started if a matching
NFC message is dispatched. </p>
<p>Add code similar to the following to your tiapp.xml file:</p>
<ul><li>Replace occurrences of the activity name with your activity name.</li>
<li><code>android:launchMode="singleTask"</code> is needed so that new intents that result from NFC message dispatching do not start a new activity in your application.</li>
<li><p>Replace the NFC specific intent filters with filters appropriate for your application.</p>
<pre><code><android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<application>
<activity android:name=".TagviewerActivity"
android:label="TagViewer" android:theme="@style/Theme.Titanium"
android:configChanges="keyboardHidden|orientation"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="http"/>
</intent-filter>
</activity>
</application>
</manifest>
</android>
</code></pre></li></ul>
<p>Note that if you are using <a href="http://developer.android.com/guide/topics/connectivity/nfc/advanced-nfc.html#foreground-dispatch">foreground dispatching</a>
you do not need to define intent filters in the application's tiapp.xml file.</p></li>
</ul>
<h3>Creating an Adapter</h3>
<ul>
<li><p>The NFC adapter gives you access to the features of the NFC device. The NFC adapter proxy is always
associated with the activity that was the current activity when it was created. Therefore, the NFC
Adapter should be created after the activity has been opened. You can use the window <code>open</code> event to know
when the activity has been opened. </p>
<pre><code>$.index.addEventListener('open', function(e) {
nfcAdapter = nfc.createNfcAdapter({
onNdefDiscovered: handleDiscovery,
onTagDiscovered: handleDiscovery,
onTechDiscovered: handleDiscovery
});
});
</code></pre></li>
</ul>
<h3>Handling Intents</h3>
<ul>
<li><p>NFC Intents are dispatched to an activity by the Android tag dispatch system. When your activity receives a new intent,
it must forward the intent to the <code>onNewIntent</code> method of the NFC adapter for processing.</p>
<pre><code>var act = Ti.Android.currentActivity;
act.addEventListener('newintent', function(e) {
nfcAdapter.onNewIntent(e.intent);
});
</code></pre>
<p>If your application is started as the result of an NFC intent, that intent will automatically be processed when the
NFC module is loaded.</p></li>
</ul>
<h3>Foreground Dispatch</h3>
<ul>
<li><p>The foreground dispatch system allows an activity to intercept an intent and claim priority over other activities that handle the same intent.
When using foreground dispatching, you must process the <code>pause</code> and <code>resume</code> events on the activity and enable or disable
foreground dispatching.</p>
<pre><code>var act = Ti.Android.currentActivity;
act.addEventListener('resume', function(e) {
nfcAdapter.enableForegroundDispatch(dispatchFilter);
});
act.addEventListener('pause', function(e) {
nfcAdapter.disableForegroundDispatch();
});
</code></pre></li>
</ul>
<h3>Example applications</h3>
<ul>
<li><p>Example applications are located in the <code>example</code> folder of the module:</p>
<ul><li><code>TagBeam</code> demonstrates how to use Android Beam to send messages to another NFC capable device.</li>
<li><code>TagForeground</code> demonstrates how to read NFC tags only when the application is in the foreground.</li>
<li><code>TagViewer</code> demonstrates how to receive NFC tag intents even when the application is not running.</li>
<li><code>TagWriter</code> demonstrates how to write to an NFC tag using the Ndef tag technology data format.</li></ul></li>
</ul>
* <h3>Examples</h3>
<h4>Creating NFC Adapter</h4>
<p>This example demonstrates the proper technique for creating an NFC adapter in the current activity. The
NFC Adapter should be created after the activity has been opened.</p>
<pre><code>var nfc = require('ti.nfc');
var nfcAdapter = null;
$.index.addEventListener('open', function(e) {
// Must wait until the activity has been opened before setting up NFC
// Create the NFC adapter to be associated with this activity.
// There should only be ONE adapter created per activity.
nfcAdapter = nfc.createNfcAdapter({
onNdefDiscovered: handleDiscovery,
onTagDiscovered: handleDiscovery,
onTechDiscovered: handleDiscovery
});
// It's possible that the device does not support NFC. Check it here
// before we go any further.
if (!nfcAdapter.isEnabled()) {
alert('NFC is not enabled on this device');
return;
}
});
$.index.open();
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
* @platform android 3.0.0
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method createNdefMessage
* <p>Creates and returns an instance of {@link Modules.Nfc.NdefMessage}.</p>
* @param {Dictionary<Modules.Nfc.NdefMessage>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.NdefMessage} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.NdefMessage}
*/
/**
* @method createNdefRecordApplication
* <p>Creates and returns an instance of {@link Modules.Nfc.NdefRecordApplication}.</p>
* @param {Dictionary<Modules.Nfc.NdefRecordApplication>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.NdefRecordApplication} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.NdefRecordApplication}
*/
/**
* @method createNdefRecordEmpty
* <p>Creates and returns an instance of {@link Modules.Nfc.NdefRecordEmpty}.</p>
* @param {Dictionary<Modules.Nfc.NdefRecordEmpty>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.NdefRecordEmpty} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.NdefRecordEmpty}
*/
/**
* @method createNdefRecordExternal
* <p>Creates and returns an instance of {@link Modules.Nfc.NdefRecordExternal}.</p>
* @param {Dictionary<Modules.Nfc.NdefRecordExternal>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.NdefRecordExternal} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.NdefRecordExternal}
*/
/**
* @method createNdefRecordMedia
* <p>Creates and returns an instance of {@link Modules.Nfc.NdefRecordMedia}.</p>
* @param {Dictionary<Modules.Nfc.NdefRecordMedia>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.NdefRecordMedia} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.NdefRecordMedia}
*/
/**
* @method createNdefRecordSmartPoster
* <p>Creates and returns an instance of {@link Modules.Nfc.NdefRecordSmartPoster}.</p>
* @param {Dictionary<Modules.Nfc.NdefRecordSmartPoster>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.NdefRecordSmartPoster} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.NdefRecordSmartPoster}
*/
/**
* @method createNdefRecordText
* <p>Creates and returns an instance of {@link Modules.Nfc.NdefRecordText}.</p>
* @param {Dictionary<Modules.Nfc.NdefRecordText>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.NdefRecordText} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.NdefRecordText}
*/
/**
* @method createNdefRecordUnknown
* <p>Creates and returns an instance of {@link Modules.Nfc.NdefRecordUnknown}.</p>
* @param {Dictionary<Modules.Nfc.NdefRecordUnknown>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.NdefRecordUnknown} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.NdefRecordUnknown}
*/
/**
* @method createNdefRecordUri
* <p>Creates and returns an instance of {@link Modules.Nfc.NdefRecordUri}.</p>
* @param {Dictionary<Modules.Nfc.NdefRecordUri>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.NdefRecordUri} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.NdefRecordUri}
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Modules.Nfc#property-bubbleParent} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Modules.Nfc#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
* @platform android 3.0.0
*/
/**
* @method createNfcAdapter
* <p>Creates and returns an instance of {@link Modules.Nfc.NfcAdapter}.</p>
* @param {Dictionary<Modules.Nfc.NfcAdapter>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.NfcAdapter} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.NfcAdapter}
*/
/**
* @method createNfcForegroundDispatchFilter
* <p>Creates and returns an instance of {@link Modules.Nfc.NfcForegroundDispatchFilter}.</p>
* @param {Dictionary<Modules.Nfc.NfcForegroundDispatchFilter>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.NfcForegroundDispatchFilter} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.NfcForegroundDispatchFilter}
*/
/**
* @method createTagTechnologyIsoDep
* <p>Creates and returns an instance of {@link Modules.Nfc.TagTechnologyIsoDep}.</p>
* @param {Dictionary<Modules.Nfc.TagTechnologyIsoDep>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.TagTechnologyIsoDep} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.TagTechnologyIsoDep}
* @platform android 1.1.0
*/
/**
* @method createTagTechnologyMifareClassic
* <p>Creates and returns an instance of {@link Modules.Nfc.TagTechnologyMifareClassic}.</p>
* @param {Dictionary<Modules.Nfc.TagTechnologyMifareClassic>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.TagTechnologyMifareClassic} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.TagTechnologyMifareClassic}
* @platform android 1.1.0
*/
/**
* @method createTagTechnologyMifareUltralight
* <p>Creates and returns an instance of {@link Modules.Nfc.TagTechnologyMifareUltralight}.</p>
* @param {Dictionary<Modules.Nfc.TagTechnologyMifareUltralight>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.TagTechnologyMifareUltralight} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.TagTechnologyMifareUltralight}
* @platform android 1.1.0
*/
/**
* @method createTagTechnologyNdefFormatable
* <p>Creates and returns an instance of {@link Modules.Nfc.TagTechnologyNdefFormatable}.</p>
* @param {Dictionary<Modules.Nfc.TagTechnologyNdefFormatable>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.TagTechnologyNdefFormatable} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.TagTechnologyNdefFormatable}
* @platform android 1.1.0
*/
/**
* @method createTagTechnologyNdef
* <p>Creates and returns an instance of {@link Modules.Nfc.TagTechnologyNdef}.</p>
* @param {Dictionary<Modules.Nfc.TagTechnologyNdef>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.TagTechnologyNdef} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.TagTechnologyNdef}
* @platform android 1.1.0
*/
/**
* @method createTagTechnologyNfcA
* <p>Creates and returns an instance of {@link Modules.Nfc.TagTechnologyNfcA}.</p>
* @param {Dictionary<Modules.Nfc.TagTechnologyNfcA>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.TagTechnologyNfcA} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.TagTechnologyNfcA}
* @platform android 1.1.0
*/
/**
* @method createTagTechnologyNfcB
* <p>Creates and returns an instance of {@link Modules.Nfc.TagTechnologyNfcB}.</p>
* @param {Dictionary<Modules.Nfc.TagTechnologyNfcB>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.TagTechnologyNfcB} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.TagTechnologyNfcB}
* @platform android 1.1.0
*/
/**
* @method createTagTechnologyNfcF
* <p>Creates and returns an instance of {@link Modules.Nfc.TagTechnologyNfcF}.</p>
* @param {Dictionary<Modules.Nfc.TagTechnologyNfcF>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.TagTechnologyNfcF} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.TagTechnologyNfcF}
* @platform android 1.1.0
*/
/**
* @method createTagTechnologyNfcV
* <p>Creates and returns an instance of {@link Modules.Nfc.TagTechnologyNfcV}.</p>
* @param {Dictionary<Modules.Nfc.TagTechnologyNfcV>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Modules.Nfc.TagTechnologyNfcV} except those marked not-creation or read-only.</p>
* @returns {Modules.Nfc.TagTechnologyNfcV}
* @platform android 1.1.0
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
* @platform android 3.0.0
*/
/**
* @property ACTION_NDEF_DISCOVERED
* @type String
* @readonly
* <p>Intent to start an activity when a tag with NDEF payload is discovered.</p>
*/
/**
* @property ACTION_TAG_DISCOVERED
* @type String
* @readonly
* <p>Intent to start an activity when a tag is discovered.</p>
*/
/**
* @property ACTION_TECH_DISCOVERED
* @type String
* @readonly
* <p>Intent to start an activity when a tag is discovered and activities are registered for the specific technologies on the tag.</p>
*/
/**
* @property TNF_ABSOLUTE_URI
* @type Number
* @readonly
* <p>Used with ndefRecord records.
Indicates the type field contains an absolute-URI BNF construct defined by RFC 3986.</p>
*/
/**
* @property TNF_EMPTY
* @type Number
* @readonly
* <p>Used with ndefRecord records.
Indicates the record is empty.</p>
*/
/**
* @property TNF_EXTERNAL_TYPE
* @type Number
* @readonly
* <p>Used with ndefRecord records.
Indicates the type field contains an external type name.</p>
*/
/**
* @property TNF_MIME_MEDIA
* @type Number
* @readonly
* <p>Used with ndefRecord records. <br>
Indicates the type field contains a media-type BNF construct, defined by RFC 2046.</p>
*/
/**
* @property TNF_UNCHANGED
* @type Number
* @readonly
* <p>Used with ndefRecord records. <br>
Indicates the payload is an intermediate or final chunk of a chunked NDEF Record.</p>
*/
/**
* @property TNF_UNKNOWN
* @type Number
* @readonly
* <p>Used with ndefRecord records. <br>
Indicates the payload type is unknown.</p>
*/
/**
* @property TNF_WELL_KNOWN
* @type Number
* @readonly
* <p>Used with ndefRecord records. <br>
Indicates the type field contains a well-known RTD type name.</p>
*/
/**
* @property RTD_ALTERNATIVE_CARRIER
* @type String
* @readonly
* <p>Used with ndefRecord records. <br>
RTD Alternative Carrier type. For use with TNF_WELL_KNOWN.</p>
*/
/**
* @property RTD_HANDOVER_CARRIER
* @type String
* @readonly
* <p>Used with ndefRecord records. <br>
RTD Handover Carrier type. For use with TNF_WELL_KNOWN.</p>
*/
/**
* @property RTD_HANDOVER_REQUEST
* @type String
* @readonly
* <p>Used with ndefRecord records. <br>
RTD Handover Request type. For use with TNF_WELL_KNOWN.</p>
*/
/**
* @property RTD_HANDOVER_SELECT
* @type String
* @readonly
* <p>Used with ndefRecord records. <br>
RTD Handover Select type. For use with TNF_WELL_KNOWN.</p>
*/
/**
* @property RTD_SMART_POSTER
* @type String
* @readonly
* <p>Used with ndefRecord records. <br>
RTD Smart Poster type. For use with TNF_WELL_KNOWN.</p>
*/
/**
* @property RTD_TEXT
* @type String
* @readonly
* <p>Used with ndefRecord records. <br>
RTD Text type. For use with TNF_WELL_KNOWN.</p>
*/
/**
* @property RTD_URI
* @type String
* @readonly
* <p>Used with ndefRecord records. <br>
RTD URI type. For use with TNF_WELL_KNOWN.</p>
*/
/**
* @property TECH_ISODEP
* @type Number
* @readonly
* <p>Available tag technology used with getTechList and AdapterProxy.</p>
*/
/**
* @property TECH_MIFARE_CLASSIC
* @type Number
* @readonly
* <p>Available tag technology used with getTechList and AdapterProxy.</p>
*/
/**
* @property TECH_MIFARE_ULTRALIGHT
* @type Number
* @readonly
* <p>Available tag technology used with getTechList and AdapterProxy.</p>
*/
/**
* @property TECH_NDEF
* @type Number
* @readonly
* <p>Available tag technology used with getTechList and AdapterProxy.</p>
*/
/**
* @property TECH_NDEFFORMATABLE
* @type Number
* @readonly
* <p>Available tag technology used with getTechList and AdapterProxy.</p>
*/
/**
* @property TECH_NFCA
* @type Number
* @readonly
* <p>Available tag technology used with getTechList and AdapterProxy.</p>
*/
/**
* @property TECH_NFCB
* @type Number
* @readonly
* <p>Available tag technology used with getTechList and AdapterProxy.</p>
*/
/**
* @property TECH_NFCF
* @type Number
* @readonly
* <p>Available tag technology used with getTechList and AdapterProxy.</p>
*/
/**
* @property TECH_NFCV
* @type Number
* @readonly
* <p>Available tag technology used with getTechList and AdapterProxy.</p>
*/
/**
* @property ENCODING_UTF8
* @type String
* @readonly
* <p>Used with ndefRecord records. <br>
Indicates UTF-8 text encoding.</p>
*/
/**
* @property ENCODING_UTF16
* @type String
* @readonly
* <p>Used with ndefRecord records. <br>
Indicates UTF-16 text encoding.</p>
*/
/**
* @property RECOMMENDED_ACTION_UNKNOWN
* @type Number
* @readonly
* <p>Used with NdefSmartPoster records (RTD_SMART_POSTER).</p>
*/
/**
* @property RECOMMENDED_ACTION_DO_ACTION
* @type Number
* @readonly
* <p>Used with NdefSmartPoster records (RTD_SMART_POSTER).</p>
*/
/**
* @property RECOMMENDED_ACTION_SAVE_FOR_LATER
* @type Number
* @readonly
* <p>Used with NdefSmartPoster records (RTD_SMART_POSTER).</p>
*/
/**
* @property RECOMMENDED_ACTION_OPEN_FOR_EDITING
* @type Number
* @readonly
* <p>Used with NdefSmartPoster records (RTD_SMART_POSTER).</p>
*/
/**
* @property TAG_TYPE_NFC_FORUM_TYPE_1
* @type String
* @readonly
* <p>Used with TECH_NDEF tag technology.
NFC Forum Tag Type 1.</p>
* @platform android 1.1.0
*/
/**
* @property TAG_TYPE_NFC_FORUM_TYPE_2
* @type String
* @readonly
* <p>Used with TECH_NDEF tag technology.
NFC Forum Tag Type 2.</p>
* @platform android 1.1.0
*/
/**
* @property TAG_TYPE_NFC_FORUM_TYPE_3
* @type String
* @readonly
* <p>Used with TECH_NDEF tag technology.
NFC Forum Tag Type 3.</p>
* @platform android 1.1.0
*/
/**
* @property TAG_TYPE_NFC_FORUM_TYPE_4
* @type String
* @readonly
* <p>Used with TECH_NDEF tag technology.
NFC Forum Tag Type 4.</p>
* @platform android 1.1.0
*/
/**
* @property TAG_TYPE_MIFARE_CLASSIC
* @type String
* @readonly
* <p>Used with TECH_NDEF tag technology.
NDEF on MIFARE Classic.</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_TAG_TYPE_CLASSIC
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_CLASSIC tag technology.
A MIFARE Classic tag.</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_TAG_TYPE_PLUS
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_CLASSIC tag technology.
A MIFARE Plus tag.</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_TAG_TYPE_PRO
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_CLASSIC tag technology.
A MIFARE Pro tag.</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_TAG_TYPE_UNKNOWN
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_CLASSIC tag technology.
A MIFARE Classic compatible card of unknown type.</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_BLOCK_SIZE
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_CLASSIC tag technology.
Size of a MIFARE CLassic block (in bytes).</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_SIZE_1K
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_CLASSIC tag technology.
Tag contains 16 sectors, each with 4 blocks.</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_SIZE_2K
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_CLASSIC tag technology.
Tag contains 32 sectors, each with 4 blocks.</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_SIZE_4K
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_CLASSIC tag technology.
Tag contains 40 sectors.</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_SIZE_MINI
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_CLASSIC tag technology.
Tag contains 5 sectors, each with 4 blocks.</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_ULTRALIGHT_PAGE_SIZE
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_ULTRALIGHT tag technology.
Size of a MIFARE Ultralight page (in bytes).</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_ULTRALIGHT_TYPE_ULTRALIGHT
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_ULTRALIGHT tag technology.
A MIFARE Ultralight tag.</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_ULTRALIGHT_TYPE_ULTRALIGHT_C
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_ULTRALIGHT tag technology.
A MIFARE Ultralight C tag.</p>
* @platform android 1.1.0
*/
/**
* @property MIFARE_ULTRALIGHT_TYPE_UNKNOWN
* @type Number
* @readonly
* <p>Used with TECH_MIFARE_ULTRALIGHT tag technology.
A MIFARE Ultralight compatible tag of unknown type.</p>
* @platform android 1.1.0
*/
/**
* @class Modules.Nfc.NfcAdapter
* @platform android 1.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NfcAdapter.yml
* <p>Represents the local NFC adapter.</p>
* @description <p>The NFC adapter gives you access to the features of the NFC device. The NFC adapter proxy is always
associated with the activity that was the current activity when it was created. The NFC Adapter must
be created after the activity has been opened. You can use the window <code>open</code> event to know when the
activity has been opened.</p>
<p>Use the {@link Modules.Nfc#method-createNfcAdapter} method to create an NFC adapter.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/NfcAdapter.html">NfcAdapter</a></p>
* <h3>Examples</h3>
<h4>Foreground Dispatch</h4>
<p>This example uses foreground dispatch to receive NDEF messages only when the application is in the foreground.</p>
<pre><code>// Create the NFC adapter to be associated with this activity.
// There should only be ONE adapter created per activity.
nfcAdapter = nfc.createNfcAdapter({
onNdefDiscovered: handleDiscovery,
onTagDiscovered: handleDiscovery,
onTechDiscovered: handleDiscovery
});
// It's possible that the device does not support NFC. Check it here
// before we go any further.
if (!nfcAdapter.isEnabled()) {
alert('NFC is not enabled on this device');
return;
}
// All tag scans are received by the activity as a new intent. Each
// scan intent needs to be passed to the nfc adapter for processing.
var act = Ti.Android.currentActivity;
act.addEventListener('newintent', function(e) {
nfcAdapter.onNewIntent(e.intent);
});
// To enable NFC dispatching only while the application is in the foreground,
// the application must signal the module whenever the application state changes.
act.addEventListener('resume', function(e) {
nfcAdapter.enableForegroundDispatch(dispatchFilter);
});
act.addEventListener('pause', function(e) {
nfcAdapter.disableForegroundDispatch();
});
// This application is only interested in receiving NFC messages while
// in the foreground. So the dispatch filter must be defined to identify
// what types of NFC messages to receive.
dispatchFilter = nfc.createNfcForegroundDispatchFilter({
intentFilters: [
{ action: nfc.ACTION_NDEF_DISCOVERED, mimeType: 'text/plain' },
{ action: nfc.ACTION_NDEF_DISCOVERED, scheme: 'http', host: 'www.appcelerator.com' }
],
techLists: [
[ "android.nfc.tech.NfcF" ],
[ "android.nfc.tech.Ndef" ],
[ "android.nfc.tech.MifareClassic" ],
[ "android.nfc.tech.NfcA" ]
]
});
</code></pre><h4>Push Message</h4>
<p>This example sets a default push message to send using Android Beam.</p>
<pre><code>// Create the NFC adapter to be associated with this activity.
// There should only be ONE adapter created per activity.
nfcAdapter = nfc.createNfcAdapter({});
// It's possible that the device does not support NFC. Check it here
// before we go any further.
if (!nfcAdapter.isNdefPushEnabled()) {
alert('NFC is not enabled on this device');
return;
}
// Set the default Ndef message to send when tapped
var textRecord = nfc.createNdefRecordText({
text: "NDEF Push Sample"
});
var msg = nfc.createNdefMessage({
records: [ textRecord ]
});
nfcAdapter.setNdefPushMessage(msg);
</code></pre><h4>Push Message Callback</h4>
<p>This example uses the push message callback to dynamically create the NDEF message as needed.</p>
<pre><code>// Create the NFC adapter to be associated with this activity.
// There should only be ONE adapter created per activity.
nfcAdapter = nfc.createNfcAdapter({
onPushMessage: function() {
if (sendText) {
ndefRecord = nfc.createNdefRecordText({
text: "Hello"
});
} else {
ndefRecord = nfc.createNdefRecordUri({
uri: "http://www.appcelerator.com"
});
}
return nfc.createNdefMessage({
records: [
ndefRecord
]
});
}
});
// It's possible that the device does not support NFC. Check it here
// before we go any further.
if (!nfcAdapter.isEnabled()) {
alert('NFC is not enabled on this device');
return;
}
</code></pre>
*/
/**
* @method isEnabled
* <p>Return true if this NFC Adapter has any features enabled.</p>
* @returns {Boolean}
*/
/**
* @method isNdefPushEnabled
* <p>Return true if the NDEF Push (Android Beam) feature is enabled.</p>
* @returns {Boolean}
*/
/**
* @method onNewIntent
* <p>Processes a new intent received by an application.</p>
* @description <p>The NFC tag dispatch system will dispatch an intent to your application when it discovers a tag
that matches your application's intent filters. Intents received by your application after it has
started MUST be passed to this method in order to be processed and parsed for processing by your
application. If the intent is recognized as an NFC action, this method will call your
<code>onNdefDiscovered</code>, <code>onTagDiscovered</code>, or <code>onTechDiscovered' callback with the parsed information.
You should add an event listener to the current activity for the</code>newintent` event in your application
and call this method with the received intent.</p>
* @param {Titanium.Android.Intent} intent
<p>The Android intent received by your application</p>
*/
/**
* @method disableForegroundDispatch
* <p>Disable foreground dispatch to the current activity.</p>
*/
/**
* @method disableForegroundNdefPush
* <p>Disable NDEF message push over P2P.</p>
* @description <p>This method was deprecated in API level 14. Use <code>setNdefPushMessage</code> instead.</p>
*/
/**
* @method enableForegroundDispatch
* <p>Enable foreground dispatch to the current activity.</p>
* @description <p>The foreground dispatch system allows an activity to intercept an intent and claim priority over other activities that handle the same intent.
When using foreground dispatching, you must process the <code>pause</code> and <code>resume</code> events on the activity. See the <code>Foreground Dispatch</code> example
for an example of enabling and disabling foreground dispatch during these events.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/NfcAdapter.html#enableForegroundDispatch%28android.app.Activity, android.app.PendingIntent, android.content.IntentFilter%5b%5d, java.lang.String%5b%5d%5b%5d%29">enableForegroundDispatch</a></p>
* @param {Modules.Nfc.NfcForegroundDispatchFilter} dispatchFilter
<p>A filter specifying intent, intent filters and technology lists used to match dispatch intents.</p>
*/
/**
* @method enableForegroundNdefPush
* <p>Enable NDEF message push over P2P.</p>
* @description <p>This method was deprecated in API level 14. Use <code>setNdefPushMessage</code> instead.</p>
* @param {Modules.Nfc.NdefMessage} message
<p>An NDEF message to push over NFC.</p>
*/
/**
* @method setNdefPushMessage
* <p>Set a static {@link Modules.Nfc.NdefMessage} to send using Android Beam.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/nfc/NfcAdapter.html#setNdefPushMessage%28android.nfc.NdefMessage, android.app.Activity, android.app.Activity...%29">setNdefPushMessage</a></p>
* @param {Modules.Nfc.NdefMessage} message
<p>An NDEF message to push over NFC, or null to disable.</p>
*/
/**
* @method setBeamPushUris
* <p>Set one or more Uris to send using Android Beam.</p>
* @description <p>See also
<a href="http://developer.android.com/reference/android/nfc/NfcAdapter.html#setBeamPushUris%28android.net.Uri%5b%5d, android.app.Activity%29">setBeamPushUris</a></p>
* @param {Array<String>} Uris
<p>An array of Uri(s) to push over Android Beam.</p>
* @platform android 1.2.0
*/
/**
* @method getOnPushComplete
* <p>Gets the value of the {@link Modules.Nfc.NfcAdapter#property-onPushComplete} property.</p>
* @returns {Callback}
*/
/**
* @method setOnPushComplete
* <p>Sets the value of the {@link Modules.Nfc.NfcAdapter#property-onPushComplete} property.</p>
* @param {Callback} onPushComplete
<p>New value for the property.</p>
*/
/**
* @method getOnPushMessage
* <p>Gets the value of the {@link Modules.Nfc.NfcAdapter#property-onPushMessage} property.</p>
* @returns {Callback}
*/
/**
* @method setOnPushMessage
* <p>Sets the value of the {@link Modules.Nfc.NfcAdapter#property-onPushMessage} property.</p>
* @param {Callback} onPushMessage
<p>New value for the property.</p>
*/
/**
* @method getOnBeamPushUris
* <p>Gets the value of the {@link Modules.Nfc.NfcAdapter#property-onBeamPushUris} property.</p>
* @returns {Callback}
* @platform android 1.2.0
*/
/**
* @method setOnBeamPushUris
* <p>Sets the value of the {@link Modules.Nfc.NfcAdapter#property-onBeamPushUris} property.</p>
* @param {Callback} onBeamPushUris
<p>New value for the property.</p>
* @platform android 1.2.0
*/
/**
* @method getOnNdefDiscovered
* <p>Gets the value of the {@link Modules.Nfc.NfcAdapter#property-onNdefDiscovered} property.</p>
* @returns {Callback<NdefDiscovered>}
*/
/**
* @method setOnNdefDiscovered
* <p>Sets the value of the {@link Modules.Nfc.NfcAdapter#property-onNdefDiscovered} property.</p>
* @param {Callback<NdefDiscovered>} onNdefDiscovered
<p>New value for the property.</p>
*/
/**
* @method getOnTagDiscovered
* <p>Gets the value of the {@link Modules.Nfc.NfcAdapter#property-onTagDiscovered} property.</p>
* @returns {Callback<NdefDiscovered>}
*/
/**
* @method setOnTagDiscovered
* <p>Sets the value of the {@link Modules.Nfc.NfcAdapter#property-onTagDiscovered} property.</p>
* @param {Callback<NdefDiscovered>} onTagDiscovered
<p>New value for the property.</p>
*/
/**
* @method getOnTechDiscovered
* <p>Gets the value of the {@link Modules.Nfc.NfcAdapter#property-onTechDiscovered} property.</p>
* @returns {Callback<NdefDiscovered>}
*/
/**
* @method setOnTechDiscovered
* <p>Sets the value of the {@link Modules.Nfc.NfcAdapter#property-onTechDiscovered} property.</p>
* @param {Callback<NdefDiscovered>} onTechDiscovered
<p>New value for the property.</p>
*/
/**
* @property onPushComplete
* @type Callback
* <p>Callback function to execute on successful Android Beam operation.</p>
* @description <p>This method is only available on Android 4.0 (API 14) and above. </p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/NfcAdapter.html#setOnNdefPushCompleteCallback%28android.nfc.NfcAdapter.OnNdefPushCompleteCallback, android.app.Activity, android.app.Activity...%29">setOnNdefPushCompleteCallback</a>
in the Android Developer Reference.</p>
*/
/**
* @property onPushMessage
* @type Callback
* <p>Callback function used to dynamically generated NDEF messsages to send using Android Beam.</p>
* @description <p>The callback function must return an NDEF message to be used for the Android Beam operation.
This method is only available on Android 4.0 (API 14) and above. </p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/NfcAdapter.html#setNdefPushMessageCallback%28android.nfc.NfcAdapter.CreateNdefMessageCallback, android.app.Activity, android.app.Activity...%29">setNdefPushMessageCallback</a>
in the Android Developer Reference.</p>
*/
/**
* @property onBeamPushUris
* @type Callback
* <p>Callback function used to dynamically generate one or more Uris to send using Android Beam.</p>
* @description <p>The callback function must return an array of Uri(s) to be pushed.
This method is only available on Android 4.0 (API 16) and above.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/NfcAdapter.html#setBeamPushUrisCallback%28android.nfc.NfcAdapter.CreateBeamUrisCallback, android.app.Activity%29">setBeamPushUrisCallback</a></p>
* @platform android 1.2.0
*/
/**
* @property onNdefDiscovered
* @type Callback<NdefDiscovered>
* <p>Callback function to execute when a tag with NDEF payload is discovered.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_NDEF_DISCOVERED">ACTION_NDEF_DISCOVERED</a></p>
*/
/**
* @property onTagDiscovered
* @type Callback<NdefDiscovered>
* <p>Callback function to execute when a tag is discovered.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_TAG_DISCOVERED">ACTION_TAG_DISCOVERED</a></p>
*/
/**
* @property onTechDiscovered
* @type Callback<NdefDiscovered>
* <p>Callback function to execute when a tag is discovered and activities are registered for the specific technologies on the tag.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_TECH_DISCOVERED">ACTION_TECH_DISCOVERED</a></p>
*/
/**
* @class NdefDiscovered
* @platform android 1.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NfcAdapter.yml
* <p>Argument passed to the callback when an NDEF message, tag, or technology is discovered.</p>
*/
/**
* @property action
* @type String
* <p>Identifies the action from the intent.</p>
* @description <p>This value will be one of the constants defined on the {@link Modules.Nfc} module object (ACTION_NDEF_DISCOVERED, ACTION_TAG_DISCOVERED, or
ACTION_TECH_DISCOVERED).</p>
*/
/**
* @property tag
* @type Modules.Nfc.NfcTag
* <p>NFC tag proxy identifying the tag was was discovered.</p>
*/
/**
* @property messsages
* @type Modules.Nfc.NdefMessage[]
* <p>Array of NDEF messages parsed from the tag.</p>
*/
/**
* @class Modules.Nfc.NfcForegroundDispatchFilter
* @platform android 1.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NfcForegroundDispatchFilter.yml
* <p>A filter specifying intent, intent filters and technology lists used to match dispatch intents.</p>
* @description <p>The <enableForegroundDispatch> method is used to give priority to the foreground activity when dispatching
a discovered tag to an application. This proxy is used to specify the intent, intent filters, and technology
lists used to filter the dispatched intents. This proxy automatically creates the required pending intent and
will create an intent for the current activity if one is not provided.</p>
<p>Use the {@link Modules.Nfc#method-createNfcForegroundDispatchFilter} method to create a foreground dispatch filter.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/NfcAdapter.html#enableForegroundDispatch%28android.app.Activity, android.app.PendingIntent, android.content.IntentFilter%5b%5d, java.lang.String%5b%5d%5b%5d%29">enableForegroundDispatch</a></p>
* <h3>Examples</h3>
<h4>Foreground Dispatch filter</h4>
<p>This example creates a dispatch filter used to filter NDEF messages that are of mime type 'text/plain' or
URI from '<a href="http://www.appcelerator.com">http://www.appcelerator.com</a>'. Additionally, the filter will match tags with the specified
technologies. The dispatch filter is then used when calling the <code>enableForegroundDispatch</code> API of the
{@link Modules.Nfc.NfcAdapter} proxy.</p>
<pre><code>dispatchFilter = nfc.createNfcForegroundDispatchFilter({
intentFilters: [
{ action: nfc.ACTION_NDEF_DISCOVERED, mimeType: 'text/plain' },
{ action: nfc.ACTION_NDEF_DISCOVERED, scheme: 'http', host: 'www.appcelerator.com' }
],
techLists: [
[ "android.nfc.tech.NfcF", "android.nfc.tech.NfcA", "android.nfc.Ndef" ],
[ "android.nfc.tech.Ndef" ],
[ "android.nfc.tech.MifareClassic" ],
[ "android.nfc.tech.NfcA" ]
]
});
// All tag scans are received by the activity as a new intent. Each
// scan intent needs to be passed to the nfc adapter for processing.
var act = Ti.Android.currentActivity;
act.addEventListener('newintent', function(e) {
nfcAdapter.onNewIntent(e.intent);
});
// To enable NFC dispatching only while the application is in the foreground,
// the application must signal the module whenever the application state changes.
act.addEventListener('resume', function(e) {
nfcAdapter.enableForegroundDispatch(dispatchFilter);
});
act.addEventListener('pause', function(e) {
nfcAdapter.disableForegroundDispatch();
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
* @platform android 3.0.0
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Modules.Nfc.NfcForegroundDispatchFilter#property-bubbleParent} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Modules.Nfc.NfcForegroundDispatchFilter#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
* @platform android 3.0.0
*/
/**
* @method getIntent
* <p>Gets the value of the {@link Modules.Nfc.NfcForegroundDispatchFilter#property-intent} property.</p>
* @returns {Titanium.Android.Intent}
*/
/**
* @method setIntent
* <p>Sets the value of the {@link Modules.Nfc.NfcForegroundDispatchFilter#property-intent} property.</p>
* @param {Titanium.Android.Intent} intent
<p>New value for the property.</p>
*/
/**
* @method getIntentFilters
* <p>Gets the value of the {@link Modules.Nfc.NfcForegroundDispatchFilter#property-intentFilters} property.</p>
* @returns {NfcIntentFilter[]}
*/
/**
* @method setIntentFilters
* <p>Sets the value of the {@link Modules.Nfc.NfcForegroundDispatchFilter#property-intentFilters} property.</p>
* @param {Array<NfcIntentFilter>} intentFilters
<p>New value for the property.</p>
*/
/**
* @method getTechLists
* <p>Gets the value of the {@link Modules.Nfc.NfcForegroundDispatchFilter#property-techLists} property.</p>
* @returns {String[][]}
*/
/**
* @method setTechLists
* <p>Sets the value of the {@link Modules.Nfc.NfcForegroundDispatchFilter#property-techLists} property.</p>
* @param {Array<Array<String>>} techLists
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
* @platform android 3.0.0
*/
/**
* @property intent
* @type Titanium.Android.Intent
* <p>The intent to start the dispatch when matched.</p>
* @description <p>This optional property allows you to override the default behavior for dispatching the
intent. If an intent is not provided (the default behavior), then an intent based on the current
activity is automatically created with a flag of FLAG_ACTIVITY_SINGLE_TOP.</p>
*/
/**
* @property intentFilters
* @type NfcIntentFilter[]
* <p>The intent filters to override dispatching for, or null to always dispatch.</p>
*/
/**
* @property techLists
* @type String[][]
* <p>The tech lists used to perform matching for dispatching the ACTION_TECH_DISCOVERED intent.</p>
*/
/**
* @class NfcIntentFilter
* @platform android 1.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NfcForegroundDispatchFilter.yml
* <p>Intent filter.</p>
*/
/**
* @property action
* @type String
* <p>Identifies the action from the intent.</p>
* @description <p>This value will be one of the constants defined on the {@link Modules.Nfc} module object (ACTION_NDEF_DISCOVERED, ACTION_TAG_DISCOVERED, or
ACTION_TECH_DISCOVERED).</p>
*/
/**
* @property mimeType
* @type String
* <p>A valid MIME type.</p>
*/
/**
* @property scheme
* @type String
* <p>Data scheme to match against.</p>
*/
/**
* @property host
* @type String
* <p>Data authority to match against.</p>
*/
/**
* @class Modules.Nfc.NfcTag
* @platform android 1.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/NfcTag.yml
* <p>Represents an NFC tag that has been discovered</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/nfc/Tag.html">Tag</a></p>
*/
/**
* @method getId
* <p>Returns the tag identifier (if it has one)</p>
* @returns {String}
*/
/**
* @method getTechList
* <p>Returns the technologies available in this tag, as fully qualified class names.</p>
* @returns {String[]}
*/
/**
* @method getId
* <p>Gets the value of the {@link Modules.Nfc.NfcTag#property-id} property.</p>
* @returns {String}
*/
/**
* @property id
* @type String
* @readonly
* <p>Tag identifier (if it has one)</p>
*/
/**
* @property techList
* @type String[]
* @readonly
* <p>Technologies available in this tag, as fully qualified class names.</p>
*/
/**
* @class Modules.Nfc.TagTechnology
* @platform android 1.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/TagTechnology.yml
* <p>Represents an interface to a specific tag technology.</p>
* @description <p>NFC tags are based on a number of independently developed technologies and offer a wide range of
capabilities. The TagTechnology proxies provide access to these different technologies and capabilities.
The TagTechnology proxy is the base type for more type-specific tag technologies. You will
work with the type-specific tag technology proxies which provide capabilities for each tag technology.</p>
<p>Use one of the {@link Modules.Nfc#method-createTagTechnologyIsoDep}, {@link Modules.Nfc#method-createTagTechnologyMifareClassic},
{@link Modules.Nfc#method-createTagTechnologyMifareUltralight}, {@link Modules.Nfc#method-createTagTechnologyNdefFormatable},
{@link Modules.Nfc#method-createTagTechnologyNdef}, {@link Modules.Nfc#method-createTagTechnologyNfcA},
{@link Modules.Nfc#method-createTagTechnologyNfcB}, {@link Modules.Nfc#method-createTagTechnologyNfcF}, {@link Modules.Nfc#method-createTagTechnologyNfcV}
method variants to create a tag technology proxy.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/tech/TagTechnology.html">TagTechnology</a></p>
* <h3>Examples</h3>
<h4>Write Ndef Tag</h4>
<p>This example uses the TECH_NDEF tag technology to write a {@link Modules.Nfc.NdefMessage} message to a tag.</p>
<pre><code>var tech = nfc.createTagTechnologyNdef({
tag: scannedTag
});
if (!tech.isValid()) {
alert("Failed to create Ndef tag type");
return;
}
// Attempt to write an Ndef record to the tag
try {
tech.connect();
// It's possible that the tag is not writable, so we need to check first.
if (!tech.isWritable()) {
alert ("Tag is not writable");
} else {
// Create a new message to write to the tag
var date = new Date();
var textRecord = nfc.createNdefRecordText({
text: "Titanium NFC module. Tag updated on " + date.toLocaleString() + "!!!"
});
var msg = nfc.createNdefMessage({
records: [ textRecord ]
});
// Write to the tag
tech.writeNdefMessage(msg);
}
} catch (e) {
alert("Error: " + e.message);
} finally {
if (tech.isConnected()) {
tech.close();
}
}
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
* @platform android 3.0.0
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method isValid
* <p>Return true if this tag technology was successfully obtained.</p>
* @returns {Boolean}
*/
/**
* @method close
* <p>Disable I/O operations to the tag and release resources.</p>
*/
/**
* @method connect
* <p>Enable I/O operations to the tag.</p>
* @description <p>Only one Tag Technology proxy can be connected to a Tag at a time.</p>
*/
/**
* @method isConnected
* <p>Returns true if connect has completed, and close has not been called, and the tag is not known to be out of range.</p>
* @returns {Boolean}
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Modules.Nfc.TagTechnology#property-bubbleParent} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Modules.Nfc.TagTechnology#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
* @platform android 3.0.0
*/
/**
* @method getTag
* <p>Gets the value of the {@link Modules.Nfc.TagTechnology#property-tag} property.</p>
* @returns {Modules.Nfc.NfcTag}
*/
/**
* @method setTag
* <p>Sets the value of the {@link Modules.Nfc.TagTechnology#property-tag} property.</p>
* @param {Modules.Nfc.NfcTag} tag
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
* @platform android 3.0.0
*/
/**
* @property tag
* @type Modules.Nfc.NfcTag
* <p>The tag technology that has been discovered.</p>
* @description <p>When a tag is discovered, a {@link Modules.Nfc.NfcTag} proxy is created and passed as a property to the <code>onNdefDiscovered</code>, <code>onTagDiscovered</code>, or
<code>onTechDiscovered</code> callback (see {@link NdefDiscovered}).</p>
*/
/**
* @class Modules.Nfc.TagTechnologyIsoDep
* @platform android 1.1.0
* @extends Modules.Nfc.TagTechnology
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/TagTechnology.yml
* <p>Provides access to ISO-DEP (ISO 14443-4) properties and I/O operations on a {@link Modules.Nfc.NfcTag}.</p>
* @description <p>Use the {@link Modules.Nfc#method-createTagTechnologyIsoDep} method to create this tag technology.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/tech/IsoDep.html">IsoDep</a></p>
*/
/**
* @method getHiLayerResponse
* <p>Return the higher layer response bytes for NfcB tags.</p>
* @returns {Titanium.Buffer}ISO-DEP historical bytes, or null if this is not a NfcB tag.
*/
/**
* @method getHistoricalBytes
* <p>Return the ISO-DEP historical bytes for NfcA tags.</p>
* @returns {Titanium.Buffer}ISO-DEP historical bytes, or null if this is not a NfcA tag.
*/
/**
* @method getMaxTransceiveLength
* <p>Return the maximum number of bytes that can be sent with <code>transceive</code>.</p>
* @returns {Number}
*/
/**
* @method getTimeout
* <p>Get the current timeout for <code>transceive</code> in milliseconds.</p>
* @returns {Number}
*/
/**
* @method isExtendedLengthApduSupported
* <p>Whether the NFC adapter on this device supports extended length APDUs.</p>
* @returns {Boolean}
*/
/**
* @method setTimeout
* <p>Set the timeout of <code>transceive</code> in milliseconds.</p>
* @param {Number} timeout
<p>Timeout value in milliseconds</p>
*/
/**
* @method transceive
* <p>Send raw ISO-DEP data to the tag and receive the response.</p>
* @param {Titanium.Buffer} data
<p>Bytes to send.</p>
* @returns {Titanium.Buffer}Response bytes received.
*/
/**
* @class Modules.Nfc.TagTechnologyMifareClassic
* @platform android 1.1.0
* @extends Modules.Nfc.TagTechnology
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/TagTechnology.yml
* <p>Provides access to MIFARE Classic properties and I/O operations on a {@link Modules.Nfc.NfcTag}.</p>
* @description <p>Use the {@link Modules.Nfc#method-createTagTechnologyMifareClassic} method to create this tag technology.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/tech/MifareClassic.html">MifareClassic</a></p>
*/
/**
* @method authenticateSectorWithKeyA
* <p>Authenticate a sector with key A.</p>
* @param {Number} sectorIndex
<p>Index of sector to authenticate, starting from 0.</p>
* @param {Titanium.Buffer} key
<p>6-byte authentication key.</p>
* @returns {Boolean}Returns true on success, false on authentication failure.
*/
/**
* @method authenticateSectorWithKeyB
* <p>Authenticate a sector with key B.</p>
* @param {Number} sectorIndex
<p>Index of sector to authenticate, starting from 0.</p>
* @param {Titanium.Buffer} key
<p>6-byte authentication key.</p>
* @returns {Boolean}Returns true on success, false on authentication failure.
*/
/**
* @method blockToSector
* <p>Return the sector that contains a given block.</p>
* @param {Number} blockIndex
<p>Index of block to lookup, starting from 0.</p>
* @returns {Number}
*/
/**
* @method decrement
* <p>Decrement a value block, storing the result in the temporary block on the tag.</p>
* @param {Number} blockIndex
<p>Index of block to decrement, starting from 0.</p>
* @param {Number} value
<p>Non-negative to decrement by.</p>
*/
/**
* @method getBlockCount
* <p>Return the total number of MIFARE Classic blocks.</p>
* @returns {Number}
*/
/**
* @method getBlockCountInSector
* <p>Return the number of blocks in the given sector.</p>
* @param {Number} sectorIndex
<p>Index of sector, starting from 0.</p>
* @returns {Number}
*/
/**
* @method getMaxTransceiveLength
* <p>Return the maximum number of bytes that can be sent with <code>transceive</code>.</p>
* @returns {Number}
*/
/**
* @method getSectorCount
* <p>Return the number of MIFARE Classic sectors.</p>
* @returns {Number}
*/
/**
* @method getSize
* <p>Return the size of the tag in bytes.</p>
* @returns {Number}
*/
/**
* @method getTimeout
* <p>Get the current <code>transceive</code> timeout in milliseconds.</p>
* @returns {Number}
*/
/**
* @method getType
* <p>Return the type of this MIFARE Classic compatible tag.</p>
* @returns {Number}
*/
/**
* @method increment
* <p>Increment a value block, storing the result in the temporary block on the tag.</p>
* @param {Number} blockIndex
<p>Index of block to increment, starting from 0.</p>
* @param {Number} value
<p>Non-negative to increment by.</p>
*/
/**
* @method readBlock
* <p>Read 16-byte block.</p>
* @param {Number} blockIndex
<p>Index of block to read, starting from 0.</p>
* @returns {Titanium.Buffer}16 byte block.
*/
/**
* @method restore
* <p>Copy from a value block to the temporary block.</p>
* @param {Number} blockIndex
<p>Index of block to copy from.</p>
*/
/**
* @method sectorToBlock
* <p>Return the first block of a given sector.</p>
* @param {Number} sectorIndex
<p>Index of sector to lookup, starting from 0.</p>
* @returns {Number}
*/
/**
* @method setTimeout
* <p>Set the <code>transceive</code> timeout in milliseconds.</p>
* @param {Number} timeout
<p>Timeout value in milliseconds.</p>
*/
/**
* @method transceive
* <p>Send raw NfcA data to the tag and receive the response.</p>
* @param {Titanium.Buffer} data
<p>Bytes to send.</p>
* @returns {Titanium.Buffer}Response bytes received.
*/
/**
* @method transfer
* <p>Copy from the temporary block to a value block.</p>
* @param {Number} blockIndex
<p>Index of block to copy to.</p>
*/
/**
* @method writeBlock
* <p>Write 16-byte block.</p>
* @param {Number} blockIndex
<p>Index of block to write, starting from 0.</p>
* @param {Titanium.Buffer} data
<p>16 bytes of data to write.</p>
*/
/**
* @property KEY_DEFAULT
* @type Titanium.Buffer
* @readonly
* <p>The default factory key.</p>
*/
/**
* @property KEY_MIFARE_APPLICATION_DIRECTORY
* @type Titanium.Buffer
* @readonly
* <p>The well-known key for tags formatted according to the MIFARE Application Directory (MAD) specification.</p>
*/
/**
* @property KEY_NFC_FORUM
* @type Titanium.Buffer
* @readonly
* <p>The well-known key for tags formatted according to the NDEF on MIFARE Classic specification.</p>
*/
/**
* @class Modules.Nfc.TagTechnologyMifareUltralight
* @platform android 1.1.0
* @extends Modules.Nfc.TagTechnology
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/TagTechnology.yml
* <p>Provides access to MIFARE Ultralight properties and I/O operations on a {@link Modules.Nfc.NfcTag}.</p>
* @description <p>Use the {@link Modules.Nfc#method-createTagTechnologyMifareUltralight} method to create this tag technology.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/tech/MifareUltralight.html">MifareUltralight</a></p>
*/
/**
* @method getMaxTransceiveLength
* <p>Return the maximum number of bytes that can be sent with <code>transceive</code>.</p>
* @returns {Number}
*/
/**
* @method getTimeout
* <p>Get the current <code>transceive</code> timeout in milliseconds.</p>
* @returns {Number}
*/
/**
* @method getType
* <p>Return the MIFARE Ultralight type of the tag.</p>
* @description <p>One of MIFARE_ULTRALIGHT_TYPE_ULTRALIGHT, MIFARE_ULTRALIGHT_TYPE_ULTRALIGHT_C, or MIFARE_ULTRALIGHT_TYPE_UNKNOWN.</p>
* @returns {Number}
*/
/**
* @method readPages
* <p>Read 4 pages (16 bytes).</p>
* @param {Number} pageOffset
<p>Index of first page to read, starting from 0.</p>
* @returns {Titanium.Buffer}4 pages (16 bytes)
*/
/**
* @method setTimeout
* <p>Set the <code>transceive</code> timeout in milliseconds.</p>
* @param {Number} timeout
<p>Timeout value in milliseconds.</p>
*/
/**
* @method transceive
* <p>Send raw NfcA data to the tag and receive the response.</p>
* @param {Titanium.Buffer} data
<p>Bytes to send.</p>
* @returns {Titanium.Buffer}Response bytes received.
*/
/**
* @method writePage
* <p>Write 1 page (4 bytes).</p>
* @param {Number} pageOffset
<p>Index of page to write, starting from 0.</p>
* @param {Titanium.Buffer} data
<p>4 bytes to write.</p>
*/
/**
* @class Modules.Nfc.TagTechnologyNdefFormatable
* @platform android 1.1.0
* @extends Modules.Nfc.TagTechnology
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/TagTechnology.yml
* <p>Provide access to NDEF format operations on a {@link Modules.Nfc.NfcTag}.</p>
* @description <p>Use the {@link Modules.Nfc#method-createTagTechnologyNdefFormatable} method to create this tag technology.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/tech/NdefFormatable.html">NdefFormatable</a></p>
*/
/**
* @method format
* <p>Format a tag as NDEF, and write a {@link Modules.Nfc.NdefMessage}.</p>
* @param {Modules.Nfc.NdefMessage} message
<p>The NDEF message to write after formatting, can be null.</p>
*/
/**
* @method formatReadOnly
* <p>Formats a tag as NDEF, write a {@link Modules.Nfc.NdefMessage}, and make read-only.</p>
* @param {Modules.Nfc.NdefMessage} message
<p>The NDEF message to write after formatting</p>
*/
/**
* @class Modules.Nfc.TagTechnologyNdef
* @platform android 1.1.0
* @extends Modules.Nfc.TagTechnology
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/TagTechnology.yml
* <p>Provides access to NDEF content and operations on a {@link Modules.Nfc.NfcTag}.</p>
* @description <p>Use the {@link Modules.Nfc#method-createTagTechnologyNdef} method to create this tag technology.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/tech/Ndef.html">Ndef</a></p>
*/
/**
* @method canMakeReadOnly
* <p>Indicates whether a tag can be made read-only with <code>makeReadOnly</code>.</p>
* @returns {Boolean}true if it is possible to make this tag read-only.
*/
/**
* @method getCachedNdefMessage
* <p>Get the {@link Modules.Nfc.NdefMessage} that was read from the tag at discovery time.</p>
* @returns {Modules.Nfc.NdefMessage}NDEF Message read from the tag at discovery time, can be null.
*/
/**
* @method getMaxSize
* <p>Get the maximum NDEF message size in bytes.</p>
* @returns {Number}
*/
/**
* @method getNdefMessage
* <p>Read the current {@link Modules.Nfc.NdefMessage} on this tag.</p>
* @returns {Modules.Nfc.NdefMessage}The NDEF Message, can be null.
*/
/**
* @method getType
* <p>Get the NDEF tag type.</p>
* @description <p>One of TAG_TYPE_NFC_FORUM_TYPE_1, TAG_TYPE_NFC_FORUM_TYPE_2, TAG_TYPE_NFC_FORUM_TYPE_3,
TAG_TYPE_NFC_FORUM_TYPE_4, TAG_TYPE_MIFARE_CLASSIC, or another NDEF tag type that has not
yet been formalized in the Android API.</p>
* @returns {String}
*/
/**
* @method isWritable
* <p>Determine if the tag is writable.</p>
* @returns {Boolean}true if the tag is writable.
*/
/**
* @method makeReadOnly
* <p>Make a tag read-only.</p>
* @returns {Boolean}true on success, false if it is not possible to make this tag read-only.
*/
/**
* @method writeNdefMessage
* <p>Overwrite the {@link Modules.Nfc.NdefMessage} on this tag.</p>
* @param {Modules.Nfc.NdefMessage} message
<p>The {@link Modules.Nfc.NdefMessage} to write</p>
*/
/**
* @class Modules.Nfc.TagTechnologyNfcA
* @platform android 1.1.0
* @extends Modules.Nfc.TagTechnology
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/TagTechnology.yml
* <p>Provides access to NFC-A (ISO 14443-3A) properties and I/O operations on a {@link Modules.Nfc.NfcTag}.</p>
* @description <p>Use the {@link Modules.Nfc#method-createTagTechnologyNfcA} method to create this tag technology.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/tech/NfcA.html">NfcA</a></p>
*/
/**
* @method getAtqa
* <p>Return the ATQA/SENS_RES bytes from tag discovery.</p>
* @returns {Titanium.Buffer}ATQA/SENS_RES bytes.
*/
/**
* @method getMaxTransceiveLength
* <p>Return the maximum number of bytes that can be sent with <code>transceive</code>.</p>
* @returns {Number}
*/
/**
* @method getSak
* <p>Return the SAK/SEL_RES bytes from tag discovery.</p>
* @returns {Number}SAK bytes.
*/
/**
* @method getTimeout
* <p>Get the current <code>transceive</code> timeout in milliseconds.</p>
* @returns {Number}
*/
/**
* @method setTimeout
* <p>Set the timeout of <code>transceive</code> in milliseconds.</p>
* @param {Number} timeout
<p>Timeout value in milliseconds</p>
*/
/**
* @method transceive
* <p>Send raw NFC-A commands to the tag and receive the response.</p>
* @param {Titanium.Buffer} data
<p>Bytes to send.</p>
* @returns {Titanium.Buffer}Response bytes received.
*/
/**
* @class Modules.Nfc.TagTechnologyNfcB
* @platform android 1.1.0
* @extends Modules.Nfc.TagTechnology
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/TagTechnology.yml
* <p>Provides access to NFC-B (ISO 14443-3B) properties and I/O operations on a {@link Modules.Nfc.NfcTag}.</p>
* @description <p>Use the {@link Modules.Nfc#method-createTagTechnologyNfcB} method to create this tag technology.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/tech/NfcB.html">NfcB</a></p>
*/
/**
* @method getApplicationData
* <p>Return the Application Data bytes from ATQB/SENSB_RES at tag discovery.</p>
* @returns {Titanium.Buffer}Application Data bytes from ATQB/SENSB_RES bytes
*/
/**
* @method getMaxTransceiveLength
* <p>Return the maximum number of bytes that can be sent with <code>transceive</code>.</p>
* @returns {Number}
*/
/**
* @method getProtocolInfo
* <p>Return the Protocol Info bytes from ATQB/SENSB_RES at tag discovery.</p>
* @returns {Titanium.Buffer}Protocol Info bytes from ATQB/SENSB_RES bytes.
*/
/**
* @method transceive
* <p>Send raw NFC-B commands to the tag and receive the response.</p>
* @param {Titanium.Buffer} data
<p>Bytes to send.</p>
* @returns {Titanium.Buffer}Response bytes received.
*/
/**
* @class Modules.Nfc.TagTechnologyNfcF
* @platform android 1.1.0
* @extends Modules.Nfc.TagTechnology
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/TagTechnology.yml
* <p>Provides access to NFC-F (JIS 6319-4) properties and I/O operations on a {@link Modules.Nfc.NfcTag}.</p>
* @description <p>Use the {@link Modules.Nfc#method-createTagTechnologyNfcF} method to create this tag technology.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/tech/NfcF.html">NfcF</a></p>
*/
/**
* @method getManufacturer
* <p>Return the Manufacturer bytes from tag discovery.</p>
* @returns {Titanium.Buffer}Manufacturer bytes.
*/
/**
* @method getMaxTransceiveLength
* <p>Return the maximum number of bytes that can be sent with <code>transceive</code>.</p>
* @returns {Number}
*/
/**
* @method getSystemCode
* <p>Return the System Code bytes from tag discovery.</p>
* @returns {Titanium.Buffer}System Code bytes.
*/
/**
* @method getTimeout
* <p>Get the current <code>transceive</code> timeout in milliseconds.</p>
* @returns {Number}
*/
/**
* @method setTimeout
* <p>Set the timeout of <code>transceive</code> in milliseconds.</p>
* @param {Number} timeout
<p>Timeout value in milliseconds</p>
*/
/**
* @method transceive
* <p>Send raw NFC-F commands to the tag and receive the response.</p>
* @param {Titanium.Buffer} data
<p>Bytes to send.</p>
* @returns {Titanium.Buffer}Response bytes received.
*/
/**
* @class Modules.Nfc.TagTechnologyNfcV
* @platform android 1.1.0
* @extends Modules.Nfc.TagTechnology
* @editurl https://github.com/appcelerator-modules/ti.nfc/edit/master/apidoc/TagTechnology.yml
* <p>Provides access to NFC-V (ISO 15693) properties and I/O operations on a {@link Modules.Nfc.NfcTag}.</p>
* @description <p>Use the {@link Modules.Nfc#method-createTagTechnologyNfcV} method to create this tag technology.</p>
<p>See also:
<a href="http://developer.android.com/reference/android/nfc/tech/NfcV.html">NfcV</a></p>
*/
/**
* @method getDsfId
* <p>Return the DSF ID bytes from tag discovery.</p>
* @returns {Number}
*/
/**
* @method getMaxTransceiveLength
* <p>Return the maximum number of bytes that can be sent with <code>transceive</code>.</p>
* @returns {Number}
*/
/**
* @method getResponseFlags
* <p>Return the Response Flag bytes from tag discovery.</p>
* @returns {Number}Response Flag bytes.
*/
/**
* @method transceive
* <p>Send raw NFC-V commands to the tag and receive the response.</p>
* @param {Titanium.Buffer} data
<p>Bytes to send.</p>
* @returns {Titanium.Buffer}Response bytes received.
*/
/**
* @class Modules.Newsstand.Issue
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator-modules/ti.newsstand/edit/master/apidoc/Issue.yml
* <p>A {@link Modules.Newsstand} object which represents an issue from the Newsstand library.</p>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method downloadAsset
* <p>Downloads an asset for this issue. This connection is managed by the system. This allows the download to run in the background even when the app is not running. Download progress and errors can be captured using event listeners.</p>
* @description <p><strong>Note:</strong> Throws an exception if called twice to download the same asset for a single issue.</p>
<p><strong>Example</strong></p>
<pre><code>issue.downloadAsset({
url:contentURL,
filename:'TEST.TST',
userInfo:{
id:1234,
name:'TEST1'
}
});
</code></pre>
* @param {Dictionary<NewsstandDownloadAssetProps>} props
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Modules.Newsstand.Issue#property-bubbleParent} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Modules.Newsstand.Issue#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getName
* <p>Gets the value of the {@link Modules.Newsstand.Issue#property-name} property.</p>
* @returns {String}
*/
/**
* @method getDate
* <p>Gets the value of the {@link Modules.Newsstand.Issue#property-date} property.</p>
* @returns {String}
*/
/**
* @method getStatus
* <p>Gets the value of the {@link Modules.Newsstand.Issue#property-status} property.</p>
* @returns {String}
*/
/**
* @method getContentURL
* <p>Gets the value of the {@link Modules.Newsstand.Issue#property-contentURL} property.</p>
* @returns {String}
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property name
* @type String
* @readonly
* <p>The unique name of the issue</p>
*/
/**
* @property date
* @type String
* @readonly
* <p>The date of the issue</p>
*/
/**
* @property status
* @type String
* @readonly
* <p>The status of the issue</p>
* @description <p>Possible statuses:</p>
<ul>
<li>{@link Modules.Newsstand#property-ISSUE_CONTENT_STATUS_NONE}</li>
<li>{@link Modules.Newsstand#property-ISSUE_CONTENT_STATUS_DOWNLOADING}</li>
<li>{@link Modules.Newsstand#property-ISSUE_CONTENT_STATUS_AVAILABLE}</li>
</ul>
*/
/**
* @property contentURL
* @type String
* @readonly
* <p>The contentURL of the issue</p>
* @description <p>This is the location assets downloaded for the issue will be saved.</p>
<p><strong>Note:</strong> contentURL will be undefined after an issue is removed from the library.</p>
*/
/**
* @class NewsstandDownloadAssetProps
* @platform iphone 1.0.0
* @platform ipad 1.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.newsstand/edit/master/apidoc/Issue.yml
* <p>A dictionary of properties to pass to the method</p>
*/
/**
* @property url
* @type String
* <p>Location of the asset to be downloaded</p>
*/
/**
* @property userInfo
* @type Dictionary
* <p>A dictionary of properties that can be passed through with the request to the event listeners. (optional)</p>
* @description <p><strong>Warning:</strong> Do not include anything more than simple key value pairs. Including Titanium objects in userInfo will cause errors.</p>
*/
/**
* @property filename
* @type String
* <p>The name of the file to be downloaded. If no name is specified here, the filename will be the last component of the url. (optional)</p>
*/
/**
* @class Modules.Newsstand
* @platform iphone 1.0.0
* @platform ipad 1.0.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator-modules/ti.newsstand/edit/master/apidoc/Newsstand.yml
* <p>The Newsstand module allows you to access Apple's NewsKit APIs</p>
* @description <h3>Requirements</h3>
<p>This module requires iOS 5 or greater</p>
<h3>Newsstand Resources</h3>
<ul>
<li><a href="https://developer.apple.com/newsstand/">Newsstand for Developers</a></li>
<li><a href="https://developer.apple.com/library/ios/#documentation/StoreKit/Reference/NewsstandKit_Framework/_index.html">Newsstand Kit Framework Reference</a></li>
</ul>
<h3>Publishing</h3>
<p>Apple allows you to update your app icon in iTunes connect so that the latest issue can always be displayed. Documentation around setting this up can be found in the <a href="https://developer.apple.com/library/ios/#documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/14_Newsstand/Newsstand.html">iTunes Connect Developer Guide</a>.</p>
<h3>Getting Started</h3>
<p>View the <a href="http://docs.appcelerator.com/titanium/latest/#!/guide/Using_Titanium_Modules">Using Titanium Modules</a> document for instructions on getting
started with using this module in your application.</p>
<h3>Accessing the Newsstand Module</h3>
<p>To access this module from JavaScript, you would do the following:</p>
<pre><code>var Newsstand = require("ti.newsstand");
</code></pre>
<p>The newsstand variable is a reference to the Module object.</p>
<h3>Setup</h3>
<ol>
<li>Setup the app as a Newsstand app by adding the code below to your tiapp.xml</li>
<li>Modify the <code>UINewsstandBindingEdge</code> and <code>UINewsstandBindingType</code> values to get different decorations on the icons. Available options can be found in Apple's <a href="https://developer.apple.com/library/mac/#documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html">CoreFoundationKeys Documentation</a>.</li>
<li>Add <code>newsstandicon.png</code> to the 'Resources/iphone' directory next to appicon.png</li>
<li>Run the app, you should see it in the Newsstand folder.</li>
<li>During development, be sure to call {@link Modules.Newsstand#method-enableDevMode} to remove the daily download limit.</li>
</ol>
<p>tiapp.xml</p>
<pre><code><ios>
<plist>
<dict>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>appicon.png</string>
</array>
</dict>
<key>UINewsstandIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>newsstandicon.png</string>
</array>
<key>UINewsstandBindingEdge</key>
<string>UINewsstandBindingEdgeLeft</string>
<key>UINewsstandBindingType</key>
<string>UINewsstandBindingTypeMagazine</string>
</dict>
</dict>
<key>UINewsstandApp</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>newsstand-content</string>
</array>
</dict>
</plist>
</ios>
</code></pre>
<h3>Push Notifications</h3>
<p>Push notifications can be sent to the device to notify it that a new issue is available. The notification payload must contain a "content-available" key set to 1. If this is not set, iOS will not allow the application to wake in the background to download a new issue.</p>
<pre><code>{
"aps":{
"content-available":1,
},
"device_tokens": ["exampleToken4F2509D125889AED3466F4D1376B26C374190B3974739"]
}
</code></pre>
<p>Use the {@link Titanium.Network#property-NOTIFICATION_TYPE_NEWSSTAND} type when calling {@link Titanium.Network#method-registerForPushNotifications}</p>
<pre><code>Ti.Network.registerForPushNotifications({
types:[
Ti.Network.NOTIFICATION_TYPE_NEWSSTAND
],
success: eventSuccess,
error: eventError,
callback: eventCallback
});
</code></pre>
<p>To enable your application to download assets in the background in response to a push notification, you <em>must</em> wrap
your {@link Modules.Newsstand.Issue#method-downloadAsset} calls with calls to {@link Modules.Newsstand#method-beginBackgroundDownloadRequests} and {@link Modules.Newsstand#method-endBackgroundDownloadRequests}.</p>
<p>For example, the event callback specified for {@link Titanium.Network#method-registerForPushNotifications} might look like the following:</p>
<pre><code>function eventCallback(e) {
if (e.data['content-available'] === 1) {
Newsstand.beginBackgroundDownloadRequests();
var issue = Newsstand.getIssue({
name: issues[0].name
});
if (!issue) {
// if issue is not found then add it
issue = Newsstand.addIssue({
name: name,
date: new Date()
});
}
issue.downloadAsset({
url: issues[0].content,
userInfo: {
id: 9999,
name: 'TESTBACKGROUND'
}
});
Newsstand.endBackgroundDownloadRequests();
}
}
</code></pre>
*/
/**
* @event progress
* <p>Occurs if you call downloadAsset and an issue asset is downloading. This event is only sent when the application is running in the foreground.</p>
* @description <p><strong>Note:</strong> totalBytes only applies to the current file being downloaded.</p>
* @param {String} name
<p>The unique name of the issue the asset is being downloaded for.</p>
* @param {Object} userInfo
<p>The dictionary of key value pairs that was set when calling {@link Modules.Newsstand.Issue#method-downloadAsset}.</p>
* @param {Number} bytesWritten
<p>The number of bytes downloaded.</p>
* @param {Number} totalBytes
<p>The total number of bytes to download for the current asset.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event error
* <p>Occurs when there is an error while downloading an asset.</p>
* @param {String} name
<p>The unique name of the issue the asset is being downloaded for.</p>
* @param {Object} userInfo
<p>The dictionary of key value pairs that was set when calling {@link Modules.Newsstand.Issue#method-downloadAsset}.</p>
* @param {String} description
<p>Description of the error.</p>
* @param {String} code
<p>The error code.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event assetcomplete
* <p>Occurs when each asset download completes.</p>
* @param {String} name
<p>The unique name of the issue the asset is being downloaded for.</p>
* @param {Object} userInfo
<p>The dictionary of key value pairs that was set when calling {@link Modules.Newsstand.Issue#method-downloadAsset}.</p>
* @param {String} filePath
<p>The location of the file that was downloaded.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event issuecomplete
* <p>Occurs when all of the asset downloads that have been started for an issue are complete. This could be a successful completion or error.</p>
* @param {String} name
<p>The unique name of the issue.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method enableDevMode
* <p>Newsstand push notifications are only allowed one background download per day. This function will disable this limit for development devices during testing.</p>
* @description <p><strong>Note:</strong> A development device refers to a device which has been recognized in Xcode Organizer as having the "Use for Development" checkbox enabled. </p>
<p><strong>Example</strong></p>
<pre><code>Newsstand.enableDevMode();
</code></pre>
*/
/**
* @method beginBackgroundDownloadRequests
* <p>Signals the start of a series of {@link Modules.Newsstand.Issue#method-downloadAsset} calls. This call notifies the device that additional time may be needed by the application while running in the background.</p>
* @description <p><strong>Example</strong></p>
<pre><code>Newsstand.beginBackgroundDownloadRequests();
issue1.downloadAsset(...);
issue2.downloadAsset(...);
Newsstand.endBackgroundDownloadRequests();
</code></pre>
*/
/**
* @method endBackgroundDownloadRequests
* <p>Signals the end of a series of {@link Modules.Newsstand.Issue#method-downloadAsset} calls. This call notifies the device that the application no longer requires additional time while running in the background.</p>
* @description <p><strong>Example</strong></p>
<pre><code>Newsstand.beginBackgroundDownloadRequests();
issue1.downloadAsset(...);
issue2.downloadAsset(...);
Newsstand.endBackgroundDownloadRequests();
</code></pre>
*/
/**
* @method addIssue
* <p>Adds an issues to the library.</p>
* @description <p>Throws an exception if name and date are invalid. Also throws an exception if you use a name that is already taken by another issue.</p>
<p>Returns a {@link Modules.Newsstand.Issue} representing the issue that was added to the library or undefined if the issues could not be added to the library.</p>
<p><strong>Example</strong></p>
<pre><code>var issueDate = new Date();
issueDate.setFullYear(2013);
issueDate.setMonth(0);
issueDate.setDate(14);
var issue = Newsstand.addIssue({
name: "Magazine-0",
date: issueDate
});
</code></pre>
* @param {Dictionary<NewsstandAddIssueProps>} props
* @returns {Modules.Newsstand.Issue}
*/
/**
* @method getIssue
* <p>Retrieves an issue from the library via its unique name.</p>
* @description <p>Returns a {@link Modules.Newsstand.Issue} representing the issue or undefined if the issue does not exist in the library.</p>
<p><strong>Example</strong></p>
<pre><code>var issue = Newsstand.getIssue({
name: "Magazine-0"
});
</code></pre>
* @param {Dictionary<NewsstandGetIssueProps>} props
* @returns {Modules.Newsstand.Issue}
*/
/**
* @method removeIssue
* <p>Removes an issue from the library.</p>
* @description <p><strong>Note:</strong> It is possible to hold on to a {@link Modules.Newsstand.Issue} even after it is removed from the library. This is not something you want to do, because issues are useless if they are not in the library. Most of the properties of the issue will still be available excelpt <code>contentURL</code> which will be undefined. </p>
<p><strong>Example</strong></p>
<pre><code>Newsstand.removeIssue(issueToRemove);
</code></pre>
* @param {Modules.Newsstand.Issue} issue
<p>The issue to be removed.</p>
*/
/**
* @method setBasicAuthentication
* <p>Sets the username and password that will be used if the {@link Modules.Newsstand.Issue#method-downloadAsset} call needs to authenticate.</p>
* @description <p><strong>Example</strong></p>
<pre><code>Newsstand.setBasicAuthentication({
username: "jalter",
password: "password"
});
</code></pre>
* @param {Dictionary<NewsstandSetBasicAuthProps>} props
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Modules.Newsstand#property-bubbleParent} property.</p>
* @returns {Boolean}
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Modules.Newsstand#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getIssues
* <p>Gets the value of the {@link Modules.Newsstand#property-issues} property.</p>
* @returns {Modules.Newsstand.Issue[]}
*/
/**
* @method getCurrentlyReadingIssue
* <p>Gets the value of the {@link Modules.Newsstand#property-currentlyReadingIssue} property.</p>
* @returns {Modules.Newsstand.Issue}
*/
/**
* @method setCurrentlyReadingIssue
* <p>Sets the value of the {@link Modules.Newsstand#property-currentlyReadingIssue} property.</p>
* @param {Modules.Newsstand.Issue} currentlyReadingIssue
<p>New value for the property.</p>
*/
/**
* @method getApplicationIconBadgeNumber
* <p>Gets the value of the {@link Modules.Newsstand#property-applicationIconBadgeNumber} property.</p>
* @returns {Number}
*/
/**
* @method setApplicationIconBadgeNumber
* <p>Sets the value of the {@link Modules.Newsstand#property-applicationIconBadgeNumber} property.</p>
* @param {Number} applicationIconBadgeNumber
<p>New value for the property.</p>
*/
/**
* @method setIconImage
* <p>Sets the value of the {@link Modules.Newsstand#property-iconImage} property.</p>
* @param {Titanium.Filesystem.File} iconImage
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property ISSUE_CONTENT_STATUS_NONE
* @type Number
* @readonly
* <p>Assets are not downloading for the issue and there is no content at contentURL.</p>
*/
/**
* @property ISSUE_CONTENT_STATUS_DOWNLOADING
* @type Number
* @readonly
* <p>The issue has assets that are currently downloading.</p>
*/
/**
* @property ISSUE_CONTENT_STATUS_AVAILABLE
* @type Number
* @readonly
* <p>Downloading of assets is not taking place and there is issue content at contentURL.</p>
*/
/**
* @property issues
* @type Modules.Newsstand.Issue[]
* @readonly
* <p>Returns an array of {@link Modules.Newsstand.Issue}s representing the current issues in the library.</p>
*/
/**
* @property currentlyReadingIssue
* @type Modules.Newsstand.Issue
* <p>Accesses or sets the newsstand issue that the user is currently reading. If no issue is set, it will be undefined.</p>
<p>Newsstand Kit takes this setting into consideration when it purges back issues because of low levels of available flash storage.</p>
*/
/**
* @property applicationIconBadgeNumber
* @type Number
* <p>Accesses or sets the icon badge number of the app. Instead of displaying a badge number on the app icon, this will set the "new" badge on the app icon if the number is greater than 0.</p>
*/
/**
* @property iconImage
* @type Titanium.Filesystem.File
* @writeonly
* <p>Sets the image of the application icon.</p>
* @description <p><strong>Note:</strong> If the image is not within the dimensions outlined in the Newsstand Icon section of the <a href="http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html">iOS Human Interface Guidelines</a>, it may not be displayed.</p>
<p><strong>Note:</strong> Sometimes this does not work on the simulator. Works consistently on device.</p>
<p><strong>Example</strong></p>
<pre><code>var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,'newIcon.png');
Newsstand.iconImage = file;
</code></pre>
*/
/**
* @class NewsstandAddIssueProps
* @platform iphone 1.0.0
* @platform ipad 1.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.newsstand/edit/master/apidoc/Newsstand.yml
* <p>A dictionary of properties to pass to the method</p>
*/
/**
* @property name
* @type String
* <p>The unique name of the issue to be added to the library.</p>
*/
/**
* @property date
* @type Date
* <p>The release date of the issue.</p>
*/
/**
* @class NewsstandGetIssueProps
* @platform iphone 1.0.0
* @platform ipad 1.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.newsstand/edit/master/apidoc/Newsstand.yml
* <p>A dictionary of properties to pass to the method</p>
*/
/**
* @property name
* @type String
* <p>The unique name of the issue to be added to the library.</p>
*/
/**
* @class NewsstandSetBasicAuthProps
* @platform iphone 1.0.0
* @platform ipad 1.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.newsstand/edit/master/apidoc/Newsstand.yml
* <p>A dictionary of properties to pass to the method</p>
*/
/**
* @property username
* @type String
*
*/
/**
* @property password
* @type String
*
*/
/**
* @class Modules.CoreMotion.Accelerometer
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/Accelerometer.yml
* <p>Allows Titanium client applications to access CoreMotion's Accelerometer APIs.</p>
*/
/**
* @method setAccelerometerUpdateInterval
* <p>The interval in milliseconds, for providing accelerometer updates to the callback.</p>
* @param {Number} interval
<p>The interval in milliseconds</p>
*/
/**
* @method startAccelerometerUpdates
* <p>Starts accelerometer updates.</p>
* @description <p>If a callback is passed to this method, it will be called whenever there is an update.
The frequency of these updates can be controlled using the
{@link Modules.CoreMotion.Accelerometer#method-setAccelerometerUpdateInterval} method.
If no callback is passed, the accelerometer data can be accessed using the
{@link Modules.CoreMotion.Accelerometer#method-getAccelerometerData} method. To stop the delivery of events,
call the {@link Modules.CoreMotion.Accelerometer#method-stopAccelerometerUpdates} method.
Note: It is recommended to set an update interval of at least 250ms before, to avoid receiving
too many callbacks at once.</p>
* @param {Callback<CoreMotionAccelerometerDataWithSuccess>} callback (optional)
<p>The method to be called when there is an update.</p>
*/
/**
* @method stopAccelerometerUpdates
* <p>Stops accelerometer updates.</p>
*/
/**
* @method isAccelerometerActive
* <p>Returns a Boolean indicating whether accelerometer updates are currently happening.</p>
* @description <p>Indicates whether {@link Modules.CoreMotion.Accelerometer#method-startAccelerometerUpdates} has been called since
{@link Modules.CoreMotion.Accelerometer#method-stopAccelerometerUpdates}.</p>
* @returns {Boolean}
*/
/**
* @method isAccelerometerAvailable
* <p>Returns a Boolean indicating whether an accelerometer is available on the device.</p>
* @returns {Boolean}
*/
/**
* @method getAccelerometerData
* <p>Returns the latest sample of accelerometer data.</p>
* @description <p>An app that is receiving accelerometer data after calling
{@link Modules.CoreMotion.Accelerometer#method-startAccelerometerUpdates} with no callback, needs to periodically
check the value returned by this method and process the acceleration data.</p>
* @returns {CoreMotionAccelerometerData}
*/
/**
* @class Modules.CoreMotion
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Allows Titanium client applications to access Apple's CoreMotion APIs.</p>
* @description <p>The Core Motion module provides access to Apple's CoreMotion APIs. The Core Motion module provides support
for monitoring various hardware sensors on iOS devices, such as the accelerometer, gyroscope, and
magnetometer. The Core Motion module allows you to access the metrics provided by these sensors.</p>
<p>For instruction and examples of using the Core Motion Module, see the
<a href="http://docs.appcelerator.com/titanium/latest/#!/guide/Core_Motion_Module">Core Motion Module guide</a>.</p>
<h3>Requirements</h3>
<p>This module only works with devices running iOS 7 and later. Not all devices have the same hardware sensors,
so all features may not be available for all devices. Be sure to use the API to check the device
for the existence of a feature.</p>
<p>You can only test the Core Motion module on a device. The Core Motion API cannot be tested on the iOS
simulator.</p>
<p>Some features may require permission to use "Motion Activity". iOS requires the user's approval to
use the "Motion Activity" permission. When the application uses the Core Motion API for the first
time, iOS prompts the user to either approve or deny access to the Core Motion features of the
device. The user can change the permission settings with <strong>Settings</strong> > <strong>Privacy</strong>.</p>
<h3>Getting Started</h3>
<p>Once you have <a href="#!/guide/Using_a_Module">installed</a> the module and added it as a depedency,
use <code>require()</code> to access it from JavaScript:</p>
<pre><code>var CoreMotion = require("ti.coremotion");
The `CoreMotion` variable is a reference to the Module object. Use this reference to make
subsequent calls to the CoreMotion Module API. The following example shows the step counting
API of `CoreMotion`.
var pedometer = CoreMotion.createPedometer();
// This code checks to see if the device can gather step counting data
if (pedometer.isStepCountingAvailable()) {
// If it can, it starts the step counter and outputs the data to the console
pedometer.startPedometerUpdates(function(e){
Ti.API.info(JSON.stringify(e));
});
} else {
Ti.API.warn('This device does not support counting steps.');
}
</code></pre>
<h3>Sample Application</h3>
<p>The module ZIP file contains a Core Motion sample applications in <code>example/app.js</code>.</p>
<h3>Further Reading</h3>
<ul>
<li><a href="https://developer.apple.com/library/ios/documentation/CoreMotion/Reference/CoreMotion_Reference/_index.html">iOS Developer Library: Core Motion Framework Reference</a></li>
<li><a href="https://developer.apple.com/library/ios/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/motion_event_basics/motion_event_basics.html">iOS Developer Library: Motion Events</a></li>
</ul>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Modules.CoreMotion#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Modules.CoreMotion#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
/**
* @property ERROR_NULL
* @type Number
* @readonly
* <p>No error.</p>
*/
/**
* @property ERROR_DEVICE_REQUIRES_MOVEMENT
* @type Number
* @readonly
* <p>The device must move for a sampling of motion data to occur.</p>
*/
/**
* @property ERROR_TRUE_NORTH_NOT_AVAILABLE
* @type Number
* @readonly
* <p>True north is not available on this device. This usually indicates that the device's location is not yet available.</p>
*/
/**
* @property ERROR_UNKNOWN
* @type Number
* @readonly
* <p>An unknown error occurred.</p>
*/
/**
* @property ERROR_MOTION_ACTIVITY_NOT_AVAILABLE
* @type Number
* @readonly
* <p>Motion activity support is not available on the current device.</p>
*/
/**
* @property ERROR_MOTION_ACTIVITY_NOT_AUTHORIZED
* @type Number
* @readonly
* <p>The app is not currently authorized to use motion activity support.</p>
*/
/**
* @property ERROR_MOTION_ACTIVITY_NOT_ENTITLED
* @type Number
* @readonly
* <p>The app is missing a required entitlement.</p>
*/
/**
* @property ERROR_INVALID_PARAMETER
* @type Number
* @readonly
* <p>An invalid parameter was specified.</p>
*/
/**
* @property ATTITUDE_REFERENCE_FRAME_X_ARBITRARY_Z_VERTICAL
* @type Number
* @readonly
* <p>Describes a reference frame in which the Z axis is vertical and the X axis points
in an arbitrary direction in the horizontal plane.</p>
*/
/**
* @property ATTITUDE_REFERENCE_FRAME_X_ARBITRARY_CORRECTED_Z_VERTICAL
* @type Number
* @readonly
* <p>Describes the same reference frame as
{@link Modules.CoreMotion#property-ATTITUDE_REFERENCE_FRAME_X_ARBITRARY_Z_VERTICAL}
except that the magnetometer, when available and calibrated, is used to
improve long-term yaw accuracy. Using this constant instead of
{@link Modules.CoreMotion#property-ATTITUDE_REFERENCE_FRAME_X_ARBITRARY_Z_VERTICAL}
results in increased CPU usage.</p>
*/
/**
* @property ATTITUDE_REFERENCE_FRAME_X_MAGNETIC_NORTH_Z_VERTICAL
* @type Number
* @readonly
* <p>Describes a reference frame in which the Z axis is vertical and the X axis points
toward magnetic north. Note that using this reference frame may require device
movement to calibrate the magnetometer.</p>
*/
/**
* @property ATTITUDE_REFERENCE_FRAME_X_TRUE_NORTH_Z_VERTICAL
* @type Number
* @readonly
* <p>Describes a reference frame in which the Z axis is vertical and the X axis points
toward true north. Note that using this reference frame may require device movement
to calibrate the magnetometer. It also requires the location to be available in order
to calculate the difference between magnetic and true north.</p>
*/
/**
* @property MAGNETIC_FIELD_CALIBRATION_ACCURACY_UNCALIBRATED
* @type Number
* @readonly
* <p>The magnetic field estimate is not calibrated.</p>
*/
/**
* @property MAGNETIC_FIELD_CALIBRATION_ACCURACY_LOW
* @type Number
* @readonly
* <p>The accuracy of the magnetic field calibration is low.</p>
*/
/**
* @property MAGNETIC_FIELD_CALIBRATION_ACCURACY_MEDIUM
* @type Number
* @readonly
* <p>The accuracy of the magnetic field calibration is medium.</p>
*/
/**
* @property MAGNETIC_FIELD_CALIBRATION_ACCURACY_HIGH
* @type Number
* @readonly
* <p>The accuracy of the magnetic field calibration is high.</p>
*/
/**
* @property MOTION_ACTIVITY_CONFIDENCE_LOW
* @type Number
* @readonly
* <p>Confidence is low.</p>
*/
/**
* @property MOTION_ACTIVITY_CONFIDENCE_MEDIUM
* @type Number
* @readonly
* <p>Confidence is good.</p>
*/
/**
* @property MOTION_ACTIVITY_CONFIDENCE_HIGH
* @type Number
* @readonly
* <p>Confidence is high.</p>
*/
/**
* @class CoreMotionReferenceFrameArgs
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary of arguments passed to the
{@link Modules.CoreMotion.DeviceMotion#method-startDeviceMotionUpdatesUsingReferenceFrame DeviceMotion.startDeviceMotionUpdatesUsingReferenceFrame()} method.</p>
*/
/**
* @property referenceFrame
* @type Number
* <p>A constant identifying the reference frame to use for device-motion updates.</p>
* @description <p>Could be {@link Modules.CoreMotion#property-ATTITUDE_REFERENCE_FRAME_X_ARBITRARY_Z_VERTICAL},
{@link Modules.CoreMotion#property-ATTITUDE_REFERENCE_FRAME_X_ARBITRARY_CORRECTED_Z_VERTICAL},
{@link Modules.CoreMotion#property-ATTITUDE_REFERENCE_FRAME_X_MAGNETIC_NORTH_Z_VERTICAL}, or
{@link Modules.CoreMotion#property-ATTITUDE_REFERENCE_FRAME_X_TRUE_NORTH_Z_VERTICAL}.</p>
*/
/**
* @class CoreMotionQueryActivityArgs
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary of arguments to pass to the {@link Modules.CoreMotion.MotionActivity#method-queryActivity MotionActivity.queryActivity()} method.</p>
*/
/**
* @property start
* @type Date
* <p>The start time to use when gathering motion data.</p>
*/
/**
* @property end
* @type Date
* <p>The end time to use when gathering motion data.</p>
*/
/**
* @class CoreMotionStartStepCountingArgs
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary of arguments to pass to the <a href="Modules.CoreMotion.Stepcounter.startStepCountingUpdates">StepCounter.startStepCountingUpdates()</a> method.</p>
*/
/**
* @property stepCounts
* @type Number
* <p>The number of steps to record before executing the callback.
The number of steps must be greater than 0.</p>
*/
/**
* @class CoreMotionStartPedometerArgs
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary of arguments to pass to the {@link Modules.CoreMotion.Pedometer#method-startPedometerUpdates Pedometer.startPedometerUpdates()} method.</p>
*/
/**
* @property start
* @type Date
* <p>The start time to use when gathering pedometer data.</p>
*/
/**
* @class CoreMotionQueryStepCountArgs
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary of arguments to pass to the <a href="Modules.CoreMotion.Stepcounter.queryStepCount">Stepcounter.queryStepCount()</a> method.</p>
*/
/**
* @property start
* @type Date
* <p>The start time to use when gathering step count data.</p>
*/
/**
* @property end
* @type Date
* <p>The end time to use when gathering step count data.</p>
*/
/**
* @class CoreMotionAccelerometerDataWithSuccess
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends CoreMotionAccelerometerData
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary passed to the callback of the {@link Modules.CoreMotion.Accelerometer#method-startAccelerometerUpdates Accelerometer.startAccelerometerUpdates()} method.</p>
*/
/**
* @property success
* @type Boolean
* @readonly
* <p>A Boolean indicating if the operation was successful or not.</p>
*/
/**
* @property error
* @type String
* @readonly
* <p>An error message describing the error if there was one.</p>
*/
/**
* @property code
* @type Number
* @readonly
* <p>An error code describing the error if there was one.</p>
* @description <p>See <code>ERROR</code> constants for possible values.</p>
*/
/**
* @class CoreMotionGyroDataWithSuccess
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends CoreMotionGyroData
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary passed to the callback of the {@link Modules.CoreMotion.Gyroscope#method-startGyroUpdates Gyroscope.startGyroUpdates()} method.</p>
*/
/**
* @property success
* @type Boolean
* @readonly
* <p>A Boolean indicating if the operation was successful or not.</p>
*/
/**
* @property error
* @type String
* @readonly
* <p>An error message describing the error if there was one.</p>
*/
/**
* @property code
* @type Number
* @readonly
* <p>An error code describing the error if there was one.</p>
* @description <p>See <code>ERROR</code> constants for possible values.</p>
*/
/**
* @class CoreMotionMagnetometerDataWithSuccess
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends CoreMotionMagnetometerData
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary passed to the callback of the {@link Modules.CoreMotion.Magnetometer#method-startMagnetometerUpdates Magnetometer.startMagnetometerUpdates()} method.</p>
*/
/**
* @property success
* @type Boolean
* @readonly
* <p>A Boolean indicating if the operation was successful or not.</p>
*/
/**
* @property error
* @type String
* @readonly
* <p>An error message describing the error if there was one.</p>
*/
/**
* @property code
* @type Number
* @readonly
* <p>An error code describing the error if there was one.</p>
* @description <p>See <code>ERROR</code> constants for possible values.</p>
*/
/**
* @class CoreMotionDeviceMotionDataWithSuccess
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends CoreMotionDeviceMotionData
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary passed to the callback of the
<a href="Modules.CoreMotion.Magnetometer.startDeviceMotionUpdates">Magnetometer.startDeviceMotionUpdates()</a> and
<a href="Modules.CoreMotion.Magnetometer.startDeviceMotionUpdatesUsingReferenceFrame">Magnetometer.startDeviceMotionUpdatesUsingReferenceFrame()</a> methods.</p>
*/
/**
* @property success
* @type Boolean
* @readonly
* <p>A Boolean indicating if the operation was successful or not.</p>
*/
/**
* @property error
* @type String
* @readonly
* <p>An error message describing the error if there was one.</p>
*/
/**
* @property code
* @type Number
* @readonly
* <p>An error code describing the error if there was one.</p>
* @description <p>See <code>ERROR</code> constants for possible values.</p>
*/
/**
* @class CoreMotionPedometerDataWithSuccess
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @pseudo
* @extends CoreMotionDeviceMotionData
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary passed to the callback of the
<a href="Modules.CoreMotion.Pedometer.startDeviceMotionUpdates">Pedometer.startPedometerUpdates()</a> and
{@link Modules.CoreMotion.Pedometer#method-queryPedometerData Pedometer.queryPedometerData()} methods.</p>
*/
/**
* @property success
* @type Boolean
* @readonly
* <p>A Boolean indicating if the operation was successful or not.</p>
*/
/**
* @property error
* @type String
* @readonly
* <p>An error message describing the error if there was one.</p>
*/
/**
* @property code
* @type Number
* @readonly
* <p>An error code describing the error if there was one.</p>
* @description <p>See <code>ERROR</code> constants for possible values.</p>
*/
/**
* @property startDate
* @type Date
* @readonly
* <p>The start time for the pedometer data.</p>
*/
/**
* @property endDate
* @type Date
* @readonly
* <p>The end time for the pedometer data.</p>
*/
/**
* @property numberOfSteps
* @type Number
* @readonly
* <p>The number of steps taken by the user.</p>
*/
/**
* @property distance
* @type Number
* @readonly
* <p>The estimated distance (in meters) traveled by the user.</p>
*/
/**
* @property floorsAscended
* @type Number
* @readonly
* <p>The approximate number of floors ascended by walking.</p>
*/
/**
* @property floorsDescended
* @type Number
* @readonly
* <p>The approximate number of floors descended by walking.</p>
*/
/**
* @property currentPace
* @type Number
* @readonly
* <p>The current pace of the user, measured in seconds per meter.
Note: This property is only available on iOS 9 and later.</p>
*/
/**
* @property currentCadence
* @type Number
* @readonly
* <p>The rate at which steps are taken, measured in steps per second.
Note: This property is only available on iOS 9 and later.</p>
*/
/**
* @class CoreMotionAccelerometerData
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends CoreMotionLogItem
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Representation of an accelerometer event.</p>
*/
/**
* @property acceleration
* @type CoreMotionAcceleration
* @readonly
* <p>The acceleration measured by the accelerometer.</p>
*/
/**
* @class CoreMotionGyroData
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends CoreMotionLogItem
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Representation of a gyroscope event.</p>
*/
/**
* @property rotationRate
* @type CoreMotionRotationRate
* @readonly
* <p>The rotation rate measured by the gyroscope.</p>
*/
/**
* @class CoreMotionMagnetometerData
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends CoreMotionLogItem
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Representation of a magnetometer event.</p>
*/
/**
* @property magneticField
* @type CoreMotionMagneticField
* @readonly
* <p>The magnetic field measured by the magnetometer.</p>
* @description <p>For more information, see
<a href="https://developer.apple.com/library/ios/documentation/CoreMotion/Reference/CMMagnetometerData_Class/Reference/Reference.html#//apple_ref/occ/instp/CMMagnetometerData/magneticField">iOS Developer Library: CMMagnetometerData.magneticField property</a>.</p>
*/
/**
* @class CoreMotionDeviceMotionData
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends CoreMotionLogItem
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Representation of a device-motion event.</p>
*/
/**
* @property attitude
* @type CoreMotionAttitude
* @readonly
* <p>The attitude of the device.</p>
*/
/**
* @property rotationRate
* @type CoreMotionRotationRate
* @readonly
* <p>The roation rate of the device.</p>
*/
/**
* @property gravity
* @type CoreMotionAcceleration
* @readonly
* <p>The gravity acceleration vector expressed in the device's reference frame.</p>
*/
/**
* @property userAcceleration
* @type CoreMotionAcceleration
* @readonly
* <p>The acceleration that the user is giving to the device.</p>
*/
/**
* @property magneticField
* @type CoreMotionCalibratedMagneticField
* @readonly
* <p>Returns the magnetic field vector with respect to the device.</p>
*/
/**
* @class CoreMotionActivityData
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Represents the current motion associated with the device.</p>
* @description <p>Note that there is no timestamp property for this class.</p>
*/
/**
* @property activity
* @type CoreMotionActivity
* @readonly
* <p>The motion activity object that defines the current type of motion for the device.</p>
*/
/**
* @class CoreMotionActivityQueryDataWithSuccess
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends CoreMotionActivityQueryData
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary passed to the callback of the {@link Modules.CoreMotion.MotionActivity#method-queryActivity MotionActivity.queryActivity()} method.</p>
*/
/**
* @property success
* @type Boolean
* @readonly
* <p>A Boolean indicating if the operation was successful or not.</p>
*/
/**
* @property error
* @type String
* @readonly
* <p>An error message describing the error if there was one.</p>
*/
/**
* @property code
* @type Number
* @readonly
* <p>An error code describing the error if there was one.</p>
* @description <p>See <code>ERROR</code> constants for possible values.</p>
*/
/**
* @class CoreMotionActivityQueryData
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Represents the activities that are returned by an activity query.</p>
*/
/**
* @property activities
* @type CoreMotionActivity[]
* @readonly
* <p>An array of {@link CoreMotionActivity} objects indicating the updates that occurred.</p>
* @description <p>The objects in the array are ordered by the time at which they occurred in the
specified time interval. Use the <code>startDate</code> property in each motion object to
determine when the update occurred.</p>
*/
/**
* @class CoreMotionStepCountingDataWithSuccess
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends CoreMotionStepCountingData
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary passed to the callback of the {@link Modules.CoreMotion.StepCounter#method-startStepCountingUpdates StepCounter.startStepCountingUpdates()} method.</p>
*/
/**
* @property success
* @type Boolean
* @readonly
* <p>A Boolean indicating if the operation was successful or not.</p>
*/
/**
* @property error
* @type String
* @readonly
* <p>An error message describing the error if there was one.</p>
*/
/**
* @property code
* @type Number
* @readonly
* <p>An error code describing the error if there was one.</p>
* @description <p>See <code>ERROR</code> constants for possible values.</p>
*/
/**
* @class CoreMotionStepCountingData
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Represents the steps that are returned by a step-count event.</p>
*/
/**
* @property numberOfSteps
* @type Number
* @readonly
* <p>The total number of steps since the {@link Modules.CoreMotion.StepCounter#method-startStepCountingUpdates StepCounter.startStepCountingUpdates} method was called.</p>
*/
/**
* @property timestamp
* @type Date
* @readonly
* <p>The time at which the current step count was reported.</p>
*/
/**
* @class CoreMotionStepCountingQueryDataWithSuccess
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends CoreMotionStepCountingQueryData
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Dictionary passed to the callback of the {@link Modules.CoreMotion.StepCounter#method-queryStepCount StepCounter.ueryStepCount()} method.</p>
*/
/**
* @property success
* @type Boolean
* @readonly
* <p>A Boolean indicating if the operation was successful or not.</p>
*/
/**
* @property error
* @type String
* @readonly
* <p>An error message describing the error if there was one.</p>
*/
/**
* @property code
* @type Number
* @readonly
* <p>An error code describing the error if there was one.</p>
* @description <p>See <code>ERROR</code> constants for possible values.</p>
*/
/**
* @class CoreMotionStepCountingQueryData
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Represents the steps that are returned by a step-count query.</p>
*/
/**
* @property numberOfSteps
* @type Number
* @readonly
* <p>The number of steps that occurred between the start and end times specified by the query.</p>
*/
/**
* @class CoreMotionActivity
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Contains the data for a single motion update event.</p>
* @description <p>For more information see,
<a href="https://developer.apple.com/library/ios/documentation/CoreMotion/Reference/CMMotionActivity_class/Reference/Reference.html">iOS Developer Library: CMMotionActivity Class Reference</a>.</p>
*/
/**
* @property stationary
* @type Boolean
* @readonly
* <p>A Boolean indicating whether the device is stationary.</p>
*/
/**
* @property walking
* @type Boolean
* @readonly
* <p>A Boolean indicating whether the device is on a walking person.</p>
*/
/**
* @property running
* @type Boolean
* @readonly
* <p>A Boolean indicating whether the device is on a running person.</p>
*/
/**
* @property automotive
* @type Boolean
* @readonly
* <p>A Boolean indicating whether the device is in an automobile.</p>
*/
/**
* @property unknown
* @type Boolean
* @readonly
* <p>A Boolean indicating whether the type of motion is unknown.</p>
*/
/**
* @property startDate
* @type Date
* @readonly
* <p>The time at which the change in motion occurred.</p>
*/
/**
* @property confidence
* @type Number
* @readonly
* <p>The confidence in the assessment of the motion type.</p>
* @description <p>Could be {@link Modules.CoreMotion#property-MOTION_ACTIVITY_CONFIDENCE_LOW},
{@link Modules.CoreMotion#property-MOTION_ACTIVITY_CONFIDENCE_MEDIUM}, or
{@link Modules.CoreMotion#property-MOTION_ACTIVITY_CONFIDENCE_HIGH}</p>
*/
/**
* @class CoreMotionAcceleration
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Representation of an accelerometer event.</p>
*/
/**
* @property x
* @type Number
* @readonly
* <p>X-axis acceleration in G's (gravitational force).</p>
*/
/**
* @property y
* @type Number
* @readonly
* <p>Y-axis acceleration in G's (gravitational force).</p>
*/
/**
* @property z
* @type Number
* @readonly
* <p>Z-axis acceleration in G's (gravitational force).</p>
*/
/**
* @class CoreMotionRotationRate
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Representation of a gyroscope event.</p>
*/
/**
* @property x
* @type Number
* @readonly
* <p>The X-axis rotation rate in radians per second. The sign
follows the right hand rule: If the right hand is wrapped
around the X axis such that the tip of the thumb points toward
positive X, a positive rotation is one toward the tips of the
other four fingers.</p>
*/
/**
* @property y
* @type Number
* @readonly
* <p>The Y-axis rotation rate in radians per second. The sign
follows the right hand rule: If the right hand is wrapped
around the Y axis such that the tip of the thumb points toward
positive Y, a positive rotation is one toward the tips of the
other four fingers.</p>
*/
/**
* @property z
* @type Number
* @readonly
* <p>The Z-axis rotation rate in radians per second. The sign
follows the right hand rule: If the right hand is wrapped
around the Z axis such that the tip of the thumb points toward
positive Z, a positive rotation is one toward the tips of the
other four fingers.</p>
*/
/**
* @class CoreMotionAttitude
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>The attitude of the device.</p>
*/
/**
* @method multiplyByInverseOfAttitude
* <p>Yields the change in attitude given a specific attitude.</p>
* @description <p>This method multiplies the inverse of the specified {@link CoreMotionAttitude}
object by the attitude represented by the receiving object. It replaces
the receiving instance with the attitude change relative to the object
passed in attitude. You should cache the {@link CoreMotionAttitude} instance
you want to use as a reference and pass that object as the argument to
subsequent calls of this method.</p>
* @param {CoreMotionAttitude} attitude
<p>An object representing the device's attitude at a given moment of measurement.</p>
*/
/**
* @property roll
* @type Number
* @readonly
* <p>The roll of the device, in radians.</p>
* @description <p>A roll is a rotation around a longitudinal axis that passes
through the device from its top to bottom.</p>
*/
/**
* @property pitch
* @type Number
* @readonly
* <p>The pitch of the device, in radians.</p>
* @description <p>A pitch is a rotation around a lateral axis that passes through
the device from side to side.</p>
*/
/**
* @property yaw
* @type Number
* @readonly
* <p>The yaw of the device, in radians.</p>
* @description <p>A yaw is a rotation around an axis that runs vertically through
the device. It is perpendicular to the body of the device, with
its origin at the center of gravity and directed toward the bottom
of the device.</p>
*/
/**
* @property rotationMatrix
* @type CoreMotionRotationMatrix
* @readonly
* <p>Returns a rotation matrix representing the device's attitude.</p>
* @description <p>A rotation matrix in linear algebra describes the rotation of a
body in three-dimensional Euclidean space.</p>
*/
/**
* @property quaternion
* @type CoreMotionQuaternion
* @readonly
* <p>Returns a quaternion representing the device's attitude.</p>
* @description <p>See {@link CoreMotionQuaternion} for further information.</p>
*/
/**
* @class CoreMotionRotationMatrix
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>The type of a structure representing a rotation matrix.</p>
*/
/**
* @property m11-m33
* @type Number
* @readonly
* <p>Each field in this structure defines an element of the rotation matrix
by its position. For example, m11 is the element in row 1, column 1;
m31 is the element in row 3, column 1; m13 is the element in row 1, column 3.</p>
* @description <ul>
<li>m11, m12, m13</li>
<li>m21, m22, m23</li>
<li>m31, m32, m33</li>
</ul>
*/
/**
* @class CoreMotionQuaternion
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>The type for a quaternion representing a measurement of attitude.</p>
* @description <p>For more information, see
<a href="https://developer.apple.com/library/ios/documentation/CoreMotion/Reference/CMAttitude_Class/Reference/Reference.html#//apple_ref/c/tdef/CMQuaternion">iOS Developer Library: CMAttitude.CMQuaternion constant</a>.</p>
*/
/**
* @property x
* @type Number
* @readonly
* <p>A value for the X-axis.</p>
*/
/**
* @property y
* @type Number
* @readonly
* <p>A value for the Y-axis.</p>
*/
/**
* @property z
* @type Number
* @readonly
* <p>A value for the Z-axis.</p>
*/
/**
* @property w
* @type Number
* @readonly
* <p>A value for the W-axis.</p>
*/
/**
* @class CoreMotionMagneticField
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>A structure containing 3-axis magnetometer data.</p>
*/
/**
* @property x
* @type Number
* @readonly
* <p>X-axis magnetic field in microteslas.</p>
*/
/**
* @property y
* @type Number
* @readonly
* <p>Y-axis magnetic field in microteslas.</p>
*/
/**
* @property z
* @type Number
* @readonly
* <p>Z-axis magnetic field in microteslas.</p>
*/
/**
* @class CoreMotionCalibratedMagneticField
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Calibrated magnetic field data and an estimate of the accuracy of the calibration.</p>
*/
/**
* @property field
* @type CoreMotionMagneticField
* <p>A structure containing 3-axis calibrated magnetic field data. See the description of
the structure of {@link CoreMotionMagneticField}.</p>
*/
/**
* @property accuracy
* @type Number
* @readonly
* <p>An enum-constant value that indicates the accuracy of the magnetic field estimate.</p>
*/
/**
* @class CoreMotionLogItem
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/CoreMotion.yml
* <p>Base class for specific motion types.</p>
*/
/**
* @property timestamp
* @type Number
* @readonly
* <p>The time when the logged item is valid.</p>
* @description <p>The time stamp is the amount of time in milliseconds since the phone booted.</p>
*/
/**
* @class Modules.CoreMotion.DeviceMotion
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/DeviceMotion.yml
* <p>Allows Titanium client applications to access CoreMotion's DeviceMotion APIs.</p>
*/
/**
* @method setShowsDeviceMovementDisplay
* <p>Controls whether the device-movement display is shown.</p>
* @description <p>When a device requires movement (for example, to calibrate the compass), the value of
this property indicates if the system's device-movement display should be shown.
When a device requires movement, the callback for
{@link Modules.CoreMotion.DeviceMotion#method-setDeviceMotionUpdateInterval} or
{@link Modules.CoreMotion.DeviceMotion#method-startDeviceMotionUpdatesUsingReferenceFrame} reports
the {@link Modules.CoreMotion#property-ERROR_DEVICE_REQUIRES_MOVEMENT} error once. By default,
this is set to false.</p>
* @param {Boolean} show
<p>Boolean indicating if the display should be shown</p>
*/
/**
* @method setDeviceMotionUpdateInterval
* <p>The interval in milliseconds, for providing device-motion updates to the callback.</p>
* @description <p>The system supplies device-motion updates to the callback passed to
{@link Modules.CoreMotion.DeviceMotion#method-startDeviceMotionUpdatesUsingReferenceFrame} or
{@link Modules.CoreMotion.DeviceMotion#method-startDeviceMotionUpdates} at regular intervals
determined by the value passed to this method. The interval units
are in milliseconds. The value of this property is capped to minimum
and maximum values; the maximum value is determined by the maximum
frequency supported by the hardware. If your app is sensitive to the
intervals of device-motion data, it should always check the timestamps
of the delivered device-motion event to determine the true update interval.</p>
* @param {Number} interval
<p>The interval in milliseconds</p>
*/
/**
* @method startDeviceMotionUpdatesUsingReferenceFrame
* <p>Starts device-motion updates using a reference frame.</p>
* @description <p>If a callback is passed to this method, it will be called whenever there is an update.
The frequency of these updates can be controlled using the
{@link Modules.CoreMotion.DeviceMotion#method-setDeviceMotionUpdateInterval} method.
If no callback is passed, the device-motion data can be accessed using the
{@link Modules.CoreMotion.DeviceMotion#method-getDeviceMotion} method. To stop the delivery of events,
call the {@link Modules.CoreMotion.DeviceMotion#method-stopDeviceMotionUpdates} method.</p>
* @param {CoreMotionReferenceFrameArgs} args
<p>The arguments passed to this method</p>
* @param {Callback<CoreMotionDeviceMotionDataWithSuccess>} callback (optional)
<p>The method to be called when there is an update.</p>
*/
/**
* @method startDeviceMotionUpdates
* <p>Starts device-motion updates.</p>
* @description <p>If a callback is passed to this method, it will be called whenever there is an update.
The frequency of these updates can be controlled using the
{@link Modules.CoreMotion.DeviceMotion#method-setDeviceMotionUpdateInterval} method.
If no callback is passed, the device-motion data can be accessed using the
{@link Modules.CoreMotion.DeviceMotion#method-getDeviceMotion} method. To stop the delivery of events,
call the {@link Modules.CoreMotion.DeviceMotion#method-stopDeviceMotionUpdates} method.</p>
* @param {Callback<CoreMotionDeviceMotionDataWithSuccess>} callback (optional)
<p>The method to be called when there is an update.</p>
*/
/**
* @method stopDeviceMotionUpdates
* <p>Stops device-motion updates.</p>
*/
/**
* @method getAttitudeReferenceFrame
* <p>Returns either the reference frame currently being used or the default
attitude reference frame.</p>
* @description <p>If device motion is active, this property returns the reference frame currently in use.
If device motion is not active but has been active since the app was last launched,
this property returns the last frame used. If device motion has not been active since
the app was last launched, this property returns the default attitude reference frame
for the device.
Possible reference frames include
{@link Modules.CoreMotion#property-ATTITUDE_REFERENCE_FRAME_X_ARBITRARY_Z_VERTICAL},
{@link Modules.CoreMotion#property-ATTITUDE_REFERENCE_FRAME_X_ARBITRARY_CORRECTED_Z_VERTICAL},
{@link Modules.CoreMotion#property-ATTITUDE_REFERENCE_FRAME_X_MAGNETIC_NORTH_Z_VERTICAL}, and
{@link Modules.CoreMotion#property-ATTITUDE_REFERENCE_FRAME_X_TRUE_NORTH_Z_VERTICAL}.</p>
* @returns {Number}
*/
/**
* @method availableAttitudeReferenceFrames
* <p>Returns a bitmask specifying the available attitude reference frames on the device.</p>
* @description <p>A bitmask that you can bitwise-AND with the <code>ATTITUDE_REFERENCE</code> constants.</p>
<p>For example to determine if <code>ATTITUDE_REFERENCE_FRAME_X_MAGNETIC_NORTH_Z_VERTICAL</code> is available on device.</p>
<pre><code>var frames = CoreMotion.DeviceMotion.availableAttitudeReferenceFrames();
if (frames & CoreMotion.ATTITUDE_REFERENCE_FRAME_X_MAGNETIC_NORTH_Z_VERTICAL) {
// do something here
}
</code></pre>
* @returns {Number}
*/
/**
* @method isDeviceMotionActive
* <p>Returns a Boolean value that determines whether the app is receiving updates from the device-motion service.</p>
* @description <p>Indicates whether {@link Modules.CoreMotion.DeviceMotion#method-startDeviceMotionUpdates} or
{@link Modules.CoreMotion.DeviceMotion#method-startDeviceMotionUpdatesUsingReferenceFrame} has been called since
{@link Modules.CoreMotion.DeviceMotion#method-stopDeviceMotionUpdates}.</p>
* @returns {Boolean}
*/
/**
* @method isDeviceMotionAvailable
* <p>Returns a Boolean indicating whether device-motion is available on the device.</p>
* @returns {Boolean}
*/
/**
* @method getDeviceMotion
* <p>Returns the latest sample of device-motion data.</p>
* @description <p>An app that is receiving device-motion data after calling
{@link Modules.CoreMotion.DeviceMotion#method-startDeviceMotionUpdatesUsingReferenceFrame} or
{@link Modules.CoreMotion.DeviceMotion#method-startDeviceMotionUpdates} with no callback, need to periodically
check the value returned by this method and process the device-motion data.</p>
* @returns {CoreMotionDeviceMotionData}
*/
/**
* @class Modules.CoreMotion.Gyroscope
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/Gyroscope.yml
* <p>Allows Titanium client applications to access CoreMotion's Gyroscope APIs.</p>
*/
/**
* @method setGyroUpdateInterval
* <p>The interval in milliseconds, for providing gyroscope updates to the callback.</p>
* @param {Number} interval
<p>The interval in milliseconds</p>
*/
/**
* @method startGyroUpdates
* <p>Starts gyroscope updates.</p>
* @description <p>If a callback is passed to this method, it will be called whenever there is an update.
The frequency of these updates can be controlled using the
<Modules.CoreMotion.setGyroUpdateInterval> method. If no callback is passed,
the gyroscope data can be accessed using the {@link Modules.CoreMotion.Gyroscope#method-getGyroData}
method. To stop the delivery of events,
call the {@link Modules.CoreMotion.Gyroscope#method-stopGyroUpdates} method.
Note: It is recommended to set an update interval of at least 250ms before, to avoid receiving
too many callbacks at once.</p>
* @param {Callback<CoreMotionGyroDataWithSuccess>} callback (optional)
<p>The method to be called when there is an update.</p>
*/
/**
* @method stopGyroUpdates
* <p>Stops gyroscope updates.</p>
*/
/**
* @method isGyroActive
* <p>Returns a Boolean indicating whether gyroscope updates are currently happening.</p>
* @description <p>Indicates whether {@link Modules.CoreMotion.Gyroscope#method-startGyroUpdates} has been called since
{@link Modules.CoreMotion.Gyroscope#method-stopGyroUpdates}.</p>
* @returns {Boolean}
*/
/**
* @method isGyroAvailable
* <p>Returns a Boolean indicating whether a gyroscope is available on the device.</p>
* @returns {Boolean}
*/
/**
* @method getGyroData
* <p>Returns the latest sample of gyroscope data.</p>
* @description <p>An app that is receiving gyroscope data after calling
{@link Modules.CoreMotion.Gyroscope#method-startGyroUpdates} with no callback, needs to periodically
check the value returned by this method and process the gyroscope data.</p>
* @returns {CoreMotionGyroData}
*/
/**
* @class Modules.CoreMotion.Magnetometer
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/Magnetometer.yml
* <p>Allows Titanium client applications to access CoreMotion's Magnetometer APIs.</p>
*/
/**
* @method setMagnetometerUpdateInterval
* <p>The interval in milliseconds, for providing magnetometer updates to the callback.</p>
* @param {Number} interval
<p>The interval in milliseconds</p>
*/
/**
* @method startMagnetometerUpdates
* <p>Starts magnetometer updates.</p>
* @description <p>If a callback is passed to this method, it will be called whenever there is an update.
The frequency of these updates can be controlled using the
{@link Modules.CoreMotion.Magnetometer#method-setMagnetometerUpdateInterval} method. If no callback is passed,
the magnetometer data can be accessed using the {@link Modules.CoreMotion.Magnetometer#method-getMagnetometerData}
method. You must call {@link Modules.CoreMotion.Magnetometer#method-stopMagnetometerUpdates} when you no
longer want your app to process magnetometer updates.</p>
* @param {Callback<CoreMotionMagnetometerDataWithSuccess>} callback (optional)
<p>The method to be called when there is an update.</p>
*/
/**
* @method stopMagnetometerUpdates
* <p>Stops magnetometer updates.</p>
*/
/**
* @method isMagnetometerActive
* <p>Returns a Boolean indicating whether magnetometer updates are currently happening.</p>
* @description <p>Indicates whether {@link Modules.CoreMotion.Magnetometer#method-startMagnetometerUpdates} has been called since
<Modules.CoreMotion.stopMagnetometerUpdates>.</p>
* @returns {Boolean}
*/
/**
* @method isMagnetometerAvailable
* <p>Returns a Boolean indicating whether a magnetometer is available on the device.</p>
* @returns {Boolean}
*/
/**
* @method getMagnetometerData
* <p>Returns the latest sample of magnetometer data.</p>
* @description <p>An app that is receiving magnetometer data after calling
{@link Modules.CoreMotion.Magnetometer#method-startMagnetometerUpdates} with no callback, needs to periodically
check the value returned by this method and process the magnetometer data.</p>
* @returns {CoreMotionMagnetometerData}
*/
/**
* @class Modules.CoreMotion.MotionActivity
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/MotionActivity.yml
* <p>Allows Titanium client applications to access CoreMotion's MotionActivity APIs.</p>
*/
/**
* @method isActivityAvailable
* <p>Returns a Boolean indicating whether motion activity data is available on the current device.</p>
* @returns {Boolean}
*/
/**
* @method startActivityUpdates
* <p>Starts the delivery of current motion activity updates to your app.</p>
* @description <p>This method initiates the tracking of motion data asynchronously.
Upon calling this method, the motion activity manager executes the
callback, reporting the current motion in effect for the device.
After that, the motion activity manager executes the callback only
when the motion data changes.</p>
<p>The callback is executed on a best effort basis and updates are not
delivered while your app is suspended. If updates arrived while your
app was suspended, the last update is delivered to your app when it
resumes execution. To get all of the updates that occurred while your
app was suspended, use the {@link Modules.CoreMotion.MotionActivity#method-queryActivity} method.</p>
<p>Upon starting activity updates, the motion activity manager reports
changes to its callback until you call the {@link Modules.CoreMotion.MotionActivity#method-stopActivityUpdates}
method. If you call this method again with a new callback, the activity
manager stops delivering updates to the old callback and delivers them
to the new callback instead.</p>
* @param {Callback<CoreMotionActivityData>} callback
<p>The method to be called when there is an update.</p>
*/
/**
* @method stopActivityUpdates
* <p>Stops the delivery of motion activity updates to your app.</p>
*/
/**
* @method queryActivity
* <p>Gathers and returns historical motion activity data for the specified time period.</p>
* @description <p>This method runs asynchronously, returning immediately and delivering the results
to the specified callback. The system stores only the last seven days worth of
activity data at most. If there are no samples for the specified range of time,
an error object with the code {@link Modules.CoreMotion#property-ERROR_UNKNOWN} is passed to the
callback.</p>
* @param {CoreMotionQueryActivityArgs} args
<p>An object of arguments</p>
* @param {Callback<CoreMotionActivityQueryDataWithSuccess>} callback
<p>The callback to execute with the results.</p>
*/
/**
* @class Modules.CoreMotion.Pedometer
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/Pedometer.yml
* <p>Allows Titanium client applications to access CoreMotion's Pedometer APIs.
Note: This API is only available in iOS 8 and later.</p>
*/
/**
* @method isSupported
* <p>Returns a Boolean value indicating whether the pedometer is supported on the current iOS version.</p>
* @returns {Boolean}
*/
/**
* @method isCadenceAvailable
* <p>Returns a Boolean value indicating whether cadence information is available on the current device.
Note: This API is only available on iOS 9 and later.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @returns {Boolean}
*/
/**
* @method isDistanceAvailable
* <p>Returns a Boolean value indicating whether distance support is available on the current device.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @returns {Boolean}
*/
/**
* @method isFloorCountingAvailable
* <p>Returns a Boolean value indicating whether floor counting is available on the current device.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @returns {Boolean}
*/
/**
* @method isPaceAvailable
* <p>Returns a Boolean value indicating whether pace information is available on the current device.
Note: This API is only available on iOS 9 and later.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @returns {Boolean}
*/
/**
* @method isStepCountingAvailable
* <p>Returns a Boolean indicating whether step-counting support is available on the current device.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @returns {Boolean}
*/
/**
* @method startPedometerUpdates
* <p>Starts the delivery of recent pedestrian-related data to your app.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Upon calling this method, the pedometer object starts calling your handler block regularly
with data. The data passed to your handler block represents the cumulative data starting at the
specified start date and ending at the current time. (You can get the start and end dates from
the CMPedometerData object passed to your handler.) This method initiates the event delivery
process asynchronously and executes your block on a serial dispatch queue, which ensures that
only one copy of the block runs at any given time.</p>
<p>When the app is suspended, the delivery of updates stops temporarily. Upon returning to foreground
or background execution, the pedometer object begins updates again.</p>
<p>To stop the delivery of events, call the {@link Modules.CoreMotion.Pedometer#method-stopPedometerUpdates} method.</p>
* @param {CoreMotionStartPedometerArgs} args
<p>An object of arguments</p>
* @param {Callback<CoreMotionPedometerDataWithSuccess>} callback
<p>The callback to execute with the results.</p>
*/
/**
* @method stopPedometerUpdates
* <p>Stops the delivery of recent pedestrian data updates to your app.</p>
* @description <p>Use this method to stop the delivery of continuous updates that were initiated
by a call to the {@link Modules.CoreMotion.Pedometer#method-startPedometerUpdates} method. </p>
*/
/**
* @method queryPedometerData
* <p>Retrieves the data between the specified start and end dates.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Use this method to retrieve historical pedestrian data between the specified dates.
This method runs asynchronously and delivers the data to the block you provide. Only the past
seven days worth of data is stored and available for you to retrieve. Specifying a start date
that is more than seven days in the past returns only the available data.</p>
<p>It is safe to call this method at the same time that you are generating continuous updates using the
{@link Modules.CoreMotion.Pedometer#method-startPedometerUpdates} method.</p>
* @param {CoreMotionStartPedometerArgs} args
<p>An object of arguments</p>
* @param {Callback<CoreMotionPedometerDataWithSuccess>} callback
<p>The callback to execute with the results.</p>
*/
/**
* @class Modules.CoreMotion.StepCounter
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.coremotion/edit/master/apidoc/StepCounter.yml
* <p>Allows Titanium client applications to access CoreMotion's (deprecated) StepCounter APIs.</p>
* @deprecated 5.2.0 This API was deprecated by Apple in iOS 7 and is only available for backward compatibility
with older versions of this module. It will be removed in the next release. Please use
<Modules.CoreMotion.Pedometer> API instead, which provides the same functionality including
new properties like `floorCount` and `distance`.
*/
/**
* @method isStepCountingAvailable
* <p>Returns a Boolean indicating whether step-counting support is available on the current device.</p>
* @returns {Boolean}
*/
/**
* @method startStepCountingUpdates
* <p>Starts the delivery of current step-counting data to your app.</p>
* @description <p>This method initiates tracking of the user's steps and calls the callback
periodically to deliver the results. When you call this method, the step counter
resets the current step count value to 0 and begins counting. Each time the step
counter records the number of steps in the stepCounts parameter, it executes the
specified callback. For example, if stepCounts is 100, it would send updates
at 100 steps, 200 steps, 300 steps, and so on. The number of steps reported to your
handler is always the total number of steps since you called this method.</p>
<p>The callback is executed on a best effort basis each time the step count
threshold is exceeded. If your app is suspended when the threshold is exceeded,
the callback is not executed. When your app resumes, the callback is not executed
until the threshold is exceeded again.</p>
<p>To stop the delivery of step-counting updates, call the
{@link Modules.CoreMotion.StepCounter#method-stopStepCountingUpdates} method. </p>
* @param {CoreMotionStartStepCountingArgs} args
<p>An object of arguments</p>
* @param {Callback<CoreMotionStepCountingDataWithSuccess>} callback
<p>The callback to execute with the results.</p>
*/
/**
* @method stopStepCountingUpdates
* <p>Stops the delivery of step-counting updates to your app.</p>
* @description <p>Call this method to stop the delivery of updates that you started by calling
the <Modules.CoreMotion.startStepCountingUpdates> method. This method does not
stop queries started using the {@link Modules.CoreMotion.StepCounter#method-queryStepCount} method.</p>
*/
/**
* @method queryStepCount
* <p>Gathers and returns historical step count data for the specified time period.</p>
* @description <p>The system stores only the last seven days worth of step data at most.
If there are no samples for the specified range of time, a value of 0 is passed to the callback.</p>
* @param {CoreMotionQueryStepCountArgs} args
<p>An object of arguments</p>
* @param {Callback<CoreMotionStepCountingQueryDataWithSuccess>} callback
<p>The callback to execute with the results.</p>
*/
/**
* @class Modules.URLSession
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator-modules/ti.urlsession/edit/master/apidoc/urlsession.yml
* <p>Wrapper to support iOS's NSURLSession class for background downloads.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>These APIs are supported on iOS 7 and later.</p>
<p>The URL session module (<code>com.appcelerator.urlSession</code>) provides the application the ability to
download large content via HTTP while the application is in the background. With this module, you can</p>
<ol>
<li>Create a URL session and a background download task.</li>
<li>Monitor events to check the progress of the download and session.</li>
<li>Cancel downloads and invalidate sessions.</li>
</ol>
<p>URL session events are monitored through the following iOS application-level events:</p>
<ul>
<li>{@link Titanium.App.iOS#event-backgroundtransfer}</li>
<li>{@link Titanium.App.iOS#event-downloadprogress}</li>
<li>{@link Titanium.App.iOS#event-downloadcompleted}</li>
<li>{@link Titanium.App.iOS#event-sessioncompleted}</li>
<li>{@link Titanium.App.iOS#event-sessioneventscompleted}</li>
</ul>
<p>These events are monitored as application-level events by using the <code>addEventListener</code> method with the
Titanium.App.iOS namespace. </p>
<p>For more information on getting started, refer to the
<a href="http://docs.appcelerator.com/titanium/latest/#!/guide/iOS_Background_Services">iOS Background Services guide</a>.</p>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method createURLSessionBackgroundConfiguration
* <p>Creates a preconfigured session configuration object that can be used to create a URL session for
performing a background download task.</p>
* @param {String} indentifier
<p>Arbitrary string used to identify the session in the events.</p>
* @returns {Object}Configuration object to pass to the <Modules.URLSession.createURLSession> method.
*/
/**
* @method createURLSession
* <p>Creates a session with the specified session configuration.</p>
* @description <p>If the session configuration was created with the identifier of a existing session,
then this function would return the pre-existing session.</p>
<p>The session object keeps a strong reference until your app explicitly invalidates the
session. If you do not invalidate the session by calling the <code>invalidateAndCancel</code> or
<code>finishTasksAndInvalidate</code> method, your app leaks memory.</p>
* @param {Object} sessionConfiguration
<p>Session configuration object created with the {@link Modules.URLSession#method-createURLSessionBackgroundConfiguration}</p>
* @returns {Object}URL session object.
*/
/**
* @method finishTasksAndInvalidate
* <p>Invalidates the given session object, allowing any outstanding tasks to finish.</p>
* @description <p>This method returns immediately without waiting for tasks to finish. Once a session is invalidated,
new tasks cannot be created in the session, but existing tasks continue until completion. Once
invalidated, references to the events and callback objects are broken. Session objects cannot be
reused. To cancel all outstanding tasks, call <code>invalidateAndCancel</code> instead.</p>
* @param {Object} session
<p>URL session object.</p>
*/
/**
* @method invalidateAndCancel
* <p>Cancels all outstanding tasks and then invalidates the session object.</p>
* @description <p>Once invalidated, references to the events and callback objects are broken. Session objects cannot
be reused. To allow outstanding tasks to run until completion, call
<code>finishTasksAndInvalidate</code> instead.</p>
* @param {Object} session
<p>URL session object.</p>
*/
/**
* @method backgroundDownloadTaskWithURL
* <p>Creates a download task for the specified URL, within the provided session object and saves the
results to a file.</p>
* @description <p>Once this function is called, the download starts automatically. The progress of
the download can be monitored by listening to the <code>downloadprogress</code>, <code>downloadcompleted</code>,
<code>sessioneventscompleted</code> and <code>sessioncompleted</code> events.</p>
* @param {Object} session
<p>URL session object.</p>
* @param {String} url
<p>URL to download content from.</p>
* @returns {String}Task's identifier number.
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Modules.URLSession#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Modules.URLSession#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
/**
* @class Modules.TouchId
* @platform android 5.4.0
* @platform iphone 3.4.0
* @platform ipad 3.4.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator-modules/ti.touchid/edit/master/apidoc/TouchId.yml
* <p>Allows a Titanium application to use the iOS Touch ID authentication mechanism.</p>
* @description <p>Touch ID is a security mechanism that uses a fingerprint to authenticate the user. The
fingerprint sensor is located in the Home button of the device. Users can use their fingerprint
instead of entering their passcode for authentication.</p>
<h3>Requirements</h3>
<p>The Touch ID module is available with the Titanium SDK starting with Release 3.4.0.
This module only works with devices running iOS 8. You can only test the Touch ID module on a device.</p>
<p>The device must have a Touch ID sensor in the Home button and Touch ID must be setup in order to use
the Touch ID authentication mechanism. You can set up Touch ID in iOS Setup Assistant or by
tapping <strong>Touch ID & Passcode</strong> from Settings.</p>
<p>For information on setting up Touch ID, see
<a href="http://support.apple.com/kb/HT5883">iPhone 5s: Using Touch ID</a>.</p>
<h3>Getting Started</h3>
<p>Add the module as a dependency to your application by adding a <strong><code><module></code></strong> item to the
<strong><code><modules></code></strong> element of your <code>tiapp.xml</code> file:</p>
<pre><code><ti:app>
...
<modules>
<module platform="iphone">ti.touchid</module>
</modules>
...
</ti:app>
</code></pre>
<p>Use <code>require()</code> to access the module from JavaScript:</p>
<pre><code>var TouchId = require("ti.touchid");
</code></pre>
<p>The <code>TouchId</code> variable is a reference to the module. Make API calls using this reference:</p>
<pre><code>TouchId.authenticate({
reason: "Need to modify personal settings.",
callback: authCB
});
</code></pre>
<h3>Sample Application</h3>
<p>The module contains a sample application in the
<code><TITANIUM_SDK_HOME>/modules/iphone/ti.touchid/<VERSION>/example/</code> folder.</p>
*/
/**
* @method authenticate
* <p>Initiates the Touch ID authentication process.</p>
* @description <p>A special note for Android:</p>
<p>When you call this method in Android, if you provide an incorrect fingerprint and receive an error
message "Unable to recognize fingerprint", do not call authenticate. Instead, get the user to try
again. If you call authenticate, it will end up in a bad state. This flow will be improved in the
next update for Android.</p>
* @param {Dictionary} params
<p>Dictionary containing two properties:</p>
<ul>
<li><code>reason</code> (String): Message displayed in the authentication dialog describing why the
application is requesting authentication. This is for iOS only.</li>
<li><p><code>callback</code> (Function): Callback function executed after the authentication
completes. The callback function is passed a dictionary with three properties:</p>
<ul><li><code>success</code> (Boolean): Set to true if authentication succeeded.</li>
<li><code>error</code> (String): System error message.</li>
<li><code>code</code> (Number): Module <code>ERROR_*</code> constant indicating the reason for the failure.</li></ul></li>
</ul>
*/
/**
* @method deviceCanAuthenticate
* <p>Checks to see if device is configured for Touch ID authentication.</p>
* @description <p>var TiTouchId = require("ti.touchid");
var result = TiTouchId.deviceCanAuthenticate();
if (!result.canAuthenticate) {
alert('Message: ' + result.error + '\nCode: ' + result.code); <br>
} else {
alert('device can authenticate');
}</p>
* @returns {DeviceCanAuthenticateResult}
*/
/**
* @method isSupported
* <p>Determines if the current device supports Touch ID.</p>
* @returns {Boolean}
*/
/**
* @property ERROR_AUTHENTICATION_FAILED
* @type Number
* @readonly
* <p>Constant indicating that the authentication was not successful.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property ERROR_PASSCODE_NOT_SET
* @type Number
* @readonly
* <p>Constant indicating that the passcode is not set for the device.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property ERROR_TOUCH_ID_NOT_AVAILABLE
* @type Number
* @readonly
* <p>Constant indicating that Touch ID is not available on the device.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property ERROR_TOUCH_ID_NOT_ENROLLED
* @type Number
* @readonly
* <p>Constant indicating that Touch ID does not have any enrolled fingerprints.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property ERROR_SYSTEM_CANCEL
* @type Number
* @readonly
* <p>Constant indicating that iOS cancelled authentication, for example, if another
application enters the foreground.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property ERROR_USER_CANCEL
* @type Number
* @readonly
* <p>Constant indicating that the user canceled authentication.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property ERROR_USER_FALLBACK
* @type Number
* @readonly
* <p>Constant indicating that the user tapped the fallback button to enter their passcode.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property ERROR_APP_CANCELLED
* @type Number
* @readonly
* <p>Constant indicating that the app cancelled authentication.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property ERROR_INVALID_CONTEXT
* @type Number
* @readonly
* <p>Constant indicating that there is an invalid context.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property ERROR_TOUCH_ID_LOCKOUT
* @type Number
* @readonly
* <p>Constant indicating that Touch ID has locked out.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @class DeviceCanAuthenticateResult
* @platform android 1.0.1
* @platform iphone 1.0.1
* @platform ipad 1.0.1
* @pseudo
* @extends
* @editurl https://github.com/appcelerator-modules/ti.touchid/edit/master/apidoc/TouchId.yml
* <p>Dictionary containing results for <ti.touchid.deviceCanAuthenticate>.</p>
*/
/**
* @property canAuthenticate
* @type Boolean
* <p>Set to true if device is configured for touch ID authentication.</p>
*/
/**
* @property error
* @type String
* <p>System error message if any.</p>
*/
/**
* @property code
* @type Number
* <p>iOS only, Module <code>ERROR_*</code> constant indicating the reason for the failure if any.</p>
*/
/**
* @class Global
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/Global.yml
* <p>The APIs that reside in the global scope, which may be called without a namespace prefix.</p>
* @description <p>Titanium provides a number of global built-in objects, detailed below. </p>
<h4>JSON</h4>
<p>Titanium provides a built-in {@link Global.JSON JSON} object two functions, <code>parse</code> and <code>stringify</code>.</p>
<h4>String Utilities</h4>
<p>Titanium includes several extra utility functions for formatting text, attached to the
global {@link Global.String String} object.</p>
<h4>console</h4>
<p>Titanium provides {@link Global.console console} support familiar to many javascript developers
for logging at the toplevel, in addition to the {@link Titanium.API} logging facilities.</p>
<h4>Timers</h4>
<p>Titanium has built-in support for one-off and repeating timers:</p>
<ul>
<li><p>Use {@link Global#method-setTimeout setTimeout} to start a one-off timer.</p></li>
<li><p>Use {@link Global#method-setInterval setInterval} to start a repeating timer.</p></li>
</ul>
<h4>Alert</h4>
<p>Titanium has a built-in convenience function {@link Global#method-alert alert} which can be used as an alias
for the {@link Titanium.UI.AlertDialog AlertDialog} module.</p>
<h4>Locale</h4>
<p>The <code>L</code> macro can also be used as an alias for the {@link Titanium.Locale#method-getString} method.</p>
*/
/**
* @method decodeURIComponent
* <p>Replaces each escape sequence in the specified string, created using the <code>encodedURI</code>
method, with the character that it represents. </p>
* @description <p>For more information, see the MDN website for
<a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeURIComponent">encodeURIComponent</a>
and <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/decodeURIComponent">decodeURIComponent</a>.</p>
* @param {String} encodedURI
<p>Text that optionally contains encoded escape sequences.</p>
* @returns {String}Decoded string.
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method encodeURIComponent
* <p>Replaces each special character in the specified string with the equivalent URI escape
sequence. Useful for encoding URIs.</p>
* @description <p>For more information, see the MDN website for
<a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeURIComponent">encodeURIComponent</a>
and <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/decodeURIComponent">decodeURIComponent</a>.</p>
* @param {String} string
<p>Text that optionally contains special characters.</p>
* @returns {String}Encoded string.
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method L
* <p>An alias for {@link Titanium.Locale#method-getString}.</p>
* @param {String} key
<p>Key used to lookup the localized string.</p>
* @param {String} hint (optional)
<p>Text to return if <code>key</code> is not found.</p>
* @returns {String}Localized string defined by `key`, or value of `hint` otherwise.
*/
/**
* @method alert
* <p>Displays a pop-up alert dialog with the passed in <code>message</code>.</p>
* @description <p>This function is a shortcut for creating and displaying an
{@link Titanium.UI.AlertDialog alert dialog}. For example, the following two statements produce
the same result.</p>
<pre><code>alert('Danger, Will Robinson!');
Ti.UI.createAlertDialog({ message: 'Danger, Will Robinson!' }).show();
</code></pre>
<p>Note that unlike a web browser-based version of <code>alert</code>, the method is asynchronous. However,
only one alert dialog will be visible and modal at a time.</p>
<p>Be aware that this method may be removed in the future.</p>
* @param {String} message
<p>Alert message.</p>
*/
/**
* @method clearTimeout
* <p>Cancels a one-time timer.</p>
* @param {Number} timerId
<p>Unique timer identifier returned by {@link Global#method-setTimeout setTimeout}.</p>
*/
/**
* @method setTimeout
* <p>Executes code or a function after a delay.</p>
* @description <p>Note that although the timeout is not guaranteed to be exact, the delay before the
function is invoked will be no less than the specified delay.</p>
<p>Returns a unique timer identifier that can be passed to {@link Global#method-clearTimeout clearTimeout}
to cancel this timer.</p>
<p>For more information, see the MDN website for
<a href="https://developer.mozilla.org/en/DOM/window.setTimeout">setTimeout</a>.</p>
* <h3>Examples</h3>
<h4>Execute a function in 500 milliseconds</h4>
<pre><code>setTimeout(function(){
Ti.API.debug('Called using setTimeout');
}, 500);</code></pre>
* @param {Callback} function
<p>Code or function to call.</p>
* @param {Number} delay
<p>Time in milliseconds to wait before the function is called.</p>
* @returns {Number}Unique timer identifier.
*/
/**
* @method require
* <p>Loads either a native Titanium module or a CommonJS module.</p>
* @description <p>The <code>require</code> function takes a module identifier as its argument and returns an object with
references to the module's exported symbols.</p>
<h4>Native Titanium Module</h4>
<p>To load a native Titanium module:</p>
<ol>
<li>Install the module to the project or copy it to the Titanium SDK home directory.</li>
<li>Add the module as a dependency to the project by modifying the <code>modules</code> section of the <code>tiapp.xml</code> file.</li>
<li>Initialize the module with the <code>require</code> method by passing the module ID to the method.</li>
</ol>
<p>For detailed instructions, refer to
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Using_a_Module">Using a Module</a>.</p>
<h4>CommonJS Module</h4>
<p>To load a local CommonJS module, place the CommonJS module in the <code>Resources</code> directory of
your project. Pass the <code>require</code> method the path to the file without the <code>Resources</code>
directory, platform-specific directory and the <code>.js</code> extension.</p>
<p>Note that the appropriate <em>platform-specific</em> <code>Resources</code> subdirectory is merged into the
main <code>Resources</code> directory at build time. For example, suppose the following files exist.</p>
<ul>
<li><code>Resources/app.js</code></li>
<li><code>Resources/ui/MainWindow.js</code></li>
<li><code>Resources/iphone/ui/TaskWindow.js</code></li>
<li><code>Resources/android/ui/TaskWindow.js</code></li>
</ul>
<p>The appropriate <code>TaskWindow.js</code> file is moved into the <code>Resources/ui</code> directory of the
built application. To include both the MainWindow module and the platform-specific
TaskWindow module from any JavaScript file in the project:</p>
<pre><code> // load main window module from ui subdirectory
var mainWindow = require('ui/MainWindow');
// load platform-specific task window module
var taskWindow = require('ui/TaskWindow');
</code></pre>
<p>For more information, see the Official CommonJS website about
<a href="http://wiki.commonjs.org/wiki/Modules/1.1">CommonJS Modules/1.1 Specification</a>.</p>
<h4>Alloy</h4>
<p>For Alloy, place the CommonJS modules in the <code>app/lib</code> directory of your Alloy project,
then load the module with the <code>require</code> method without the <code>app/lib</code> path and <code>.js</code>
extension.</p>
<p>Starting with Alloy 1.5.0, you can add platform-specific directories to the <code>app/lib</code> directory.
Do not include the platform-specific directory when referencing the CommonJS module.</p>
<p>For example, a module file <code>app/lib/android/myModule/module.js</code> may be loaded by
<code>app/controllers/index.js</code> using:</p>
<pre><code>require('myModule/module');
</code></pre>
<h4>Android</h4>
<p>Additionally, on Android, an absolute path to a module may be specified using a path
separator (<code>/</code>) at the beginning of the path.</p>
<p>For example, a module file <code>Resources/myModule/module.js</code> may be required by
<code>Resources/example/example.js</code> using either of the following:</p>
<pre><code>require('../myModule/module')
require ('/myModule/module')
</code></pre>
* <h3>Examples</h3>
<h4>Require a Native Module</h4>
<p>To load a native module with the ID <code>com.mycompany.module</code>:</p>
<pre><code>var module = require('com.mycompany.module');
</code></pre><h4>Require a JavaScript Module</h4>
<p><code>myModule.js</code>:</p>
<pre><code>exports.message = "hello world";
</code></pre>
<p><code>app.js</code>:</p>
<pre><code>var myModule = require('myModule');
alert(myModule.message);
</code></pre>
* @param {String} moduleId
<p>Native module ID or local path to a JavaScript file <em>minus</em> the <code>.js</code> extension.</p>
* @returns {Object}Exported `exports` object of the required module.
*/
/**
* @method setInterval
* <p>Executes a function repeatedly with a fixed time delay between each call to that function.</p>
* @description <p>Note that although the interval is not guaranteed to be exact, the interval between calls
will be no less than the specified delay.</p>
<p>Returns a unique timer identifier that can be passed to {@link Global#method-clearInterval clearInterval}
to cancel this timer.</p>
<p>For more information, see the MDN website for
<a href="https://developer.mozilla.org/en/DOM/window.setInterval">setInterval</a>.</p>
* <h3>Examples</h3>
<h4>Update a label once every second, and stop at 10 seconds</h4>
<pre><code>var count = 0;
var timer = setInterval(function(){
count++;
label.text = "count: " + count;
if (count == 10) {
clearInterval(timer);
}
}, 1000);</code></pre>
* @param {Callback} function
<p>Function to call.</p>
* @param {Number} delay
<p>Time in milliseconds to wait between calls to function.</p>
* @returns {Number}Unique timer identifier.
*/
/**
* @method clearInterval
* <p>Cancels an interval timer.</p>
* @param {Number} timerId
<p>Unique timer identifier returned by {@link Global#method-setInterval setInterval}.</p>
*/
/**
* @class Global.JSON
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/JSON/JSON.yml
* <p>Global JSON object providing the {@link Global.JSON#method-parse parse} and {@link Global.JSON#method-stringify stringify} methods.</p>
*/
/**
* @method parse
* <p>Parses a JSON text to produce an object or array.</p>
* @description <p>The <code>parse</code> method throws a SyntaxError exception if the text cannot be parsed.</p>
<p>The optional reviver parameter is a function that can filter and
transform the results. It receives each of the keys and values,
and its return value is used instead of the original value.
If it returns what it received, then the structure is not modified.
If it returns undefined then the member is deleted.</p>
* <h3>Examples</h3>
<h4>Parse with Reviver Function</h4>
<pre><code>The following example parses the text, converting values that look like ISO date strings into Date objects.
myData = JSON.parse(text, function (key, value) { var a; if (typeof value === 'string') { a = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); if (a) { return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], +a[5], +a[6])); } } return value; });</code></pre>
* @param {String} text
<p>JSON text to parse.</p>
* @param {Callback} reviver
<p>Function to filter and transform the results.</p>
* @returns {Object}
*/
/**
* @method stringify
* <p>Produces a JSON text from a JavaScript value.</p>
* @description <p>When an object value is found, if the object contains a toJSON
method, its toJSON method is called and the result is
stringified. A toJSON method does not serialize: it returns the
value represented by the name/value pair that should be serialized,
or undefined if nothing should be serialized. The toJSON method
is passed the key associated with the value, and <code>this</code> is
bound to the value.</p>
<p>For example, this would serialize Dates as ISO strings.</p>
<pre><code>Date.prototype.toJSON = function (key) {
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
return this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z';
};
</code></pre>
<p>You can provide an optional replacer function. It is passed the
key and value of each member, with <code>this</code> bound to the containing
object. The value that is returned from your function is
serialized. If your function returns undefined, then the member will
be excluded from the serialization.</p>
<p>If the replacer parameter is an array of strings, then it is
used to select the members to be serialized. It filters the results
such that only members with keys listed in the replacer array are
stringified.</p>
<p>Values that do not have JSON representations, such as undefined or
functions, will not be serialized. Such values in objects are
dropped; in arrays they are replaced with null. You can use
a replacer function to replace those with JSON values.</p>
<p>JSON.stringify(undefined) returns undefined.</p>
<p>The optional space parameter produces a stringification of the
value that is filled with line breaks and indentation to make it
easier to read.</p>
<p>If the space parameter is a non-empty string, then that string is
used for indentation. If the space parameter is a number, then
each level is indented by the specified number of spaces. </p>
* <h3>Examples</h3>
<h4>Formatting with a Replacer Function</h4>
<p>The following example produces a readable version of a Titanium event object,
omitting the <code>source</code> and <code>type</code> properties and adding whitespace for readability:</p>
<pre><code>JSON.stringify(evt, function(key, value) {
if(key === 'source' || key === 'type') {
return undefined;
} else {
return value;
}
}, 2));
</code></pre>
* @param {Object} value
<p>Any JavaScript value, usually an object or array.</p>
* @param {Callback/Array<String>} replacer (optional)
<p>Determines how object values are stringified for objects. See main text for usage.</p>
* @param {Number/String} space (optional)
<p>Specifies how nested structures are indented. If it is a number, it specifies the number of spaces to indent at each level. If it is a string (such as '\t' or '&nbsp;'), it specifies the characters used to indent at each level.</p>
* @returns {String}
*/
/**
* @class Global.String
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/String/String.yml
* <p>The JavaScript built-in String type.</p>
* @description <p>This module contains Titanium-only extensions for formatting data into locale-specific strings.
The target locale is configured by the user in the device's system Settings.</p>
*/
/**
* @method format
* <p>Formats a string using <code>printf</code>-style substitution.</p>
* @description <p>The format string follows the
<a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html">IEEE printf specification</a>.</p>
<p>For each "conversion specification" (ie. <code>%s</code> for a string or <code>%d</code> for a number) used inside
the string, <code>formatString</code> argument, the respective value is substituted from the
argument list. For example:</p>
<pre><code>var forename = 'Paul';
var number = 21;
var message = String.format('Welcome, %s! You are visitor number %d', forename, number);
Ti.API.info(message);
</code></pre>
* @param {String} formatString
<p>An IEEE <code>printf</code>-style string, containing zero or more conversion specifications.</p>
* @param {String/Number} value
<p>Values to substitute into the <code>formatString</code>. The method expects a variable number
of <code>value</code> arugments, one for each <code>%</code> conversion specification in the format
string. Optional on Android.</p>
* @returns {String}Formatted string.
*/
/**
* @method formatCurrency
* <p>Formats a number into the currency format, including currency symbol, of the locale
configured for the system.</p>
* @param {Number} value
<p>Currency value.</p>
* @returns {String}Formatted, localized string.
*/
/**
* @method formatDate
* <p>Formats a date into the date format of the locale configured for the system.</p>
* @param {Date} date
<p>Date to format.</p>
* @param {String} format (optional)
<p>Date format to use. One of 'short', 'medium', 'long' or 'full'.</p>
* @returns {String}Formatted, localized string.
*/
/**
* @method formatDecimal
* <p>Formats a number into the decimal format, including decimal symbol, of the locale
configured for the system.</p>
* @param {Number} value
<p>Value to format.</p>
* @param {String} locale (optional)
<p>Locale string. For example, <code>en-US</code> for US English.</p>
* @param {String} pattern (optional)
<p>Format pattern.</p>
* @returns {String}String representation of the specified number, using a locale-specific decimal symbol,
if required.
*/
/**
* @method formatTime
* <p>Formats a date into the time format of the locale configured for the system.</p>
* @description <p>On Android, this method returns the short format.</p>
* @param {Date} date
<p>Date to format.</p>
* @param {String} format (optional)
<p>Date format to use. One of 'short', 'medium', or 'long' (iOS only.)</p>
* @returns {String}Formatted, localized string.
*/
/**
* @class Global.console
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
* @platform windowsphone 4.1.0
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/console/console.yml
* <p>Console logging facilities.</p>
* @description <p>The toplevel <code>console</code> support is intended to supplement {@link Titanium.API}
and make it easier for developers to port existing javascript code
(especially CommonJS modules) to Titanium.</p>
<p>Note that <code>console</code> does not currently implement the complete
<a href="http://getfirebug.com/wiki/index.php/Console_API">firebug specification</a>.
Our support is roughly equivalent to that offered by
<a href="http://nodejs.org/api/stdio.html">node.js's console</a>.</p>
*/
/**
* @method debug
* <p>Log a message at the <code>debug</code> level.</p>
* @description <p>The message to log can either be a single argument, or any number
of arguments, which will be converted to strings and then concatenated
together with a space character.</p>
* @param {Object} message
<p>The message(s) to log.</p>
*/
/**
* @method error
* <p>Log a message at the <code>error</code> level.</p>
* @description <p>The message to log can either be a single argument, or any number
of arguments, which will be converted to strings and then concatenated
together with a space character.</p>
* @param {Object} message
<p>The message(s) to log.</p>
*/
/**
* @method info
* <p>Log a message at the <code>info</code> level.</p>
* @description <p>The message to log can either be a single argument, or any number
of arguments, which will be converted to strings and then concatenated
together with a space character.</p>
* @param {Object} message
<p>The message(s) to log.</p>
*/
/**
* @method log
* <p>Log a message at the <code>info</code> level.</p>
* @description <p>The message to log can either be a single argument, or any number
of arguments, which will be converted to strings and then concatenated
together with a space character.</p>
<p>Note that this method has different behavior from {@link Titanium.API#method-log},
which can take multiple arguments, but in doing so interprets the
first argument as a custom log level.</p>
* @param {Object} message
<p>The message(s) to log.</p>
*/
/**
* @method warn
* <p>Log a message at the <code>warn</code> level.</p>
* @description <p>The message to log can either be a single argument, or any number
of arguments, which will be converted to strings and then concatenated
together with a space character.</p>
* @param {Object} message
<p>The message(s) to log.</p>
*/
/**
* @class Modules.Cloud.ACLs
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/ACLs/ACLs.yml
* <p>Provides methods for accessing ArrowDB access control lists (ACLs).</p>
* <h3>Examples</h3>
<h4>Create an ACL</h4>
<p>This example creates an ACL object and checks the response.</p>
<pre><code>Cloud.ACLs.create({
name: 'testACL',
reader_ids: readers.ids.join(','),
writer_ids: writers.ids.join(','),
public_read: "false",
public_write: "false"
}, function (e) {
if (e.success) {
alert('Created!');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Update an ACL</h4>
<p>This example updates an ACL object and checks the response.</p>
<pre><code>Cloud.ACLs.update({
name: 'testACL',
reader_ids: '',
writer_ids: '',
public_read: "true",
public_write: "true"
}, function (e) {
if (e.success) {
alert('Updated!');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show an ACL</h4>
<p>This example requests an ACL object and checks the response.</p>
<pre><code>Cloud.ACLs.show({
name: 'testACL'
}, function (e) {
if (e.success) {
alert('Shown!');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove an ACL</h4>
<p>This example deletes an ACL object and checks the response.</p>
<pre><code>Cloud.ACLs.remove({
name: 'testACL'
}, function (e) {
if (e.success) {
alert('Removed!');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Add user to an ACL</h4>
<p>This example adds a user to an ACL object and checks the response.</p>
<pre><code>Cloud.ACLs.addUser({
name: 'testACL',
reader_ids: readers.ids.join(','),
writer_ids: writers.ids.join(',')
}, function (e) {
if (e.success) {
alert('Added!');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove user from an ACL</h4>
<p>This example removes a user from an ACL object and checks the response.</p>
<pre><code>Cloud.ACLs.removeUser({
name: 'testACL',
reader_ids: readers.ids.join(','),
writer_ids: writers.ids.join(',')
}, function (e) {
if (e.success) {
alert('Removed!');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Check user permissions</h4>
<p>This example checks a user's permissions in an ACL and checks the response.</p>
<pre><code>Cloud.ACLs.checkUser({
name: 'testACL',
user_id: userID
}, function (e) {
if (e.success) {
alert('Read Permission: ' + e.permission['read permission'] +
'\nWrite Permission: ' + e.permission['write permission']);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Creates an ACL object.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/ACLs-method-create">Access Control List (ACL): Create an access control list</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>acls</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudACLsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method update
* <p>Updates an ACL object.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/ACLs-method-update">Access Control List (ACL): Update an ACL</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>acls</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudACLsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method show
* <p>Shows an ACL object.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/ACLs-method-show">Access Control List (ACL): Show an ACL</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>acls</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudACLsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Deletes an ACL object.</p>
* @description <p>Requires user login.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/ACLs-method-delete">Access Control List (ACL): Delete an ACL</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudACLsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method addUser
* <p>Adds one or more users to an ACL object.</p>
* @description <p>Requires user login.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/ACLs-method-add">Access Control List (ACL): Add user(s) to an ACL</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudACLsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method removeUser
* <p>Removes one or more users from an ACL object.</p>
* @description <p>Requires user login.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/ACLs-method-remove">Access Control List (ACL): Remove user(s) from an ACL</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudACLsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method checkUser
* <p>Checks a user's permission in an ACL object.</p>
* @description <p>Requires user login.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/ACLs-method-check">Access Control List (ACL): Check a user's permission in an ACL</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudACLsCheckResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudACLsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/ACLs/ACLs.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property acls
* @type Dictionary[]
* <p>Set of ACL objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class CloudACLsCheckResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/ACLs/ACLs.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property permission
* @type Dictionary
* <p>Dictionary of permissions.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Chats
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Chats/Chats.yml
* <p>Provides methods for accessing ArrowDB chat messages.</p>
* <h3>Examples</h3>
<h4>Create Chat Message</h4>
<p>This example sends a chat message to a list of users and checks the response.</p>
<pre><code>Cloud.Chats.create({
to_ids: ids.join(','),
message: 'Good morning'
}, function (e) {
if (e.success) {
for (var i = 0; i < e.chats.length; i++) {
var chat = e.chats[i];
alert('Success:\n' +
'From: ' + chat.from.first_name + ' ' + chat.from.last_name + '\n' +
'Updated: ' + chat.updated_at + '\n' +
'Message: ' + chat.message);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query for Chat Message</h4>
<p>This example requests a list of chat messages and checks the response.</p>
<pre><code>Cloud.Chats.query({
participate_ids: ids.join(','),
where: {
updated_at: { '$gt': last_update_time }
}
}, function (e) {
if (e.success) {
for (var i = 0; i < e.chats.length; i++) {
var chat = e.chats[i];
alert('Success:\n' +
'From: ' + chat.from.first_name + ' ' + chat.from.last_name + '\n' +
'Updated: ' + chat.updated_at + '\n' +
'Message: ' + chat.message);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Get Chat Groups</h4>
<p>This example requests a lists of chat groups that the current user belongs to and checks
the response.</p>
<pre><code>Cloud.Chats.getChatGroups(function (e) {
if (e.success) {
for (var i = 0; i < e.chats.length; i++) {
var group = e.chat_groups[i];
alert('Success:\n' +
'id: ' + group.id + '\n' +
'created_at: ' + group.created_at + '\n' +
'number of users: ' + group.participate_users.length);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Send a chat message to another user or a group of users.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Chats-method-create">Chats: Create a Chat Message</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>chats</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudChatsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Deletes a chat message.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Chats-method-delete">Chats: Delete a Chat Message</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method getChatGroups
* <p>Retrieve a list of chat groups the current user belongs to.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Chats-method-get_chat_groups">Chats: List Chat Groups</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>chat_groups</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudChatGroupsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method queryChatGroups
* <p>Retrieve a list of chat groups with sorting and pagination.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Chats-method-query_chat_groups">Chats: Query Chat Groups</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>chat_groups</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudChatGroupsResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method query
* <p>Retrieve a list of chat messages with sorting and pagination.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Chats-method-query">Chats: Custom Query Chat Messages</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>chats</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudChatsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudChatsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Chats/Chats.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property chats
* @type Dictionary[]
* <p>Set of <code>chats</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class CloudChatGroupsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Chats/Chats.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property chat_groups
* @type Dictionary[]
* <p>Set of <code>chat_groups</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Checkins
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Checkins/Checkins.yml
* <p>Provides methods for accessing ArrowDB checkins.</p>
* <h3>Examples</h3>
<h4>Create a Checkin</h4>
<p>This example creates a checkin and checks the response.</p>
<pre><code>Cloud.Checkins.create({
place_id: myPlaceId,
message: 'What a great view!',
photo: Titanium.Filesystem.getFile('photo.jpg')
}, function (e) {
if (e.success) {
var checkin = e.checkins[0];
alert('Success:\n' +
'id: ' + checkin.id + '\n' +
'place: ' + checkin.place.name);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query for Checkins</h4>
<p>This example requests information about checkins and checks the response.</p>
<pre><code>Cloud.Checkins.query({
page: 1,
per_page: 20,
order: '-updated_at'
}, function (e) {
if (e.success) {
for (var i = 0; i < e.checkins.length; i++) {
var checkin = e.checkins[i];
alert('Success:\n' +
'id: ' + checkin.id + '\n' +
'place: ' + checkin.place.name + '\n' +
'updated_at: ' + checkin.updated_at + '\n' +
'user: ' + checkin.user.first_name + ' ' + checkin.user.last_name);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show Checkin</h4>
<p>This example requests information about a checkin and checks the response.</p>
<pre><code>Cloud.Checkins.show({
checkin_id: myCheckinId
}, function (e) {
if (e.success) {
var checkin = e.checkins[0];
alert('Success:\n' +
'id: ' + checkin.id + '\n' +
'place: ' + checkin.place.name + '\n' +
'updated_at: ' + checkin.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove Checkin</h4>
<p>This example deletes a checkin and checks the response.</p>
<pre><code>Cloud.Checkins.remove({
checkin_id: myCheckinId
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Check in to a place or event.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Checkins-method-create">Checkins: Checkin to a Place or Event</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>checkins</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudCheckinsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method query
* <p>Retrieve a list of checkins with sorting and pagination.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Checkins-method-query">Checkins: Custom Query Checkins</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>checkins</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudCheckinsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Delete a checkin.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Checkins-method-delete">Checkins: Delete a checkin</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudCheckinsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method show
* <p>Retrieve a checkin.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Checkins-method-show">Checkins: Show a Checkin</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>checkins</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudCheckinsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudCheckinsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Checkins/Checkins.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property checkins
* @type Dictionary[]
* <p>Set of <code>checkins</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Clients
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Clients/Clients.yml
* <p>Provides methods for accessing ArrowDB clients.</p>
* <h3>Examples</h3>
<h4>Geolocate a Client</h4>
<p>This example locates a client and checks the response.</p>
<pre><code>Cloud.Clients.geolocate({
ip_address: clientIPAddress
}, function (e) {
if (e.success) {
alert('Success:\n' +
'ip_address: ' + e.ip_address + '\n' +
'latitude: ' + e.location.latitude + '\n' +
'longitude: ' + e.location.longitude);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method geolocate
* <p>Locate a mobile device based on the IP address of the device.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Clients-method-geolocate">Clients: Geolocate a Client</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the properties of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudClientsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudClientsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Clients/Clients.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property ip_address
* @type String
* <p>IP address of client.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @property location
* @type Dictionary
* <p>Location of client.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud
* @platform android 2.0
* @platform iphone 2.0
* @platform ipad 2.0
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Cloud.yml
* <p>The top level Cloud module for making calls to ArrowDB and Arrow Push.</p>
* @description <p>Appcelerator DB and Arrow Push provides a wide array of automatically-scaled data storage
and web services, such as user logins, photo uploads, checkins, status updates, and push
notifications, without the need to learn multiple third-party SDKs or do any
server-side programming. Remote calls to ArrowDB are done using REST APIs, which may be used with any
client technology that supports HTTP.</p>
<p>The Cloud module's specialized objects, such as <code>Users</code>, make accessing
ArrowDB as simple as using any of Titanium's other APIs, due to their familiar and intuitive API schemas.
You can also use the {@link Modules.Cloud#method-sendRequest} method to invoke
ArrowDB REST APIs directly. This approach requires some additional configuration for each method call,
but it lets you use new ArrowDB APIs as soon as they are available.</p>
<p>For a more detailed overview of ArrowDB and how to configure an application to use it, refer to the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Integrating_with_Appcelerator_Cloud_Services">Integrating with Appcelerator Cloud Services</a>.</p>
<h4>Using the Modules.Cloud Module</h4>
<p>The Modules.Cloud module is bundled with the Titanium SDK as an optional CommonJS module.
To use it, import the module with <code>require('ti.cloud')</code>, and then begin calling the methods
on its various objects. For example, the following code uses the <code>Modules.Cloud.Users.login</code>
method to login the user with the specified login and password:</p>
<pre><code>var Cloud = require('ti.cloud');
Cloud.Users.login({
login: 'test@mycompany.com',
password: 'test_password'
}, function (e) {
if (e.success) {
var user = e.users[0];
alert('Success:\n' +
'id: ' + user.id + '\n' +
'sessionId: ' + Cloud.sessionId + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
<h4>Invoking ArrowDB REST APIs Directly with sendRequest()</h4>
<p>The <code>Modules.Cloud.sendRequest</code> method lets you directly invoke ArrowDB REST APIs. The following example,
equivalent to the previous one, invokes the <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-login">users/login.json</a>
method directly to login a user.</p>
<pre><code>Cloud.sendRequest({
url : "users/login.json",
method : "POST",
data : {
login : 'test@mycompany.com',
password : 'test_password'
}
}, function(e) {// The callback called when the request completes
if (e.success) {
var user = e.users[0];
alert('Success:\n' +
'id: ' + user.id + '\n' +
'sessionId: ' + Cloud.sessionId + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
} else {
alert('Error:\n' + ((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
<h4>tiapp.xml Properties</h4>
<p>Studio will create a pair of API keys (Development and Production) for each Titanium
application depending on the user preference specified when creating the proejct. These keys
will be stored in the <code>tiapp.xml</code> file. One of the keys will be used during application
builds depending on the build type (development or production).</p>
<p>The supported properties in the <code>tiapp.xml</code> file are:</p>
<pre><code><property name="acs-api-key-development" type="string">YOUR DEVELOPMENT API KEY HERE</property>
<property name="acs-api-key-production" type="string">YOUR PRODUCTION API KEY HERE</property>
<property name="acs-api-key" type="string">YOUR API KEY HERE</property>
</code></pre>
<p>If a deployment-specific setting is provided (production or development) then that value will
be used for the current deployment environment.</p>
<p>There is also an optional setting to allow you to change the base URL for ArrowDB requests. You
will most likely never need to specify this. It can be specified deployment-specific, or
generic:</p>
<pre><code><property name="acs-base-url-development" type="string">DEVELOPMENT API URL HERE</property>
<property name="acs-base-url-production" type="string">PRODUCTION API URL HERE</property>
<property name="acs-base-url" type="string">API URL HERE</property>
</code></pre>
<p>By default, Ti.Cloud always uses SSL for communicating with the ArrowDB servers. This behavior can be overridden
by setting the URLs with their non-SSL counterpart.</p>
<pre><code><property name="acs-base-url" type="string">http://api.cloud.appcelerator.com</property>
</code></pre>
<h4>Pre 3.1.1 Release behavior</h4>
<p>Before Release 3.1.1 specify URLs without the protocol:</p>
<pre><code><property name="acs-base-url" type="string">api.cloud.appcelerator.com</property>
</code></pre>
<p>To disable SSL, add this line to the application code:</p>
<pre><code>Cloud.useSecure = false;
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method hasStoredSession
* <p>Checks if there is a stored user session.</p>
* @deprecated 2.1.2 See [accessToken](Modules.Cloud.accessToken) and [sessionId](Modules.Cloud.sessionId) for details on persisting session data.
* @description <p>True is returned after successfully calling {@link Modules.Cloud.Users#method-create} or
{@link Modules.Cloud.Users#method-login}, and false after successfully calling
{@link Modules.Cloud.Users#method-logout}.</p>
* @returns {Boolean}
*/
/**
* @method retrieveStoredSession
* <p>Returns the stored user session identifier.</p>
* @deprecated 2.1.2 See [accessToken](Modules.Cloud.accessToken) and [sessionId](Modules.Cloud.sessionId) for details on persisting session data.
* @description <p>A value is returned after successfully calling {@link Modules.Cloud.Users#method-create} or
{@link Modules.Cloud.Users#method-login}, and null after successfully calling
{@link Modules.Cloud.Users#method-logout}. </p>
<p>All calls made using the Cloud module automatically use this value and, thus, it only needs
to be used when manually making calls to the ArrowDB servers using {@link Titanium.Network.HTTPClient}. </p>
* @returns {String}
*/
/**
* @method sendRequest
* <p>Makes a REST API call to the ArrowDB server.</p>
* @description <p>This method lets you easily call ArrowDB REST APIs directly. You provide the REST API endpoint
relative to the ArrowDB base API URL (<a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-login">users/login.json</a>
for example), the appropriate HTTP method type (<code>GET</code>, <code>POST</code>, or <code>DELETE</code>), and the data
to send with the request.</p>
<p>As with the built-in Cloud methods, like {@link Modules.Cloud.Users#method-login},
the method's <code>callback</code> function parameter is passed a {@link CloudResponse} object that contains meta-data
about the request, and the actual response payload. If the REST method call completed successfully,
{@link CloudResponse#property-success} is <code>true</code>, or <code>false</code> if the call failed. If {@link CloudResponse#property-error} is <code>true</code>,
{@link CloudResponse#property-message} will contain a string that describes the error. </p>
<p>If the method call completed successfully, the <code>CloudResponse</code> object contains an additonal object
for the actual response payload. The name and type of this object depends on the REST
endpoint that was invoked. The <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api">ArrowDB and Push API documentation</a>
specifies the return type for each REST endpoint. For example, the <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-login">users/login.json</a>
endpoint returns a single element array named <code>users</code> that contains the <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users">Users</a>
object for the logged-in user.</p>
<p>For example:</p>
<pre><code>Cloud.sendRequest({
url : "users/login.json",
method : "POST",
data : {
login : 'test@mycompany.com',
password : 'test_password'
}
}, function(e) {// The callback called when the request completes
if (e.success) {
var user = e.users[0];
alert('Success:\n' +
'id: ' + user.id + '\n' +
'sessionId: ' + Cloud.sessionId + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
} else {
alert('Error:\n' + ((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
<p>By default, the base URL for each REST call is the public URL (<strong>api.cloud.appcelerator.com/v1</strong>).
For virtual private cloud (VPC) deployments, you can specify a different URL by modifying
the <code>acs-base-url</code> property of your project's tiapp.xml file (see <strong>tiapp.xml Properties</strong> above).</p>
* @param {Dictionary} parameters
<p>A Dictionary containing the parameters to send with the request. It must contain the following
key-value pairs:</p>
<ul>
<li><strong>url</strong> -- A string specifying the last fragment of the request URL.</li>
<li><strong>method</strong> -- A string specifying the HTTP method to use: "GET", "POST", "PUT", or "DELETE".</li>
<li><strong>data</strong> -- A Dictionary containing name-value pairs to send in the request.</li>
</ul>
* @param {Callback<CloudResponse>} callback
<p>Callback function to execute when a response is received.</p>
* @returns {void}
*/
/**
* @method createX509CertificatePinningSecurityManager
* <p>creates a security manager to authenticate specified HTTPS URLs.</p>
* @description <p class="note">This feature requires a Team or Enterprise subscription!</p>
<p class="note">This feature requires the https module!</p>
<p>Authenticates a set of HTTPS servers by pinning an HTTPS server's URL to its
public key contained in the certificate.
The security manager will guarantee that all <code>HTTPClient</code> connections to this URL
are to a server that holds the private key corresponding to the public key embedded in the
certificate, therefore authenticating the server and preventing man-in-the-middle attacks.
By default, the base URL for each call in {@link Modules.Cloud} is the public URL (<strong>api.cloud.appcelerator.com</strong>).
So to use this feature by default, you will need to get api.cloud.appcelerator.der by simply executing these
2 commands:</p>
<p>echo -n | openssl s_client -connect api.cloud.appcelerator.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > api.cloud.appcelerator.com.crt
openssl x509 -in api.cloud.appcelerator.com.crt -outform der -out api.cloud.appcelerator.com.der</p>
<p>For virtual private cloud (VPC) deployments, you can specify a different URL.
After generating the X509 certifcate file in der format, you have to place it in the Resources folder in your titanium project.
Before making any Cloud request, it is important to create security manager first, as shown:</p>
<p>Cloud.createX509CertificatePinningSecurityManager([
{
url: "<a href="https://api.cloud.appcelerator.com">https://api.cloud.appcelerator.com</a>",
serverCertificate: "api.cloud.appcelerator.com.der"
}
]);</p>
* @param {Array<Dictionary>} params
<p>Server URLs with the corresponding certificate to authenticate, specified as an
array of dictionaries that must contain the following keys:</p>
<ul>
<li><code>url</code>: HTTPS URL pinned to the public key in the server certificate</li>
<li><code>serverCertificate</code>: X.509 certificate file in DER binary format</li>
</ul>
* @returns {SecurityManagerProtocol}
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
* @platform mobileweb 4.1.0
*/
/**
* @method getDebug
* <p>Gets the value of the {@link Modules.Cloud#property-debug} property.</p>
* @returns {Boolean}
*/
/**
* @method setDebug
* <p>Sets the value of the {@link Modules.Cloud#property-debug} property.</p>
* @param {Boolean} debug
<p>New value for the property.</p>
*/
/**
* @method getOndatastream
* <p>Gets the value of the {@link Modules.Cloud#property-ondatastream} property.</p>
* @returns {Callback<CloudStreamProgress>}
*/
/**
* @method setOndatastream
* <p>Sets the value of the {@link Modules.Cloud#property-ondatastream} property.</p>
* @param {Callback<CloudStreamProgress>} ondatastream
<p>New value for the property.</p>
*/
/**
* @method getOnsendstream
* <p>Gets the value of the {@link Modules.Cloud#property-onsendstream} property.</p>
* @returns {Callback<CloudStreamProgress>}
*/
/**
* @method setOnsendstream
* <p>Sets the value of the {@link Modules.Cloud#property-onsendstream} property.</p>
* @param {Callback<CloudStreamProgress>} onsendstream
<p>New value for the property.</p>
*/
/**
* @method getUseSecure
* <p>Gets the value of the {@link Modules.Cloud#property-useSecure} property.</p>
* @removed 3.1.1 To disable SSL, set the `acs-base-url` and `acs-authbase-url` properties in the `tiapp.xml` using the HTTP URL.
To enable SSL, use the HTTPS URL.
<property name="acs-base-url" type="string">http://api.cloud.appcelerator.com</property>
* @returns {Boolean}
*/
/**
* @method setUseSecure
* <p>Sets the value of the {@link Modules.Cloud#property-useSecure} property.</p>
* @removed 3.1.1 To disable SSL, set the `acs-base-url` and `acs-authbase-url` properties in the `tiapp.xml` using the HTTP URL.
To enable SSL, use the HTTPS URL.
<property name="acs-base-url" type="string">http://api.cloud.appcelerator.com</property>
* @param {Boolean} useSecure
<p>New value for the property.</p>
*/
/**
* @method getSessionId
* <p>Gets the value of the {@link Modules.Cloud#property-sessionId} property.</p>
* @returns {String}
* @platform android 2.1.2
* @platform iphone 2.1.2
* @platform ipad 2.1.2
* @platform mobileweb 2.1.2
*/
/**
* @method setSessionId
* <p>Sets the value of the {@link Modules.Cloud#property-sessionId} property.</p>
* @param {String} sessionId
<p>New value for the property.</p>
* @platform android 2.1.2
* @platform iphone 2.1.2
* @platform ipad 2.1.2
* @platform mobileweb 2.1.2
*/
/**
* @method getAccessToken
* <p>Gets the value of the {@link Modules.Cloud#property-accessToken} property.</p>
* @returns {String}
* @platform android 2.1.2
* @platform iphone 2.1.2
* @platform ipad 2.1.2
* @platform mobileweb 2.1.2
*/
/**
* @method setAccessToken
* <p>Sets the value of the {@link Modules.Cloud#property-accessToken} property.</p>
* @param {String} accessToken
<p>New value for the property.</p>
* @platform android 2.1.2
* @platform iphone 2.1.2
* @platform ipad 2.1.2
* @platform mobileweb 2.1.2
*/
/**
* @method getExpiresIn
* <p>Gets the value of the {@link Modules.Cloud#property-expiresIn} property.</p>
* @returns {Number}
* @platform android 2.1.2
* @platform iphone 2.1.2
* @platform ipad 2.1.2
* @platform mobileweb 2.1.2
*/
/**
* @property [debug=false]
* @type Boolean
* <p>Indicates whether internal debug logging should be output to the console.</p>
*/
/**
* @property ondatastream
* @type Callback<CloudStreamProgress>
* <p>Function to be called at regular intervals as the request data is being received.</p>
* @description <p>Set this property before calling any ArrowDB method for which you want to track the transmission.</p>
<p>When you are done tracking the transmission, set this to null.</p>
*/
/**
* @property onsendstream
* @type Callback<CloudStreamProgress>
* <p>Function to be called at regular intervals as the request data is being transmitted.</p>
* @description <p>Set this property before calling any ArrowDB method for which you want to track the transmission.</p>
<p>When you are done tracking the transmission, set this to null.</p>
*/
/**
* @property [useSecure=true]
* @type Boolean
* <p>Indicates whether to use SSL when sending requests to ArrowDB.</p>
* @removed 3.1.1 To disable SSL, set the `acs-base-url` and `acs-authbase-url` properties in the `tiapp.xml` using the HTTP URL.
To enable SSL, use the HTTPS URL.
<property name="acs-base-url" type="string">http://api.cloud.appcelerator.com</property>
*/
/**
* @property sessionId
* @type String
* <p>Identifies the current session</p>
* @description <p>Contains the session identifier after successfully calling {@link Modules.Cloud.Users#method-create} or
{@link Modules.Cloud.Users#method-login}, and null after successfully calling {@link Modules.Cloud.Users#method-logout}.</p>
<p>All calls made using the Cloud module automatically use this value and, thus, it only needs
to be used when manually making calls to the ArrowDB servers using {@link Titanium.Network.HTTPClient}.</p>
<p>The session identifier is not persisted across application sessions by the module. An application
can persist the session identifier by saving the value in secure storage and restoring the value
of this property in the next application session.</p>
<p>The <code>sessionId</code> is not used with 3-legged OAuth authentication; use
{@link Modules.Cloud#property-accessToken accessToken} instead.</p>
* @platform android 2.1.2
* @platform iphone 2.1.2
* @platform ipad 2.1.2
* @platform mobileweb 2.1.2
*/
/**
* @property accessToken
* @type String
* <p>Identifies the current access token when using 3-Legged OAuth</p>
* @description <p>Contains the access token after successfully calling {@link Modules.Cloud.Users#method-secureCreate} or
{@link Modules.Cloud.Users#method-secureLogin}, and null after successfully calling {@link Modules.Cloud.Users#method-logout}.</p>
<p>All calls made using the Cloud module automatically use this value and, thus, it only needs
to be used when manually making calls to the ArrowDB servers using {@link Titanium.Network.HTTPClient}.</p>
<p>The <code>accessToken</code> is not persisted across application sessions by the module. An application
can persist the accessToken by saving the value in secure storage and restoring the value
of this property in the next application session.</p>
<p>The <code>accessToken</code> is not used with 2-legged OAuth or API key
authentication; use {@link Modules.Cloud#property-sessionId sessionId} instead.</p>
* @platform android 2.1.2
* @platform iphone 2.1.2
* @platform ipad 2.1.2
* @platform mobileweb 2.1.2
*/
/**
* @property expiresIn
* @type Number
* @readonly
* <p>Indicates the number of seconds before the access token expires</p>
* @description <p>Contains the number of seconds until the access token expires after successfully calling
{@link Modules.Cloud.Users#method-secureCreate} or {@link Modules.Cloud.Users#method-secureLogin}, and null after successfully
calling {@link Modules.Cloud.Users#method-logout}.</p>
* @platform android 2.1.2
* @platform iphone 2.1.2
* @platform ipad 2.1.2
* @platform mobileweb 2.1.2
*/
/**
* @class CloudStreamProgress
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Cloud.yml
* <p>Argument passed to the callback as a request is transmitted or received.</p>
*/
/**
* @property progress
* @type Number
* <p>A value from 0.0-1.0 with the progress of the exchange.</p>
*/
/**
* @property url
* @type String
* <p>The URL for the request, to help identify it.</p>
*/
/**
* @class CloudResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/CloudResponse.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates whether the request succeeded.</p>
* @description <p>Returns <code>true</code> if request succeeded.</p>
*/
/**
* @property error
* @type Boolean
* <p>Indicates whether the request failed.</p>
* @description <p>Returns <code>true</code> if request failed.</p>
*/
/**
* @property meta
* @type Dictionary
* <p>Meta data, if any returned.</p>
* @description <p>Only included if 'success' is 'true'.</p>
*/
/**
* @property code
* @type Number
* <p>Error code, if any returned.</p>
* @description <p>Only included if <code>error</code> is true.</p>
*/
/**
* @property message
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Only included if <code>error</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Emails
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Emails/Emails.yml
* <p>Provides methods for accessing ArrowDB Email service.</p>
* <h3>Examples</h3>
<h4>Send Email</h4>
<p>This example sends an Email and checks the response.</p>
<pre><code>Cloud.Emails.send({
template: 'welcome',
recipients: 'joe@company.com'
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method send
* <p>Send an email to a list of email adresses.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Emails-method-email_from_template">Emails: Send Emails</a>
for the request parameters supported by this method.</p>
<p>If you haven't configured your SMTP setting yet, go to your App Settings and configure and
test your SMTP setting. You also need to create at least one email template.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudEmailsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudEmailsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Emails/Emails.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @class Modules.Cloud.Events
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Events/Events.yml
* <p>Provides methods for accessing ArrowDB events.</p>
* <h3>Examples</h3>
<h4>Create Event</h4>
<p>This example creates a new event and checks the response.</p>
<pre><code>Cloud.Events.create({
name: 'Celebration',
start_time: starttime,
duration: 3600,
recurring: 'monthly',
recurring_count: 5
}, function (e) {
if (e.success) {
var event = e.events[0];
alert('Success:\n' +
'id: ' + event.id + '\n' +
'name: ' + event.name + '\n' +
'updated_at: ' + event.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show an Event</h4>
<p>This example retrieves information about a event and checks the response.</p>
<pre><code>Cloud.Events.show({
event_id: savedEventId
}, function (e) {
if (e.success) {
var event = e.events[0];
alert('Success:\n' +
'id: ' + event.id + '\n' +
'name: ' + event.name + '\n' +
'updated_at: ' + event.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show Occurrences for an Event</h4>
<p>This example retrieves information about an event's occurrences and checks the response.</p>
<pre><code>Cloud.Events.showOccurrences({
event_id: savedEventId
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.event_occurrences.length);
for (var i = 0; i < e.event_occurrences.length; i++) {
var event = e.event_occurrences[i].event;
alert('id: ' + event.id + '\n' +
'name: ' + event.name + '\n' +
'start time: ' + event.start_time + '\n' +
'updated_at: ' + place.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query Events</h4>
<p>This example requests a list of events and checks the response.</p>
<pre><code>Cloud.Events.query(function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.events.length);
for (var i = 0; i < e.events.length; i++) {
var event = e.events[i];
alert('id: ' + event.id + '\n' +
'name: ' + event.name + '\n' +
'start time: ' + event.start_time + '\n' +
'updated_at: ' + place.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query Event Occurrences</h4>
<p>This example retrieves a list of event occurrences and checks the response.</p>
<pre><code>Cloud.Events.queryOccurrences(function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.event_occurrences.length);
for (var i = 0; i < e.event_occurrences.length; i++) {
var event = e.event_occurrences[i].event;
alert('id: ' + event.id + '\n' +
'name: ' + event.name + '\n' +
'start time: ' + event.start_time + '\n' +
'updated_at: ' + place.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Search Events</h4>
<p>This example requests a list of events and checks the response.</p>
<pre><code>Cloud.Events.search({
place_id: savedPlaceId,
start_time: startTime,
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.events.length);
for (var i = 0; i < e.events.length; i++) {
var event = e.events[i];
alert('id: ' + event.id + '\n' +
'name: ' + event.name + '\n' +
'start time: ' + event.start_time + '\n' +
'updated_at: ' + place.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Search Event Occurrences</h4>
<p>This example retrieves a list of event occurrences and checks the response.</p>
<pre><code>Cloud.Events.searchOccurrences({
place_id: savedPlaceId,
start_time: startTime
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.event_occurrences.length);
for (var i = 0; i < e.event_occurrences.length; i++) {
var event = e.event_occurrences[i].event;
alert('id: ' + event.id + '\n' +
'name: ' + event.name + '\n' +
'start time: ' + event.start_time + '\n' +
'updated_at: ' + place.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Search for events</h4>
<p>This example searches for events and checks the response.</p>
<pre><code>Cloud.Events.search({
latitude: lat,
longitude: lon
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.events.length);
for (var i = 0; i < e.events.length; i++) {
var event = e.events[i];
alert('id: ' + event.id + '\n' +
'name: ' + event.name + '\n' +
'longitude: ' + event.longitude + '\n' +
'latitude: ' + event.latitude + '\n' +
'updated_at: ' + event.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Update an Event</h4>
<p>This example updates a event and checks the response.</p>
<pre><code>Cloud.Events.update({
event_id: savedEventId,
name: 'Annual Celebration',
start_time: starttime,
duration: 3600,
recurring: 'monthly',
recurring_count: 5
}, function (e) {
if (e.success) {
var event = e.events[0];
alert('Success:\n' +
'id: ' + event.id + '\n' +
'name: ' + event.name + '\n' +
'updated_at: ' + event.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove an Event</h4>
<p>This example deletes a event and checks the response.</p>
<pre><code>Cloud.Events.remove({
event_id: savedEventId
}, function (e) {
if (e.success) {
alert('Removed');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Create a new event.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Events-method-create">Events: Create Event</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>events</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudEventsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method show
* <p>Retrieve a list of events.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Events-method-show">Events: Show Event</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>events</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudEventsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method showOccurrences
* <p>Retrieve a list of event occurrences for a given event.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Events-method-show_occurrences">Events: Show Event Occurrences</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>event_occurrences</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudEventOccurrencesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method query
* <p>Retrieve a list of events with sorting and pagination.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Events-method-query">Events: Custom Query Events</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>events</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudEventsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method queryOccurrences
* <p>Retrieve a list of event occurrences with sorting and pagination.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Events-method-query_occurrences">Events: Custom Query Event Occurrences</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>event_occurrences</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudEventOccurrencesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method search
* <p>Retrieve a list of events with full text search.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Events-method-search">Events: Search for Events</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>events</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudEventsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method searchOccurrences
* <p>Retrieve a list of event occurrences with full text search.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Events-method-search_occurrences">Events: Search for Event Occurrences</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>event_occurrences</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudEventOccurrencesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Delete a event.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Events-method-delete">Events: Delete an Event</a>
for the request parameters supported by this method.</p>
<p>Only the user who created the event can delete it.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudEventsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method update
* <p>Update information about a event.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Events-method-update">Events: Update an Event</a>
for the request parameters supported by this method.</p>
<p>Only the user who created the place can update it.</p>
<p>Data is returned in the <code>events</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudEventsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudEventsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Events/Events.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property events
* @type Dictionary[]
* <p>Set of <code>event</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class CloudEventOccurrencesResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Events/Events.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property event_occurrences
* @type Dictionary[]
* <p>Set of <code>event</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Files
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Files/Files.yml
* <p>Provides methods for accessing ArrowDB files.</p>
* <h3>Examples</h3>
<h4>Create File</h4>
<p>This example creates a new file and checks the response.</p>
<pre><code>Cloud.Files.create({
name: 'test.dat',
file: Titanium.Filesystem.getFile('test.dat')
}, function (e) {
if (e.success) {
var file = e.files[0];
alert('Success:\n' +
'id: ' + file.id + '\n' +
'name: ' + file.name + '\n' +
'updated_at: ' + file.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show a File</h4>
<p>This example retrieves information about a file and checks the response.</p>
<pre><code>Cloud.Files.show({
file_id: savedFileId
}, function (e) {
if (e.success) {
var file = e.files[0];
alert('Success:\n' +
'id: ' + file.id + '\n' +
'name: ' + file.name + '\n' +
'updated_at: ' + file.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query for Files</h4>
<p>This example requests a list of files and checks the response.</p>
<pre><code>Cloud.Files.query({
page: 1,
per_page: 20
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.files.length);
for (var i = 0; i < e.files.length; i++) {
var file = e.files[i];
alert('id: ' + file.id + '\n' +
'name: ' + file.name + '\n' +
'updated_at: ' + file.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Update a File</h4>
<p>This example updates a file and checks the response.</p>
<pre><code>Cloud.Files.update({
file_id: savedFileId,
name: 'Notice'
}, function (e) {
if (e.success) {
var file = e.files[0];
alert('Success:\n' +
'id: ' + file.id + '\n' +
'name: ' + file.name + '\n' +
'updated_at: ' + file.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove a File</h4>
<p>This example deletes a file and checks the response.</p>
<pre><code>Cloud.Files.remove({
file_id: savedFileId
}, function (e) {
if (e.success) {
alert('Removed');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Create a file.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Files-method-create">Files: Create a File</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>files</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudFilesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method query
* <p>Retrieve a list of files with sorting and pagination.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Files-method-query">Files: Custom Query Files</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>files</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudFilesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Delete a file.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Files-method-delete">Files: Delete a File</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudFilesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method show
* <p>Retrieve information about a file.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Files-method-show">Files: Show File Info</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>files</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudFilesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method update
* <p>Update the information for a file.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Files-method-update">Files: Update a File</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>files</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudFilesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudFilesResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Files/Files.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property files
* @type Dictionary[]
* <p>Set of <code>file</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Friends
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Friends/Friends.yml
* <p>Provides methods for accessing ArrowDB friends.</p>
* <h3>Examples</h3>
<h4>Add a friend</h4>
<p>This example adds a friend and checks the response.</p>
<pre><code>Cloud.Friends.add({
user_ids: checked.join(",")
}, function (e) {
if (e.success) {
alert('Friend(s) added');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show friend requests</h4>
<p>This example shows pending friend requests and checks the response.</p>
<pre><code>Cloud.Friends.requests(function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.friend_requests.length);
for (var i = 0; i < e.friend_requests.length; i++) {
var user = e.friend_requests[i].user;
alert('id: ' + user.id + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Approve friend requests</h4>
<p>This example approves pending friend requests and checks the response.</p>
<pre><code>Cloud.Friends.approve({
user_ids: checked.join(",")
}, function (e) {
if (e.success) {
alert('Friend(s) approved');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove friends</h4>
<p>This example removes friends and checks the response.</p>
<pre><code>Cloud.Friends.remove({
user_ids: checked.join(",")
}, function (e) {
if (e.success) {
alert('Friend(s) removed');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Search for friends</h4>
<p>This example requests information about particular friends and checks the response.</p>
<pre><code>Cloud.Friends.search({
user_id: searchID
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.users.length);
for (var i = 0; i < e.users.length; i++) {
var user = e.users[i];
alert('id: ' + user.id + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method add
* <p>Add friends to the current user.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Friends-method-add">Friends: Add Friends</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudFriendsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method requests
* <p>View pending friend requests.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Friends-method-requests">Friends: Show Friend Requests</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>friend_requests</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudFriendRequestsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method approve
* <p>Approve existing friend requests.</p>
* @description <p>Requires user login.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Friends-method-approve">Friends: Approve Friend Requests</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudFriendsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Removes one or more friends from the current user.</p>
* @description <p>Requires user login.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Friends-method-remove">Friends: Remove Friends</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudFriendsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method search
* <p>Retrieve a list of friends.</p>
* @description <p>Requires user login.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Friends-method-search">Friends: Search Friends</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudFriendsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudFriendsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Friends/Friends.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property users
* @type Dictionary[]
* <p>Set of <code>user</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class CloudFriendRequestsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Friends/Friends.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property friend_requests
* @type Dictionary[]
* <p>Set of <code>user</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.GeoFences
* @platform android 3.2.1
* @platform iphone 3.2.1
* @platform ipad 3.2.1
* @platform mobileweb 3.2.1
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/GeoFences/GeoFences.yml
* <p>Provides methods for accessing ArrowDB geo-fence objects.</p>
* @description <p>This feature is only available for <strong>enterprise users</strong>, and the current user must be an <strong>application
admin</strong> to create, update or remove geo-fence objects.</p>
<p>The ArrowDB GeoFences API lets you manage geographic regions with an associated JSON data payload.
Use this API to have the device query the ArrowDB server to retrieve data based on a location.</p>
* <h3>Examples</h3>
<h4>Create a geo-fence object</h4>
<p>This example creates a new geo-fence object covering a 10 mile radius around San Francisco,
CA, USA, and checks the response.</p>
<pre><code> Cloud.GeoFences.create({
geo_fence: {
"loc":{"coordinates":[-122.4167,37.7833], "radius":"10/3959"},
"payload":{"alert":"24-hour sale at our SF flagship store on 12/26!"},
"start_time": "2014-12-25T00:00",
"end_time":"2014-12-26T19:00"
}
}, function (e) {
if (e.success) {
Ti.API.info(JSON.stringify(e.geo_fences));
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query for geo-fence objects</h4>
<p>This example searches for geo-fence objects within 2 km of Oakland, CA, USA, and checks the response.</p>
<pre><code> Cloud.GeoFences.query({
where:{
"loc": {
"$nearSphere" : {
"$geometry" : { "type" : "Point", "coordinates" : [-122.2708,37.8044] },
"$maxDistance" : 2000
}
}
}
}, function (e) {
if (e.success) {
Ti.API.info(JSON.stringify(e.geo_fences));
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Update a geo-fence object</h4>
<p>This example updates a geo-fence object and checks the response.</p>
<pre><code>Cloud.GeoFences.update({
id: geoFenceId,
geo_fence:{"loc":{"place_id":"531a1217447d300f05003b69","radius":"2/6371"}}
}, function (e) {
if (e.success) {
Ti.API.info(JSON.stringify(e.geo_fences));
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Delete a geo-fence object</h4>
<p>This example deletes a geo-fence object and checks the response.</p>
<pre><code>Cloud.GeoFences.remove({
id: geoFenceId
}, function (e) {
if (e.success) {
Ti.API.info(JSON.stringify(e));
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Create a new geofence object.</p>
* @description <p>You must be an <strong>enterprise application admin</strong> to use this API.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/GeoFences-method-create">geo_fences/create.json</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>geo_fences</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudGeoFenceResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method query
* <p>Retrieve a list of places with sorting and pagination.</p>
* @description <p>You must be an <strong>enterprise application user</strong> to use this API.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/GeoFences-method-query">geo_fences/query.json</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>geo_fences</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudGeoFenceResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Delete a place.</p>
* @description <p>You must be an <strong>enterprise application admin</strong> to use this API.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/GeoFences-method-delete">geo_fences/delete.json</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudGeoFenceResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method update
* <p>Update information about a place.</p>
* @description <p>You must be an <strong>enterprise application admin</strong> to use this API.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/GeoFences-method-update">geo_fences/update.json</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>geo_fences</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudGeoFenceResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudGeoFenceResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/GeoFences/GeoFences.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property geo_fences
* @type Dictionary[]
* <p>Set of geo-fence objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.KeyValues
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/KeyValues/KeyValues.yml
* <p>Provides methods for accessing ArrowDB Key-Values storage.</p>
* <h3>Examples</h3>
<h4>Set a Key-Value</h4>
<p>This example sets a key-value and checks the response.</p>
<pre><code>Cloud.KeyValues.set({
name: 'welcome_message',
value: 'Welcome to Appcelerator Cloud Services'
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Get a Key-Value</h4>
<p>This example gets a key-value and checks the response.</p>
<pre><code>Cloud.KeyValues.get({
name: 'welcome_message'
}, function (e) {
if (e.success) {
var keyvalue = e.keyvalues[0];
alert('Success:\n' +
'name: ' + keyvalue.name + '\n' +
'value: ' + keyvalue.value);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Append a Key-Value</h4>
<p>This example appends a value to a key-value and checks the response.</p>
<pre><code>Cloud.KeyValues.append({
name: 'welcome_message',
value: ', take a look around'
}, function (e) {
if (e.success) {
var keyvalue = e.keyvalues[0];
alert('Success:\n' +
'name: ' + keyvalue.name + '\n' +
'value: ' + keyvalue.value);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Increment a Key-Value</h4>
<p>This example increments a key-value and checks the response.</p>
<pre><code>Cloud.KeyValues.increment({
name: 'score',
value: 1
}, function (e) {
if (e.success) {
var keyvalue = e.keyvalues[0];
alert('Success:\n' +
'name: ' + keyvalue.name + '\n' +
'value: ' + keyvalue.value);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove a Key-Value</h4>
<p>This example deletes a key-value and checks the response.</p>
<pre><code>Cloud.KeyValues.remove({
name: 'welcome_message'
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method append
* <p>Add the given value to the end of an existing value.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/KeyValues-method-append">Key-Values: Append to a Key-Value</a>
for the request parameters supported by this method.</p>
<p>Not allowed on keyvalues with binary data.</p>
<p>Data is returned in the <code>keyvalues</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudKeyValuesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method get
* <p>Retrieve a string or binary value.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/KeyValues-method-get">Key-Value Store: Get a Value</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>keyvalues</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudKeyValuesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method increment
* <p>Increment the value by the given value.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/KeyValues-method-incrby">Key-Values: Increment a Key-Value</a>
for the request parameters supported by this method.</p>
<p>Not allowed on keyvalues with binary data.</p>
<p>Data is returned in the <code>keyvalues</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudKeyValuesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Delete a value.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/KeyValues-method-delete">Key-Values: Delete a Key-Value</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudKeyValuesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method set
* <p>Sets a string or binary value referenced by the key name.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/KeyValues-method-set">Key-Value Storage: Set a string or binary value</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudKeyValuesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudKeyValuesResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/KeyValues/KeyValues.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property keyvalues
* @type Dictionary[]
* <p>Set of <code>keyvalues</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Likes
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Likes/Likes.yml
* <p>Provides methods for accessing ArrowDB likes.</p>
* <h3>Examples</h3>
<h4>Create a Like</h4>
<p>This example creates a new like and checks the response.</p>
<pre><code>Cloud.Likes.create({
user_id: someUserId
}, function (e) {
if (e.success) {
alert('Created!');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove a Like</h4>
<p>This example deletes a like and checks the response.</p>
<pre><code>Cloud.Likes.remove({
user_id: someUserId
}, function (e) {
if (e.success) {
alert('Removed');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Create a like.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Likes-method-create">Likes: Create a Like</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>likes</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudLikesResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method remove
* <p>Delete a like.</p>
* @description <p>Requires user login.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Likes-method-delete">Likes: Delete a Like</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudLikesResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @class CloudLikesResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Likes/Likes.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property likes
* @type Dictionary[]
* <p>Set of <code>like</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Messages
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Messages/Messages.yml
* <p>Provides methods for accessing ArrowDB messages.</p>
* <h3>Examples</h3>
<h4>Create Message</h4>
<p>This example creates a new message and checks the response.</p>
<pre><code>Cloud.Messages.create({
to_ids: toSet.ids.join(','),
body: 'Hello World',
subject: 'Test Message'
}, function (e) {
if (e.success) {
var message = e.messages[0];
alert('Success:\n' +
'id: ' + message.id + '\n' +
'subject: ' + message.subject + '\n' +
'body: ' + message.body + '\n' +
'updated_at: ' + message.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Reply to a Message</h4>
<p>This example replies to a message and checks the response.</p>
<pre><code>Cloud.Messages.reply({
message_id: savedMessageId,
body: 'Welcome'
}, function (e) {
if (e.success) {
var message = e.messages[0];
alert('Success:\n' +
'id: ' + message.id + '\n' +
'subject: ' + message.subject + '\n' +
'body: ' + message.body + '\n' +
'updated_at: ' + message.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show a Message</h4>
<p>This example retrieves information about a message and checks the response.</p>
<pre><code>Cloud.Messages.show({
message_id: savedMessageId
}, function (e) {
if (e.success) {
var message = e.messages[0];
alert('Success:\n' +
'id: ' + message.id + '\n' +
'subject: ' + message.subject + '\n' +
'body: ' + message.body + '\n' +
'updated_at: ' + message.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show Inbox Messages</h4>
<p>This example requests a list of messages in the inbox and checks the response.</p>
<pre><code>Cloud.Messages.showInbox(function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.messages.length);
for (var i = 0; i < e.messages.length; i++) {
var message = e.messages[i];
alert('Success:\n' +
'id: ' + message.id + '\n' +
'subject: ' + message.subject + '\n' +
'body: ' + message.body + '\n' +
'updated_at: ' + message.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show Sent Messages</h4>
<p>This example requests a list of messages that have been sent and checks the response.</p>
<pre><code>Cloud.Messages.showSent(function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.messages.length);
for (var i = 0; i < e.messages.length; i++) {
var message = e.messages[i];
alert('Success:\n' +
'id: ' + message.id + '\n' +
'subject: ' + message.subject + '\n' +
'body: ' + message.body + '\n' +
'updated_at: ' + message.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show Message Threads</h4>
<p>This example requests a list of message threads and checks the response.</p>
<pre><code>Cloud.Messages.showThreads(function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.messages.length);
for (var i = 0; i < e.messages.length; i++) {
var message = e.messages[i];
alert('Success:\n' +
'id: ' + message.id + '\n' +
'thread id: ' + message.thread_id + '\n' +
'subject: ' + message.subject + '\n' +
'body: ' + message.body + '\n' +
'updated_at: ' + message.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show Thread Messages</h4>
<p>This example requests a list of messages in a thread and checks the response.</p>
<pre><code>Cloud.Messages.showThread({
thread_id: savedThreadId
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.messages.length);
for (var i = 0; i < e.messages.length; i++) {
var message = e.messages[i];
alert('Success:\n' +
'id: ' + message.id + '\n' +
'thread id: ' + message.thread_id + '\n' +
'subject: ' + message.subject + '\n' +
'body: ' + message.body + '\n' +
'updated_at: ' + message.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove a Message</h4>
<p>This example deletes a message and checks the response.</p>
<pre><code>Cloud.Messages.remove({
message_id: savedMessageId
}, function (e) {
if (e.success) {
alert('Removed');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove Thread Messages</h4>
<p>This example deletes all messages in a thread and checks the response.</p>
<pre><code>Cloud.Messages.removeThread({
thread_id: savedThreadId
}, function (e) {
if (e.success) {
alert('Removed');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Create a message.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Messages-method-create">Messages: Send a Message</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>messages</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudMessagesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method reply
* <p>Reply to all recipients of a message.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Messages-method-reply">Messages: Reply to a Message</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>messages</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudMessagesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method show
* <p>Retrieve information about a message.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Messages-method-show">Messages: Show a Message</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>messages</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudMessagesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method showInbox
* <p>Retrieve a list of messages in the current user's inbox.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Messages-method-show_inbox">Messages: Show User's Inbox Messages</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>messages</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudMessagesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method showSent
* <p>Retrieve a list of messages in the current user's inbox.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Messages-method-show_sent">Messages: Show User's Sent Messages</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>messages</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudMessagesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method showThreads
* <p>Retrieve a list of message threads in the current users' inbox.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Messages-method-show_threads">Messages: Show User's Message Threads</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>messages</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudMessagesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method showThread
* <p>Retrieve a list of messages in a thread from the current user's inbox.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Messages-method-show_thread">Messages: Show Messages in a Thread</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>messages</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudMessagesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Delete a message.</p>
* @description <p>Requires user login.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Messages-method-delete">Messages: Delete a Message</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudMessagesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method removeThread
* <p>Delete all messages in a thread.</p>
* @description <p>Requires user login.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Messages-method-delete_thread">Messages: Delete All Messages in a Thread</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudMessagesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudMessagesResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Messages/Messages.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property messages
* @type Dictionary[]
* <p>Set of <code>message</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Objects
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Objects/Objects.yml
* <p>Provides methods for accessing ArrowDB custom objects.</p>
* <h3>Examples</h3>
<h4>Create Custom Object</h4>
<p>This example creates a new custom object and checks the response.</p>
<pre><code>Cloud.Objects.create({
classname: 'cars',
fields: {
make: 'nissan',
color: 'blue',
year: 2005
}
}, function (e) {
if (e.success) {
var car = e.cars[0];
alert('Success:\n' +
'id: ' + car.id + '\n' +
'make: ' + car.make + '\n' +
'color: ' + car.color + '\n' +
'year: ' + car.year + '\n' +
'created_at: ' + car.created_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show Custom Objects</h4>
<p>This example requests information about custom objects and checks the response.</p>
<pre><code>Cloud.Objects.show({
classname: 'cars',
ids: [ savedCar1.id, savedCar2.id ]
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.cars.length);
for (var i = 0; i < e.cars.length; i++) {
var car = e.cars[i];
alert('id: ' + cars.id + '\n' +
'make: ' + car.make + '\n' +
'color: ' + car.color + '\n' +
'year: ' + car.year + '\n' +
'created_at: ' + car.created_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Update Custom Object</h4>
<p>This example updates a custom object and checks the response.</p>
<pre><code>Cloud.Objects.update({
classname: 'cars',
id: savedCar1.id,
fields: {
color: 'purple',
mileage: 10000
}
}, function (e) {
if (e.success) {
var car = e.cars[0];
alert('Success:\n' +
'id: ' + car.id + '\n' +
'make: ' + car.make + '\n' +
'color: ' + car.color + '\n' +
'year: ' + car.year + '\n' +
'mileage: ' + car.mileage + '\n' +
'updated_at: ' + car.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove Custom Object</h4>
<p>This example deletes a custom object and checks the response.</p>
<pre><code>Cloud.Objects.remove({
classname: 'cars',
id: savedCar1.id
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query for Custom Objects</h4>
<p>This example requests information about custom objects and checks the response.</p>
<pre><code>Cloud.Objects.query({
classname: 'cars',
page: 1,
per_page: 10,
where: {
color: 'blue'
}
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.cars.length);
for (var i = 0; i < e.cars.length; i++) {
var car = e.cars[i];
alert('id: ' + cars.id + '\n' +
'make: ' + car.make + '\n' +
'color: ' + car.color + '\n' +
'year: ' + car.year + '\n' +
'created_at: ' + car.created_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Create a custom object of type <code>classname</code>.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/CustomObjects-method-create">Custom Objects: Create Custom Objects</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>classname</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request. A <code>classname</code> property is required.</p>
* @param {Callback<CloudObjectsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method query
* <p>Retrieve a list of custom objects of type <code>classname</code>.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/CustomObjects-method-query">Custom Objects: Query Custom Objects</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>classname</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request. A <code>classname</code> property is required.</p>
* @param {Callback<CloudObjectsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Delete a custom object of type <code>classname</code>.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/CustomObjects-method-delete">Custom Objects: Delete Custom Objects</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request. A <code>classname</code> property is required.</p>
* @param {Callback<CloudObjectsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method show
* <p>Retrieve a list of custom objects of type <code>classname</code>.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/CustomObjects-method-show">Custom Objects: Show Custom Objects(s)</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>classname</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request. A <code>classname</code> property is required.</p>
* @param {Callback<CloudObjectsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method update
* <p>Update the fields of a custom object of type <code>classname</code>.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/CustomObjects-method-update">Custom Objects: Update Custom Objects</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>classname</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request. A <code>classname</code> property is required.</p>
* @param {Callback<CloudObjectsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudObjectsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Objects/Objects.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property classname
* @type Dictionary[]
* <p>Set of <code>classname</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.PhotoCollections
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/PhotoCollections/PhotoCollections.yml
* <p>Provides methods for ArrowDB photo collections.</p>
* <h3>Examples</h3>
<h4>Create Photo Collection</h4>
<p>This example creates a new photo collection and checks the response.</p>
<pre><code>Cloud.PhotoCollections.create({
name: 'Party Pictures'
}, function (e) {
if (e.success) {
var collection = e.collections[0];
alert('Success:\n' +
'id: ' + collection.id + '\n' +
'name: ' + collection.name + '\n' +
'count: ' + collection.counts.total_photos + '\n'
'updated_at: ' + collection.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show a Photo Collection</h4>
<p>This example retrieves information about a photo collection and checks the response.</p>
<pre><code>Cloud.PhotoCollections.show({
collection_id: savedPhotoCollectionId
}, function (e) {
if (e.success) {
var collection = e.collections[0];
alert('Success:\n' +
'id: ' + collection.id + '\n' +
'name: ' + collection.name + '\n' +
'count: ' + collection.counts.total_photos + '\n'
'updated_at: ' + collection.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Search for Photo Collections</h4>
<p>This example searches for collections and checks the response.</p>
<pre><code>Cloud.PhotoCollections.search({
user_id: savedUserId
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.collections.length);
for (var i = 0; i < e.collections.length; i++) {
var collection = e.collections[i];
alert('Success:\n' +
'id: ' + collection.id + '\n' +
'name: ' + collection.name + '\n' +
'count: ' + collection.counts.total_photos + '\n'
'updated_at: ' + collection.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show Photo Subcollections</h4>
<p>This example requests a list of photo subcollections and checks the response.</p>
<pre><code>Cloud.PhotoCollections.showSubcollections({
page: 1,
per_page: 20,
collection_id: savedCollectionId
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.collections.length);
for (var i = 0; i < e.collections.length; i++) {
var collection = e.collections[i];
alert('Success:\n' +
'id: ' + collection.id + '\n' +
'name: ' + collection.name + '\n' +
'count: ' + collection.counts.total_photos + '\n'
'updated_at: ' + collection.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show Photo Collection Photos</h4>
<p>This example requests a list of photos in a photo collections and checks the response.</p>
<pre><code>Cloud.PhotoCollections.showPhotos({
page: 1,
per_page: 20,
collection_id: savedCollectionId
}, function (e) {
if (e.success) {
if (!e.photos) {
alert('Success: No photos');
} else {
alert('Success:\n' +
'Count: ' + e.collections.length);
for (var i = 0; i < e.collections.length; i++) {
var collection = e.collections[i];
alert('Success:\n' +
'id: ' + collection.id + '\n' +
'name: ' + collection.name + '\n' +
'count: ' + collection.counts.total_photos + '\n'
'updated_at: ' + collection.updated_at);
}
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Update a Photo Collection</h4>
<p>This example updates a photo collection and checks the response.</p>
<pre><code>Cloud.PhotoCollections.update({
collection_id: savedPhotoCollectionId,
cover_photo_id: savedPhotoId
}, function (e) {
if (e.success) {
var collection = e.collections[0];
alert('Success:\n' +
'id: ' + collection.id + '\n' +
'name: ' + collection.name + '\n' +
'count: ' + collection.counts.total_photos + '\n'
'updated_at: ' + collection.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove a Photo Collection</h4>
<p>This example deletes a photo collection and checks the response.</p>
<pre><code>Cloud.PhotoCollections.remove({
collection_id: savedPhotoCollectionId
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Creates a photo collection.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PhotoCollections-method-create">Photo Collections: Create a Photo Collection</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>collections</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotoCollectionsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Deletes an empty collection.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PhotoCollections-method-delete">Photo Collections: Delete a Photo Collection</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotoCollectionsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method search
* <p>Retrieves a list of top-level collections owned by a user.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PhotoCollections-method-search">Photo Collections: Search Photo Collections</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>collections</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotoCollectionsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method show
* <p>Retrieves details about a photo collection.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PhotoCollections-method-show">Photo Collections: Show a Photo Collection</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>collections</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotoCollectionsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method showPhotos
* <p>Retrieves photos in a collection.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PhotoCollections-method-show_photos">PhotoCollections: Show Photos</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>photos</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotoCollectionsPhotosResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method showSubCollections
* <p>Retrieves a list of subcollections of a collection.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PhotoCollections-method-show_subcollections">Collections: Show Subcollections</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>collections</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotoCollectionsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method update
* <p>Updates a photo collection.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PhotoCollections-method-update">Photo Collections: Update a Photo Collection</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>collections</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotoCollectionsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudPhotoCollectionsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/PhotoCollections/PhotoCollections.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property collections
* @type Dictionary[]
* <p>Set of <code>collections</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class CloudPhotoCollectionsPhotosResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/PhotoCollections/PhotoCollections.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property photos
* @type Dictionary[]
* <p>Set of <code>photos</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Photos
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Photos/Photos.yml
* <p>Provides methods for accessing ArrowDB photos.</p>
* <h3>Examples</h3>
<h4>Create Photo</h4>
<p>This example creates a new photo and checks the response.</p>
<pre><code>Cloud.Photos.create({
photo: Titanium.Filesystem.getFile('photo.jpg')
}, function (e) {
if (e.success) {
var photo = e.photos[0];
alert('Success:\n' +
'id: ' + photo.id + '\n' +
'filename: ' + photo.filename + '\n' +
'size: ' + photo.size,
'updated_at: ' + photo.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show a Photo</h4>
<p>This example retrieves information about a photo and checks the response.</p>
<pre><code>Cloud.Photos.show({
photo_id: savedPhotoId
}, function (e) {
if (e.success) {
var photo = e.photos[0];
alert('Success:\n' +
'id: ' + photo.id + '\n' +
'filename: ' + photo.filename + '\n' +
'updated_at: ' + photo.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Search for Photos</h4>
<p>This example searches for photos and checks the response.</p>
<pre><code>Cloud.Photos.search({
user_id: savedUserId
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.photos.length);
for (var i = 0; i < e.photos.length; i++) {
var photo = e.photos[i];
alert('id: ' + photo.id + '\n' +
'name: ' + photo.name + '\n' +
'filename: ' + photo.filename + '\n' +
'updated_at: ' + photo.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query for Photos</h4>
<p>This example requests a list of photos and checks the response.</p>
<pre><code>Cloud.Photos.query({
page: 1,
per_page: 20,
where: {
coordinates: {
'$nearSphere': [-122.23,37.12],
'$maxDistance': 0.00126
}
}
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.photos.length);
for (var i = 0; i < e.photos.length; i++) {
var photo = e.photos[i];
alert('id: ' + photo.id + '\n' +
'name: ' + photo.name + '\n' +
'filename: ' + photo.filename + '\n' +
'updated_at: ' + photo.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Update a Photo</h4>
<p>This example updates a photo and checks the response.</p>
<pre><code>Cloud.Photos.update({
photo_id: savedPhotoId,
photo: Titanium.Filesystem.getFile('newphoto.jpg'),
tags: 'mountains'
}, function (e) {
if (e.success) {
var photo = e.photos[0];
alert('Success:\n' +
'id: ' + photo.id + '\n' +
'filename: ' + photo.filename + '\n' +
'updated_at: ' + photo.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove a Photo</h4>
<p>This example deletes a photo and checks the response.</p>
<pre><code>Cloud.Photos.remove({
photo_id: savedPhotoId
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Create or upload a new photo.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Photos-method-create">Photos: Create (Upload) a Photo</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>photos</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotosResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method query
* <p>Retrieve a list of photos with sorting and pagination.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Photos-method-query">Photos: Custom Query Photos</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>photos</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotosResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Delete a photo.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Photos-method-delete">Photos: Delete a Photo</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotosResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method search
* <p>Retrieve a list of photos.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Photos-method-search">Photos: Search for Photos</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>photos</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotosResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method show
* <p>Retrieve information about a photo.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Photos-method-show">Photos: Show Photo Info</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>photos</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotosResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method update
* <p>Update a photo.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Photos-method-update">Photos: Update a Photo</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>photos</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPhotosResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudPhotosResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Photos/Photos.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property photos
* @type Dictionary[]
* <p>Set of <code>photos</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Places
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Places/Places.yml
* <p>Provides methods for accessing ArrowDB places.</p>
* <h3>Examples</h3>
<h4>Create Place</h4>
<p>This example creates a new place and checks the response.</p>
<pre><code>Cloud.Places.create({
name: 'Appcelerator HQ',
state: 'California',
website: 'http://www.appcelerator.com'
}, function (e) {
if (e.success) {
var place = e.places[0];
alert('Success:\n' +
'id: ' + place.id + '\n' +
'name: ' + place.name + '\n' +
'updated_at: ' + place.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show a Place</h4>
<p>This example retrieves information about a place and checks the response.</p>
<pre><code>Cloud.Places.show({
place_id: savedPlaceId
}, function (e) {
if (e.success) {
var place = e.places[0];
alert('Success:\n' +
'id: ' + place.id + '\n' +
'name: ' + place.name + '\n' +
'updated_at: ' + place.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Search for Places</h4>
<p>This example searches for places and checks the response.</p>
<pre><code>Cloud.Places.search({
latitude: lat,
longitude: lon
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.places.length);
for (var i = 0; i < e.places.length; i++) {
var place = e.places[i];
alert('id: ' + place.id + '\n' +
'name: ' + place.name + '\n' +
'longitude: ' + place.longitude + '\n' +
'latitude: ' + place.latitude + '\n' +
'updated_at: ' + place.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query for Places</h4>
<p>This example requests a list of places and checks the response.</p>
<pre><code>Cloud.Places.query({
page: 1,
per_page: 20,
where: {
lnglat: {
'$nearSphere': [-122.23,37.12],
'$maxDistance': 0.00126
}
}
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.places.length);
for (var i = 0; i < e.places.length; i++) {
var place = e.places[i];
alert('id: ' + place.id + '\n' +
'name: ' + place.name + '\n' +
'longitude: ' + place.longitude + '\n' +
'latitude: ' + place.latitude + '\n' +
'updated_at: ' + place.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Update a Place</h4>
<p>This example updates a place and checks the response.</p>
<pre><code>Cloud.Places.update({
place_id: savedPlaceId,
city: 'Mountain View'
}, function (e) {
if (e.success) {
var place = e.places[0];
alert('Success:\n' +
'id: ' + place.id + '\n' +
'name: ' + place.name + '\n' +
'updated_at: ' + place.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove a Place</h4>
<p>This example deletes a place and checks the response.</p>
<pre><code>Cloud.Places.remove({
place_id: savedPlaceId
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Create a new place.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Places-method-create">Places: Create a Place</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>places</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPlacesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method query
* <p>Retrieve a list of places with sorting and pagination.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Places-method-query">Places: Custom Query Places</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>places</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPlacesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Delete a place.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Places-method-delete">Places: Delete a Place</a>
for the request parameters supported by this method.</p>
<p>Only the user who created the place can delete it.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPlacesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method search
* <p>Retrieve a list of places.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Places-method-search">Places: Search Places</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>places</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPlacesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method show
* <p>Retrieve information about a place.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Places-method-show">Places: Show a Place</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>places</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPlacesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method update
* <p>Update information about a place.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Places-method-update">Places: Update a Place</a>
for the request parameters supported by this method.</p>
<p>Only the user who created the place can update it.</p>
<p>Data is returned in the <code>places</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPlacesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudPlacesResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Places/Places.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property places
* @type Dictionary[]
* <p>Set of <code>places</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Posts
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Posts/Posts.yml
* <p>Provides methods for accessing ArrowDB posts.</p>
* <h3>Examples</h3>
<h4>Create Post</h4>
<p>This example creates a new post and checks the response.</p>
<pre><code>Cloud.Posts.create({
content: 'Man Walks On Moon',
title: 'News of the day',
photo: Titanium.Filesystem.getFile('photo.jpg')
}, function (e) {
if (e.success) {
var post = e.posts[0];
alert('Success:\n' +
'id: ' + post.id + '\n' +
'title: ' + post.title + '\n' +
'content: ' + post.content + '\n' +
'updated_at: ' + post.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show a Post</h4>
<p>This example retrieves information about a post and checks the response.</p>
<pre><code>Cloud.Posts.show({
post_id: savedPostId
}, function (e) {
if (e.success) {
var post = e.posts[0];
alert('Success:\n' +
'id: ' + post.id + '\n' +
'title: ' + post.title + '\n' +
'content: ' + post.content + '\n' +
'updated_at: ' + post.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query for Posts</h4>
<p>This example requests a list of posts and checks the response.</p>
<pre><code>Cloud.Posts.query({
page: 1,
per_page: 20,
where: {
reviews_count: { '$gt': 1.0 }
}
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.posts.length);
for (var i = 0; i < e.posts.length; i++) {
var post = e.posts[i];
alert('id: ' + post.id + '\n' +
'id: ' + post.id + '\n' +
'title: ' + post.title + '\n' +
'content: ' + post.content + '\n' +
'updated_at: ' + post.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Update a Post</h4>
<p>This example updates a post and checks the response.</p>
<pre><code>Cloud.Posts.update({
post_id: savedPostId,
title: 'Lunar Eclipse'
}, function (e) {
if (e.success) {
var post = e.posts[0];
alert('Success:\n' +
'id: ' + post.id + '\n' +
'title: ' + post.title + '\n' +
'content: ' + post.content + '\n' +
'updated_at: ' + post.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove a Post</h4>
<p>This example deletes a post and checks the response.</p>
<pre><code>Cloud.Posts.remove({
post_id: savedPostId
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Create a post.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Posts-method-create">Posts: Create Post</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>posts</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPostsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method query
* <p>Retrieve a list of posts with sorting and pagination.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Posts-method-query">Posts: Custom Query Posts</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>posts</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPostsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Delete a post.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Posts-method-delete">Posts: Delete a Post</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPostsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method show
* <p>Retrieve information about a post.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Posts-method-show">Posts: Show a Post</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>posts</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPostsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method update
* <p>Update the information for a post.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Posts-method-update">Posts: Update a Post</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>posts</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPostsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudPostsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Posts/Posts.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property posts
* @type Dictionary[]
* <p>Set of <code>posts</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.PushNotifications
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/PushNotifications/PushNotifications.yml
* <p>Provides methods for accessing Arrow push notification channels.</p>
* @description <p>For information on configuring and setting up push notifications,
see the <a href="http://docs.appcelerator.com/platform/latest/#!/guide/Push_Notifications">Push Notifications guide</a>.</p>
<p>The methods in this module are used to subscribe and unsubscribe from Arrow push notification
channels, and to generate Arrow push notifications. Push notifications are received using
platform-specific mechanisms:</p>
<ul>
<li>On iOS, push notifications are received through the standard iOS push notification
mechanism. When you register for push notifications, incoming push notifications
are passed to the <code>callback</code> callback. See
{@link Titanium.Network#method-registerForPushNotifications Network.registerForPushNotifications}
for details.</li>
<li>On Android, push notifications are received through the {@link Modules.CloudPush} module.
Add a listener for the {@link Modules.CloudPush#event-callback callback} event to receive push notifications.</li>
</ul>
<p>To register for push notifications, you need to obtain an application-specific <em>device
token</em>. To obtain a device token:</p>
<ul>
<li>On iOS, when you successfully register for push notifications, the device token is
passed to the <code>success</code> callback.</li>
<li>On Android, use
{@link Modules.CloudPush#method-retrieveDeviceToken CloudPush.retrieveDeviceToken} to request
a device token. The device token is passed to the <code>success</code> callback.</li>
</ul>
* <h3>Examples</h3>
<h4>Subscribe to Channel</h4>
<p>This example subscribes to a push notification channel and checks the response.</p>
<pre><code>Cloud.PushNotifications.subscribe({
channel: 'friend_request',
device_token: myPushDeviceToken
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Unsubscribe to Channel</h4>
<p>This example unsubscribes from a push notification channel and checks the response.</p>
<pre><code>Cloud.PushNotifications.unsubscribe({
channel: 'friend_request',
device_token: myPushDeviceToken
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Notify Channel</h4>
<p>This example sends a push notification to a channel and checks the response.</p>
<pre><code>Cloud.PushNotifications.notify({
channel: 'friend_request',
payload: 'Welcome to push notifications'
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Update Subscription</h4>
<p>This example updates the user's notification subscription with the device's current
location, upon successfully obtaining the device's current position.</p>
<pre><code>var latitude, longitude,
var pushDeviceToken; // Device token obtained earlier...
Titanium.Geolocation.getCurrentPosition(function(e) {
if (e.error) {
Ti.API.error('Error: ' + e.error);
} else {
latitude = e.coords.latitude;
longitude = e.coords.longitude;
Cloud.PushNotifications.updateSubscription({
device_token: pushDeviceToken,
loc: [longitude, latitude]
}, function (e) {
if (e.success) {
alert('Subscription Updated.');
}
else {
alert(e);
}
});
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method notify
* <p>Send a push notification to a channel.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-notify">push_notifications/notify.json</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushNotificationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method notifyTokens
* <p>Send a push notification to a channel to the specified devices.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-notify_tokens">push_notifications/notify_tokens.json</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushNotificationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.1.2
* @platform iphone 3.1.2
* @platform ipad 3.1.2
*/
/**
* @method resetBadge
* <p>Resets the badge value to zero but does not update it on the device.</p>
* @description <p>To update the badge in the device's UI, send a push notification to the device with the
<code>badge</code> field defined.</p>
<p>The REST API call supports calling this method as either a PUT request or a GET request.
This method only supports the PUT request, which means a device token must be passed to this
method.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-reset_badge_put">push_notifications/reset_badge.json</a>
for the request parameter supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushNotificationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.2.1
* @platform iphone 3.2.1
* @platform ipad 3.2.1
*/
/**
* @method setBadge
* <p>Sets the badge value but does not update it on the device.</p>
* @description <p>To update the badge in the device's UI, send a push notification to the device with the
<code>badge</code> field defined.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-set_badge">push_notifications/set_badge.json</a>
for the request parameter supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushNotificationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.2.1
* @platform iphone 3.2.1
* @platform ipad 3.2.1
*/
/**
* @method subscribe
* <p>Subscribe a mobile device to a push notification channel.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-subscribe">push_notifications/subscribe.json</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushNotificationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method subscribeToken
* <p>Subscribe a mobile device to a push notification channel using a device token.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-subscribe_token">push_notifications/subsribe_tokens.json</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushNotificationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.1.2
* @platform iphone 3.1.2
* @platform ipad 3.1.2
*/
/**
* @method unsubscribe
* <p>Unsubscribe a mobile device from a push notification channel.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-unsubscribe">push_notifications/unsubscribe.json</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushNotificationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method unsubscribeToken
* <p>Unsubscribe a mobile device from a push notification channel using a device token.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-unsubscribe_token">push_notifications/unsubscribe_tokens.json</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushNotificationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.1.2
* @platform iphone 3.1.2
* @platform ipad 3.1.2
*/
/**
* @method updateSubscription
* <p>Updates a user's notification subscription with the device's location.</p>
* @description <p>This allows an Appcelerator Dashboard administrator
to send push notifications to devices located within a specified geographic region. For details, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Sending_and_scheduling_push_notifications">Sending and scheduling push notifications</a>. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-subscription_update">push_notifications/unsubscribe.json</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushNotificationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method queryChannels
* <p>Returns a list of push notification channels the user is subscribed to.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-channels_query">push_notifications/channels/query.json</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushNotificationsQueryChannelResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method showChannels
* <p>Returns the number of devices subscribed to the specified channel.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-channels_show">push_notifications/channels/show.json</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushNotificationsShowChannelResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method query
* <p>Custom query of push notification subscriptions with paginating.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-query">push_notifications/query.json</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>subscriptions</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushNotificationsQueryResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @class CloudPushNotificationsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/PushNotifications/PushNotifications.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @class CloudPushNotificationsQueryChannelResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/PushNotifications/PushNotifications.yml
* <p>Argument passed to the callback when a request finishes successfully.</p>
*/
/**
* @property push_channels
* @type String[]
* <p>Array of <code>push_channel</code> names, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class CloudPushNotificationsShowChannelResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/PushNotifications/PushNotifications.yml
* <p>Argument passed to the callback when a request finishes successfully.</p>
*/
/**
* @property devices
* @type Dictionary
* <p>Dictionary containing counts of devices subscribed to a push channel, grouped by platform.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class CloudPushNotificationsQueryResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/PushNotifications/PushNotifications.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property subscriptions
* @type Dictionary[]
* <p>Set of <code>subscription</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.PushSchedules
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/PushSchedules/PushSchedules.yml
* <p>Provides methods for scheduling Arrow push notifications</p>
* @description <p>The following APIs are only available for Appcelerator Platform customers. You must be an
application admin to use these APIs.</p>
<p>The PushSchedules API lets you schedule push notifications to be delivered to your application users
on a recurring or one-time basis.</p>
<p>You may create up to 100 scheduled push notifications for your application.
Datetime fields use the ISO 8601 format, for example, <code>YYYY-MM-DDTHH:mm:ss+ZZZZ</code>.</p>
<p>For information on configuring and setting up push notifications,
see the <a href="http://docs.appcelerator.com/platform/latest/#!/guide/Push_Notifications">Push Notifications guide</a>.</p>
* <h3>Examples</h3>
<h4>Create a scheduled push notification</h4>
<p>This example schedules a push notification to be sent only once within the five-day perid.</p>
<pre><code>Cloud.PushSchedules.create({
schedule: {
name: 'push schedule',
start_time: '2015-09-05T10:11',
recurrence: {
interval: 'weekly',
end_time: '2015-09-10T10:11'
},
push_notification: {
payload: 'hello world',
channel: 'channelOne'
}
}
}, function(e) {
if (e.success) {
Ti.API.info('Success! \n id: ' + e.push_schedules[0].id);
} else {
Ti.API.error('Error: ' + ((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove a scheduled push notification</h4>
<p>This example deletes the specified scheduled push notification.</p>
<pre><code>Cloud.PushSchedules.remove({
ids: savedPushId
}, function(e){
if (e.success) {
Ti.API.info("Success!");
} else {
Ti.API.error('Error: ' + ((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query scheduled push notifications</h4>
<p>This example retrieves all scheduled push notifications.</p>
<pre><code>Cloud.PushSchedules.query({}, function(e) {
if (e.success) {
Ti.API.info("List of scheduled push notifications:");
e.push_schedules.forEach(function(push){
Ti.API.info("\t" + push.name);
});
} else {
Ti.API.error('Error: ' + ((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Schedules a push notification.</p>
* @description <p>Requires user login and the current user must be an application admin. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushSchedules-method-create">push_schedules/create.json</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushSchedulesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Deletes a scheduled push notification.</p>
* @description <p>Requires user login and the current user must be an application admin. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushSchedules-method-delete">push_schedules/delete.json</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushSchedulesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method query
* <p>Queries the list of scheduled push notifications.</p>
* @description <p>Requires user login and the current user must be an application admin. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushSchedules-method-query">push_schedules/qyery.json</a>
for the request parameter supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudPushSchedulesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudPushSchedulesResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/PushSchedules/PushSchedules.yml
* <p>Argument passed to the callback when a request finishes successfully.</p>
*/
/**
* @property push_schedules
* @type Object[]
* <p>Array of <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/PushSchedules">schedules push notifications</a>, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Reviews
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Reviews/Reviews.yml
* <p>Provides methods for accessing ArrowDB reviews.</p>
* <h3>Examples</h3>
<h4>Create Review</h4>
<p>This example creates a new review and checks the response.</p>
<pre><code>Cloud.Reviews.create({
post_id: savedPostId,
rating: 1,
content: 'Good'
}, function (e) {
if (e.success) {
var review = e.reviews[0];
alert('Success:\n' +
'id: ' + review.id + '\n' +
'rating: ' + review.rating + '\n' +
'content: ' + review.content + '\n' +
'updated_at: ' + review.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show a Review</h4>
<p>This example retrieves information about a review and checks the response.</p>
<pre><code>Cloud.Reviews.show({
post_id: savedPostId,
review_id: savedReviewId
}, function (e) {
if (e.success) {
var review = e.reviews[0];
alert('Success:\n' +
'id: ' + review.id + '\n' +
'rating: ' + review.rating + '\n' +
'content: ' + review.content + '\n' +
'updated_at: ' + review.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query for Reviews</h4>
<p>This example requests a list of reviews and checks the response.</p>
<pre><code>Cloud.Reviews.query({
page: 1,
per_page: 20,
where: {
rating: { '$gt': 5.0 }
}
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.reviews.length);
for (var i = 0; i < e.reviews.length; i++) {
var review = e.reviews[i];
alert('id: ' + review.id + '\n' +
'id: ' + review.id + '\n' +
'rating: ' + review.rating + '\n' +
'content: ' + review.content + '\n' +
'updated_at: ' + review.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Update a Review</h4>
<p>This example updates a review and checks the response.</p>
<pre><code>Cloud.Reviews.update({
post_id: savedPostId,
review_id: savedReviewId,
rating: 100,
content: 'Very good!'
}, function (e) {
if (e.success) {
var review = e.reviews[0];
alert('Success:\n' +
'id: ' + review.id + '\n' +
'rating: ' + review.rating + '\n' +
'content: ' + review.content + '\n' +
'updated_at: ' + review.updated_at);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove a Review</h4>
<p>This example deletes a review and checks the response.</p>
<pre><code>Cloud.Reviews.remove({
post_id: savedPostId,
review_id: savedReviewId
}, function (e) {
if (e.success) {
alert('Success');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Add a review, comment, rating, or like.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Reviews-method-create">Reviews: Create Review/Comment/Rating/Like</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>reviews</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudReviewsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method query
* <p>Retrieve a list of reviews with sorting and pagination.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Reviews-method-query">Reviews: Custom Query Reviews/Comments/Ratings/Likes</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>reviews</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudReviewsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Delete a review.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Reviews-method-delete">Reviews: Delete a Review/Comment/Rating/Like</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudReviewsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method show
* <p>Retrieve details of a review.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Reviews-method-show">Reviews: Show a review</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>reviews</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudReviewsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method update
* <p>Update a review.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Reviews-method-update">Reviews: Update a Review/Comment/Rating/Like</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>reviews</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudReviewsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudReviewsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Reviews/Reviews.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property reviews
* @type Dictionary[]
* <p>Set of <code>reviews</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.SocialIntegrations
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/SocialIntegrations/SocialIntegrations.yml
* <p>Provides methods for access ArrowDB social integrations.</p>
* <h3>Examples</h3>
<h4>Log in External Account</h4>
<p>This example logs a user in using an external account and checks the response</p>
<pre><code>Cloud.SocialIntegrations.externalAccountLogin({
type: 'facebook',
token: Ti.Facebook.accessToken
}, function (e) {
if (e.success) {
var user = e.users[0];
alert('Success:\n' +
'id: ' + user.id + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Link in External Account</h4>
<p>This example links an external account and checks the response</p>
<pre><code>Cloud.SocialIntegrations.externalAccountLink({
type: 'facebook',
token: Ti.Facebook.accessToken
}, function (e) {
if (e.success) {
var user = e.users[0];
alert('Success:\n' +
'id: ' + user.id + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Search for Facebook Friends</h4>
<p>This example retrieves a list of Facebook Friends and checks the response</p>
<pre><code>Cloud.SocialIntegrations.searchFacebookFriends(function (e){
if (e.success) {
alert('Success:\n' +
'Count: ' + e.users.length);
for (var i = 0; i < e.users.length; i++) {
var user = e.users[i];
alert('id: ' + user.id + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method externalAccountLink
* <p>Associate an external account with an existing ArrowDB user account.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/SocialIntegrations-method-external_account_link">Social Integration: Link an external account</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudSocialIntegrationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method externalAccountLogin
* <p>Login to ArrowDB using an external account such as Facebook, Twitter, LinkedIn, etc.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/SocialIntegrations-method-external_account_link">Social Integration: Login with external account</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudSocialIntegrationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method externalAccountUnlink
* <p>Disassociate an external account from a ArrowDB user account.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/SocialIntegrations-method-external_account_unlink">Social Integration: Unlink an external account</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudSocialIntegrationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method searchFacebookFriends
* <p>Returns a list of the current user's Facebook friends who are also using this application.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/SocialIntegrations-method-facebook_search_friends">Social Integration: Find Facebook Friends</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Callback<CloudSocialIntegrationsResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudSocialIntegrationsResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/SocialIntegrations/SocialIntegrations.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property users
* @type Dictionary[]
* <p>Set of <code>users</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Statuses
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Statuses/Statuses.yml
* <p>Provides methods for accessing ArrowDB Statuses.</p>
* <h3>Examples</h3>
<h4>Create a Status</h4>
<p>This example creates a status and checks the response.</p>
<pre><code>Cloud.Statuses.create({
place_id: myPlaceId,
message: 'What a great view!',
photo: Titanium.Filesystem.getFile('photo.jpg')
}, function (e) {
if (e.success) {
var status = e.statuses[0];
alert('Success:\n' +
'id: ' + status.id + '\n' +
'place: ' + status.place.name);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Search Status</h4>
<p>This example requests information about a user's status and checks the response.</p>
<pre><code>Cloud.Statuses.search({
user_id: someUserId
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.statuses.length);
for (var i = 0; i < e.statuses.length; i++) {
var status = e.statuses[i];
alert('id: ' + status.id + '\n' +
'message: ' + status.message + '\n' +
'updated_at: ' + status.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query Status</h4>
<p>This example requests information about statuses and checks the response.</p>
<pre><code>Cloud.Statuses.query({
page: 1,
per_page: 20,
order: '-updated_at'
}, function (e) {
if (e.success) {
for (var i = 0; i < e.statuses.length; i++) {
var status = e.statuses[i];
alert('Success:\n' +
'id: ' + status.id + '\n' +
'message: ' + status.message + '\n' +
'updated_at: ' + status.updated_at);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Creates a status for the currently logged in user.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Statuses-method-create">Users: Create a Status</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>statuses</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudStatusesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method update
* <p>Updates a status.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Statuses-method-update">Users: Update a Status</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudStatusesResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method show
* <p>Shows a status.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Statuses-method-show">Users: Show a Status</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudStatusesResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method delete
* <p>Deletes a status.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Statuses-method-delete">Users: Delete a Status</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method query
* <p>Retrieve a list of statuses with sorting and pagination.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Statuses-method-query">Statuses: Custom Query Status</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>statuses</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudStatusesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method search
* <p>Retrieve the statuses for a user.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Statuses-method-show">Users: Show Statuses for a User</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>statuses</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudStatusesResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @class CloudStatusesResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Statuses/Statuses.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property statuses
* @type Dictionary[]
* <p>Set of <code>statuses</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.Cloud.Users
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Users/Users.yml
* <p>Provides methods for accessing ArrowDB user objects.</p>
* <h3>Examples</h3>
<h4>Create User</h4>
<p>This example creates a new user and checks the response.</p>
<pre><code>Cloud.Users.create({
email: 'test@mycompany.com',
first_name: 'test_firstname',
last_name: 'test_lastname',
password: 'test_password',
password_confirmation: 'test_password'
}, function (e) {
if (e.success) {
var user = e.users[0];
alert('Success:\n' +
'id: ' + user.id + '\n' +
'sessionId: ' + Cloud.sessionId + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Log in User</h4>
<p>This example logs a user in and checks the response.</p>
<pre><code>Cloud.Users.login({
login: 'test@mycompany.com',
password: 'test_password'
}, function (e) {
if (e.success) {
var user = e.users[0];
alert('Success:\n' +
'id: ' + user.id + '\n' +
'sessionId: ' + Cloud.sessionId + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show User</h4>
<p>This example requests information about a user and checks the response.</p>
<pre><code>Cloud.Users.show({
user_id: savedUserInfo.id
}, function (e) {
if (e.success) {
var user = e.users[0];
alert('Success:\n' +
'id: ' + user.id + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Show Current User</h4>
<p>This example requests information about the currently logged in user and checks the response.</p>
<pre><code>Cloud.Users.showMe(function (e) {
if (e.success) {
var user = e.users[0];
alert('Success:\n' +
'id: ' + user.id + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Search for Users</h4>
<p>This example requests information about particular users and checks the response.</p>
<pre><code>Cloud.Users.search({
q: 'test'
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.users.length);
for (var i = 0; i < e.users.length; i++) {
var user = e.users[i];
alert('id: ' + user.id + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Query for Users</h4>
<p>This example requests information about specific users and checks the response.</p>
<pre><code>Cloud.Users.query({
page: 1,
per_page: 10,
where: {
age: { '$gt': 28 },
favorite_color: 'blue',
first_name: 'joe'
}
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.users.length);
for (var i = 0; i < e.users.length; i++) {
var user = e.users[i];
alert('id: ' + user.id + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Update User</h4>
<p>This example updates information about the currently logged in user and checks the response.</p>
<pre><code>Cloud.Users.update({
email: 'joeuser@mycompany.com',
first_name: 'joe',
last_name: 'user',
custom_fields: {
favorite_color: 'blue',
age: 25
}
}, function (e) {
if (e.success) {
var user = e.users[0];
alert('Success:\n' +
'id: ' + user.id + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Logout User</h4>
<p>This example logs out the current user and checks the response.</p>
<pre><code>Cloud.Users.logout(function (e) {
if (e.success) {
alert('Success: Logged out');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Remove User</h4>
<p>This example deletes the current user and checks the response.</p>
<pre><code>Cloud.Users.remove(function (e) {
if (e.success) {
alert('Success: Removed');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre><h4>Request Reset Password User</h4>
<p>This example requests a password reset for a user and checks the response.</p>
<pre><code>Cloud.Users.requestResetPassword({
email: 'joeuser@mycompany.com'
}, function (e) {
if (e.success) {
alert('Success: Reset Request Sent');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method create
* <p>Create a new user.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-create">Users: Create User</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudUsersResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method login
* <p>Log in a user.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-login">Users: Login User</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudUsersResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method logout
* <p>Log out the current user.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-logout">Users: Logout User</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudUsersResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method query
* <p>Retrieve a list of users with sorting and pagination.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-query">Users: Custom Query of Users</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudUsersResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method search
* <p>Retrieve a list of users based on the specified search criteria.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-search">Users: Search Users</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters (optional)
<p>Parameters to send in the request.</p>
* @param {Callback<CloudUsersResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method show
* <p>Show public user information.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-show">Users: Show User Profile</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudUsersResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method showMe
* <p>Show both public and private information about the user currently logged in.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-show_me">Users: Show Current User Profile</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Callback<CloudUsersResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method update
* <p>Update the current user.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-update">Users: Update Current User</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudUsersResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method remove
* <p>Delete the current user.</p>
* @description <p>Requires user login. </p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-delete">Users: Delete User</a>
for the request parameters supported by this method.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudUsersResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method requestResetPassword
* <p>Send an email to user to recover lost password.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-request_reset_password">Users: Send a reset password email to User</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudUsersResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method resendConfirmation
* <p>Re-send a user verification email.</p>
* @description <p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/api/Users-method-resend_confirmation">Users: Send a reset password email to User</a>
for the request parameters supported by this method.</p>
<p>Data is returned in the <code>users</code> property of the parameter passed to the callback.</p>
* @param {Dictionary} parameters
<p>Parameters to send in the request.</p>
* @param {Callback<CloudUsersResponse>} callback
<p>Callback function to execute when the method completes.</p>
*/
/**
* @method secureCreate
* <p>Create a new user using 3-Legged OAuth.</p>
* @removed 3.2.3 OAuth authentication is no longer supported in the ti.cloud module.
* @description <p>Invokes a modal dialog that allows the authentication server to display a
web page for creating a new user.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/guide/acs_authentication">Authentication</a>
for instructions on enabling 3-Legged OAuth for your application.</p>
<p>Authentication data is returned in the parameter passed to the callback.</p>
* @param {Dictionary<CloudUsersSecureDialog>} parameters (optional)
<p>A dictionary of properties for the request.</p>
* @param {Callback<CloudUsersSecureResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 2.1.2
* @platform iphone 2.1.2
* @platform ipad 2.1.2
*/
/**
* @method secureLogin
* <p>Log in a user using 3-Legged OAuth.</p>
* @removed 3.2.3 OAuth authentication is no longer supported in the ti.cloud module.
* @description <p>Invokes a modal dialog that allows the authentication server to display a
web page for authenticating a user.</p>
<p>See <a href="http://docs.appcelerator.com/arrowdb/latest/#!/guide/acs_authentication">Authentication</a>
for instructions on enabling 3-Legged OAuth for your application.</p>
<p>Authentication data is returned in the parameter passed to the callback.</p>
* @param {Dictionary<CloudUsersSecureDialog>} parameters (optional)
<p>A dictionary of properties for the request.</p>
* @param {Callback<CloudUsersSecureResponse>} callback
<p>Callback function to execute when the method completes.</p>
* @platform android 2.1.2
* @platform iphone 2.1.2
* @platform ipad 2.1.2
*/
/**
* @method secureStatus
* <p>Checks if the user is authenticated with 3-Legged OAuth.</p>
* @removed 3.2.3 OAuth authentication is no longer supported in the ti.cloud module.
* @description <p>True is returned after successfully calling {@link Modules.Cloud.Users#method-secureCreate} or
{@link Modules.Cloud.Users#method-secureLogin}, and false after successfully calling
{@link Modules.Cloud.Users#method-logout}.</p>
* @returns {Boolean}
* @platform android 2.1.2
* @platform iphone 2.1.2
* @platform ipad 2.1.2
*/
* @class CloudUsersSecureDialog
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Users/Users.yml
* <p>Properties for the modal dialog used in 3-Legged OAuth</p>
*/
* @property [title=Appcelerator Cloud Service]
* @type String
* <p>Defines the title for the dialog.</p>
*/
/**
* @class CloudUsersResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Users/Users.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property users
* @type Dictionary[]
* <p>Set of <code>user</code> objects, if any exist.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
* @class CloudUsersSecureResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends CloudResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Cloud/Users/Users.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
* @property accessToken
* @type String
* <p>Identifies the current access token when using 3-Legged OAuth.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
* @property expiresIn
* @type Number
* <p>Indicates the number of seconds before the access token expires.</p>
* @description <p>Only included if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Modules.CloudPush
* @platform android 2.0.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/CloudPush/CloudPush.yml
* <p>Provides support for Android push notifications.</p>
* @description <p>The CloudPush module supports Android push notifications for a device by providing a connection
to the push notification server to the device to receive push notifications and to optionally
present a tray notification to the user when a new push notification is received.</p>
<p>This module is only used to receive push notifications. For information on configuring your
project to send push notifications, see {@link Modules.Cloud.PushNotifications}.</p>
<h4>Push Protocols</h4>
<p>As of Release 3.2.0, the CloudPush module only supports Google Cloud Messaging (GCM) for push
notifications. MQTT support is deprecated and support was removed in Release 3.2.0. Upgrade your
application to use the GCM protocol.</p>
<p>GCM supports devices that run Android 2.2 and later, and requires that the Google Play Store
application be installed. For pre-4.0 devices, the user is required to set up their Google
account.</p>
<h4>Getting Started</h4>
<p>To use the CloudPush module in your JavaScript code, you need to require it in and
get a device token with the <code>retrieveDeviceToken</code> method to enable push notifications with Arrow Push.
In your project's <code>tiapp.xml</code>, you need to add some keys to configure push notifications.</p>
<p>Note that this module is not included in the Titanium namespace, but it is bundled with the Titanium SDK as of
version 2.0.0. To use it, you must require it, like this:</p>
<pre><code>var CloudPush = require('ti.cloudpush');
</code></pre>
<p>Then, call the <code>retrieveDeviceToken</code> method to get a unique token specific to that device and
Arrow DB application. This token is used with {@link Modules.Cloud.PushNotifications Arrow PushNotifications calls}
to subscribe and unsubscribe the device to push notification channels.</p>
<p>Once the device is subscribed to at least one push channel, listen to the module's <code>callback</code>,
<code>trayClickLaunchedApp</code>, and <code>trayClickFocusedApp</code> events to monitor for incoming push notifications.</p>
<p>This module must also be added to the modules section in your tiapp.xml. This can be done using the Modules list in
the Titanium Studio TiApp Editor, or by editing the XML directly and adding the following line to the modules
element:</p>
<pre><code><module platform="android">ti.cloudpush</module>
</code></pre>
<p>Your app must prove that it is allowed to talk to Arrow. This keeps your data secure by preventing anyone from
making requests to Arrow that impersonate your app.</p>
<p>Titanium Studio creates a pair of keys (Development and Production) for each Titanium application depending on the
user preference specified during new project creation. This pair of keys will be stored in <code>tiapp.xml</code> and one of the
keys will be used during application build depending on the build type (development or production).</p>
<p>To use push notifications, in the <code>tiapp.xml</code> file, you need to specify the Arrow Push keys and push
type. The supported properties in <code>tiapp.xml</code> are:</p>
<pre><code><!-- Property keys for Arrow Push (required) -->
<property name="acs-api-key-development" type="string">YOUR DEVELOPMENT API KEY HERE</property>
<property name="acs-api-key-production" type="string">YOUR PRODUCTION API KEY HERE</property>
<property name="acs-api-key" type="string">YOUR API KEY HERE</property>
</code></pre>
<p>If a deployment-specific setting is provided (production or development) then that value will be used for the current deployment environment.</p>
<p><em>WARNING</em>: The default properties of this module are used until you set a property for the first time. Because the
properties are persisted to the device settings (via {@link Titanium.App.Properties}), the most recent value you set will
always be used.</p>
<h4>Virtual Private Cloud Configuration</h4>
<p>If you are using a virtual private cloud (VPC), you need to configure your Arrow Push dispatcher
URL in order to send push notifications with GCM. In the <code>tiapp.xml</code> file, add the <code>acs-push-api-url</code>
application property and set the node text to the push dispatcher URL provided to you. The URL may
be the same as your custom ArrowDB endpoint and have deployment-specific settings, that is, two
URLs--one for production and another for the development environment.</p>
<pre><code><ti:app>
<property name="acs-push-api-url-production">https://api-prod.fooinc.com</property>
<property name="acs-push-api-url-development">https://api-dev.fooinc.com</property>
</ti:app>
</code></pre>
<h4>Grouped Notifications</h4>
<p>If the device receives multiple push notifications from the application, Android can group these
notifications together as one notification.</p>
<p>To use grouped notifications, add a grouped notification template to either the <code>tiapp.xml</code> file
or the <code>i18n</code> folder for internationalized versions:</p>
<p><code>tiapp.xml</code>:</p>
<pre><code><property name="acs-grouped-notification-message-development" type="string">You have $number$ unread messages.</property>
<property name="acs-grouped-notification-message-production" type="string">You have $number$ unread messages.</property>
-or-
<property name="acs-grouped-notification-message" type="string">You have $number$ unread messages.</property>
</code></pre>
<p><code>i18n/es/strings.xml</code> (example for Spanish):</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="acs_grouped_notification_message">Tienes $number$ mensajes no leidos.</string>
</resources>
</code></pre>
<p>The <code>$number$</code> variable indicates the number of unread messages.</p>
* <h3>Examples</h3>
<h4>Listening for Push Notifications</h4>
<p>This example lets the application retrieve the device token and listens for several events
to monitor incoming push notifications.</p>
<pre><code>var CloudPush = require('ti.cloudpush');
CloudPush.retrieveDeviceToken({
success: function deviceTokenSuccess(e) {
// Use this device token with Ti.Cloud.PushNotifications calls
// to subscribe and unsubscribe to push notification channels
Ti.API.info('Device Token: ' + e.deviceToken);
},
error: function deviceTokenError(e) {
alert('Failed to register for push! ' + e.error);
}
});
// These events monitor incoming push notifications
CloudPush.addEventListener('callback', function (evt) {
alert(evt.payload);
});
CloudPush.addEventListener('trayClickLaunchedApp', function (evt) {
Ti.API.info('Tray Click Launched App (app was not running)');
});
CloudPush.addEventListener('trayClickFocusedApp', function (evt) {
Ti.API.info('Tray Click Focused App (app was already running)');
});
</code></pre>
*/
/**
* @event trayClickLaunchedApp
* <p>Fired when a tray notification is shown and the application is not running.</p>
* @description <p>Touching it launches the app, and fires this event.</p>
<p>This is only applicable if you have set {@link Modules.CloudPush#property-showTrayNotification showTrayNotification} to true.</p>
* @param {String} payload
<p>A JSON string of your data payload. Use JSON.parse to turn this into an object you can use.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event trayClickFocusedApp
* <p>Fired when a tray notification is shown and the application is already running.</p>
* @description <p>Touching it focuses the app, and fires this event.</p>
<p>This is only applicable if you have set {@link Modules.CloudPush#property-showTrayNotification showTrayNotification} to true.</p>
* @param {String} payload
<p>A JSON string of your data payload. Use JSON.parse to turn this into an object you can use.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event callback
* <p>Fired whenever a push notification is received.</p>
* @description <p>If your application is not running when a push is received, the push will be saved in a queue until the next
time you add an event listener for this.</p>
<p>This will only be fired once per push notification.</p>
<p>This event will be fired at different times depending on your settings and the application's present state
(foreground, background, or not running at all). When {@link Modules.CloudPush#property-focusAppOnPush focusAppOnPush} is true, this
will fire as soon as you receive a push. When {@link Modules.CloudPush#property-showTrayNotification showTrayNotification} is true, this
will fire as soon as the user touches the tray notification to focus your application. Or, if
{@link Modules.CloudPush#property-showTrayNotificationsWhenFocused showTrayNotificationsWhenFocused} is false, and your application is
in the foreground, it will be called right away. If both {@link Modules.CloudPush#property-focusAppOnPush focusAppOnPush}
and {@link Modules.CloudPush#property-showTrayNotification showTrayNotification} are false, this will fire the next time your
application is launched and you add an event listener for it.</p>
<p>You can use the {@link Modules.CloudPush#event-trayClickLaunchedApp trayClickLaunchedApp} and
{@link Modules.CloudPush#event-trayClickFocusedApp trayClickFocusedApp} events to distinguish between the various ways
a push notification can return a user to your application.</p>
* @param {String} payload
<p>A JSON string of your data payload. Use JSON.parse to turn this into an object you can use.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method retrieveDeviceToken
* <p>Asynchronously retrieves the application specific device token.</p>
* @description <p>This token is used in calls to Appcelerator Cloud Services to subscribe or unsubscribe to push notification
channels. This token is unique to each application and device.</p>
* @param {CloudPushNotificationConfig} config
<p>Dictionary specifying token retrieval related options.</p>
*/
/**
* @method clearStatus
* <p>Clears the CloudPush module's stored status, including the push type, device token, GCM sender ID, etc.</p>
* @description <p>This method is useful to transfer the push type from MQTT to GCM, or changing the GCM sender ID when needed.
After calling this method, the CloudPush module is reinitialized. Use <code>retrieveDeviceToken</code> to
get the device token again.</p>
* @platform android 3.1.2
*/
/**
* @method isGooglePlayServicesAvailable
* <p>Returns a code to indicate whether Google Play Services is available on the device.</p>
* @returns {Number}One of the following status codes:
<Modules.CloudPush.SUCCESS>, <Modules.CloudPush.SERVICE_MISSING>,
<Modules.CloudPush.SERVICE_VERSION_UPDATE_REQUIRED>,
<Modules.CloudPush.SERVICE_DISABLED> or <Modules.CloudPush.SERVICE_INVALID>.
* @platform android 3.4.1
*/
/**
* @method getEnabled
* <p>Gets the value of the {@link Modules.CloudPush#property-enabled} property.</p>
* @deprecated 3.2.0 This property was only required to enable push notifications for the legacy MQTT
protocol.
* @returns {Boolean}
*/
/**
* @method setEnabled
* <p>Sets the value of the {@link Modules.CloudPush#property-enabled} property.</p>
* @deprecated 3.2.0 This property was only required to enable push notifications for the legacy MQTT
protocol.
* @param {Boolean} enabled
<p>New value for the property.</p>
*/
/**
* @method getShowTrayNotification
* <p>Gets the value of the {@link Modules.CloudPush#property-showTrayNotification} property.</p>
* @returns {Boolean}
*/
/**
* @method setShowTrayNotification
* <p>Sets the value of the {@link Modules.CloudPush#property-showTrayNotification} property.</p>
* @param {Boolean} showTrayNotification
<p>New value for the property.</p>
*/
/**
* @method getShowAppOnTrayClick
* <p>Gets the value of the {@link Modules.CloudPush#property-showAppOnTrayClick} property.</p>
* @returns {Boolean}
*/
/**
* @method setShowAppOnTrayClick
* <p>Sets the value of the {@link Modules.CloudPush#property-showAppOnTrayClick} property.</p>
* @param {Boolean} showAppOnTrayClick
<p>New value for the property.</p>
*/
/**
* @method getShowTrayNotificationsWhenFocused
* <p>Gets the value of the {@link Modules.CloudPush#property-showTrayNotificationsWhenFocused} property.</p>
* @returns {Boolean}
*/
/**
* @method setShowTrayNotificationsWhenFocused
* <p>Sets the value of the {@link Modules.CloudPush#property-showTrayNotificationsWhenFocused} property.</p>
* @param {Boolean} showTrayNotificationsWhenFocused
<p>New value for the property.</p>
*/
/**
* @method getFocusAppOnPush
* <p>Gets the value of the {@link Modules.CloudPush#property-focusAppOnPush} property.</p>
* @returns {Boolean}
*/
/**
* @method setFocusAppOnPush
* <p>Sets the value of the {@link Modules.CloudPush#property-focusAppOnPush} property.</p>
* @param {Boolean} focusAppOnPush
<p>New value for the property.</p>
*/
/**
* @method getSingleCallback
* <p>Gets the value of the {@link Modules.CloudPush#property-singleCallback} property.</p>
* @returns {Boolean}
*/
/**
* @method setSingleCallback
* <p>Sets the value of the {@link Modules.CloudPush#property-singleCallback} property.</p>
* @param {Boolean} singleCallback
<p>New value for the property.</p>
*/
/**
* @property [enabled=false]
* @type Boolean
* <p>Whether or not this device will receive push notifications.</p>
* @deprecated 3.2.0 This property was only required to enable push notifications for the legacy MQTT
protocol.
*/
/**
* @property [showTrayNotification=true]
* @type Boolean
* <p>Whether or not to show a tray notification when a new push is received.</p>
* @description <p>If your payload is only a string, it will be used as the contentText and tickerText, and your application's name
will be used as the contentTitle with a system icon.</p>
<p>Note that in your payload, you can customize this tray notification using any of the properties of a
{@link Titanium.Android.Notification}, except for contentIntent and deleteIntent (those are automatically set).</p>
*/
/**
* @property [showAppOnTrayClick=true]
* @type Boolean
* <p>Whether or not clicking the tray notification will bring your application to the foreground.</p>
* @description <p>This is only applicable if you have set {@link Modules.CloudPush#property-showTrayNotification showTrayNotification} to true.</p>
*/
/**
* @property [showTrayNotificationsWhenFocused=false]
* @type Boolean
* <p>Whether or not to show tray notifications when your application is in the foreground.</p>
* @description <p>Instead of showing a notification, the {@link Modules.CloudPush#event-callback callback} event will be immediately fired
instead.</p>
<p>This is only applicable if you have set {@link Modules.CloudPush#property-showTrayNotification showTrayNotification} to true.</p>
*/
/**
* @property [focusAppOnPush=false]
* @type Boolean
* <p>Whether or not your application is brought to the foreground whenever a new push is received.</p>
* @description <p>Note that this behavior is rather disruptive to users, and is strongly discouraged.</p>
*/
/**
* @property [singleCallback=false]
* @type Boolean
* <p>Set to true to trigger a single callback for the selected push notification when multiple push notifications are displayed in the tray.</p>
* @description <p>In previous versions of the module, clicking on one of the application's push notifications triggered the callbacks for all of the application's push notifications.
The new module retains the same behavior by default.</p>
<p>Set this property to true to receive a single callback for the push notification selected by the user, regardless of how many push notifications are displayed in the tray.</p>
*/
/**
* @property SUCCESS
* @type Number
* @readonly
* <p>Code returned from {@link Modules.CloudPush#method-isGooglePlayServicesAvailable}. Google Play services is available, and the connection is successful.</p>
* @platform android 3.4.1
*/
/**
* @property SERVICE_MISSING
* @type Number
* @readonly
* <p>Code returned from {@link Modules.CloudPush#method-isGooglePlayServicesAvailable}. Google Play services is not installed on the device.</p>
* @platform android 3.4.1
*/
/**
* @property SERVICE_VERSION_UPDATE_REQUIRED
* @type Number
* @readonly
* <p>Code returned from {@link Modules.CloudPush#method-isGooglePlayServicesAvailable}. Google Play services is out of date.</p>
* @platform android 3.4.1
*/
/**
* @property SERVICE_DISABLED
* @type Number
* @readonly
* <p>Code returned from {@link Modules.CloudPush#method-isGooglePlayServicesAvailable}. Google Play services has been disabled on this device.</p>
* @platform android 3.4.1
*/
/**
* @property SERVICE_INVALID
* @type Number
* @readonly
* <p>Code returned from {@link Modules.CloudPush#method-isGooglePlayServicesAvailable}. The version of Google Play services installed on this device is not authentic.</p>
* @platform android 3.4.1
*/
/**
* @class CloudPushNotificationConfig
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/CloudPush/CloudPush.yml
* <p>Simple object for specifying token retrieval options to {@link Modules.CloudPush#method-retrieveDeviceToken retrieveDeviceToken}.</p>
*/
/**
* @property success
* @type Callback<CloudPushNotificationSuccessArg>
* <p>Callback function called when the push registration is successfully completed.</p>
*/
/**
* @property error
* @type Callback<CloudPushNotificationErrorArg>
* <p>Callback function called when an error occurs during registration.</p>
*/
/**
* @class CloudPushNotificationSuccessArg
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/CloudPush/CloudPush.yml
* <p>A simple object passed to the {@link Modules.CloudPush#method-retrieveDeviceToken retrieveDeviceToken} success callback.</p>
*/
/**
* @property deviceToken
* @type String
* <p>The device token which this device was registered for.</p>
*/
/**
* @class CloudPushNotificationErrorArg
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/CloudPush/CloudPush.yml
* <p>A simple object passed to the {@link Modules.CloudPush#method-retrieveDeviceToken retrieveDeviceToken} error callback.</p>
*/
/**
* @property error
* @type String
* <p>Description of the error.</p>
*/
/**
* @class Modules
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Modules.yml
* <p>Optional Titanium modules.</p>
* @description <p>Modules in this section are optional modules that may be packaged with the Titanium SDK.
These modules are not part of the Titanium namespace, and must be added to the <code>tiapp.xml</code>
file and imported using {@link Global#method-require require}.</p>
<p>Each of the modules in this section is either packaged with the Titanium SDK or
available for free through the <a href="https://marketplace.appcelerator.com">Appcelerator Marketplace</a>.</p>
*/
/**
* @class Titanium.API
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/API/API.yml
* <p>The top-level API module, containing methods to output messages to the system log.</p>
*/
/**
* @method timestamp
* <p>Logs messages with a <code>timestamp</code> severity-level, prefixed with a timestamp float number
representing the number of seconds since January 1st, 2001.</p>
* @param {Array<String>/String} message
<p>Message to log. Accepts an array on iOS only.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method info
* <p>Logs messages with an <code>info</code> severity-level.</p>
* @param {Array<String>/String} message
<p>Message to log. Accepts an array on iOS only.</p>
*/
/**
* @method warn
* <p>Logs messages with a <code>warn</code> severity-level.</p>
* @param {Array<String>/String} message
<p>Message to log. Accepts an array on iOS only.</p>
*/
/**
* @method error
* <p>Logs messages with an <code>error</code> severity-level.</p>
* @param {Array<String>/String} message
<p>Message to log. Accepts an array on iOS only.</p>
*/
/**
* @method debug
* <p>Logs messages with a <code>debug</code> severity-level.</p>
* @param {Array<String>/String} message
<p>Message to log. Accepts an array on iOS only.</p>
*/
/**
* @method trace
* <p>Logs messages with a <code>trace</code> severity-level.</p>
* @param {Array<String>/String} message
<p>Message to log. Accepts an array on iOS only.</p>
*/
/**
* @method log
* <p>Logs messages with the specified severity-level.</p>
* @param {String} level
<p>Log level. One of <code>info</code>, <code>warn</code>, <code>error</code>, <code>debug</code> and <code>trace</code>. If the value is not
recognized, an info-level message prefixed with the value is logged.</p>
* @param {Array<String>/String} message
<p>Message to log. Accepts an array on iOS only.</p>
*/
/**
* @class Titanium.Accelerometer
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Accelerometer/Accelerometer.yml
* <p>The top-level Accelerometer module, used to determine the device's physical position.</p>
* @description <p>An accelerometer is a hardware unit integrated into a mobile device, that detects when the
device has moved, and returns its new orientation in a three-dimensional space. With its
single <code>update</code> event, this module provides an interface to access the output positional data.</p>
<p>An accelerometer needs to be switched on in order for it to report to the operating system,
which consumes a lot of power that will deplete the battery over time. This is why it is
recommended that the accelerometer is switched off when not in use.</p>
<p>The accelerometer may be switched on and off by simply adding and removing the <code>update</code>
event listener function. See the example for a demonstration.</p>
* <h3>Examples</h3>
<h4>Basic Accelerometer Event</h4>
<p>Adds an accelerometer update event listener, and displays the x, y and z axis in the
window when the device is moved. On Android, the accelerometer is switched off and on when
the application is paused and resumed.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white',
exitOnClose:true,
layout: 'vertical'
});
opts = {
color:'black',
font:{fontSize:20},
text:'-',
top:20, left:10,
width:300
};
var labelTimestamp = Ti.UI.createLabel(opts);
win.add(labelTimestamp);
var labelx = Ti.UI.createLabel(opts);
win.add(labelx);
var labely = Ti.UI.createLabel(opts);
win.add(labely);
var labelz = Ti.UI.createLabel(opts);
win.add(labelz);
win.open();
var accelerometerCallback = function(e) {
labelTimestamp.text = 'timestamp: ' + e.timestamp;
labelx.text = 'x: ' + e.x;
labely.text = 'y: ' + e.y;
labelz.text = 'z: ' + e.z;
};
if (Ti.Platform.model === 'Simulator' || Ti.Platform.model.indexOf('sdk') !== -1 ){
alert('Accelerometer does not work on a virtual device');
} else {
Ti.Accelerometer.addEventListener('update', accelerometerCallback);
if (Ti.Platform.name === 'android'){
Ti.Android.currentActivity.addEventListener('pause', function(e) {
Ti.API.info("removing accelerometer callback on pause");
Ti.Accelerometer.removeEventListener('update', accelerometerCallback);
});
Ti.Android.currentActivity.addEventListener('resume', function(e) {
Ti.API.info("adding accelerometer callback on resume");
Ti.Accelerometer.addEventListener('update', accelerometerCallback);
});
}
}
</code></pre>
*/
/**
* @event update
* <p>Fired when the accelerometer changes.</p>
* @param {String} timestamp
<p>Reference timestamp since the previous change. This is not a valid timestamp and should
simply be used to determine the number of milliseconds between events.</p>
* @param {String} y
<p>Current <code>y</code> axis of the device.</p>
* @param {String} x
<p>Current <code>x</code> axis of the device.</p>
* @param {String} z
<p>Current <code>z</code> axis of the device.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @class Titanium.Analytics
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Analytics/Analytics.yml
* <p>Used for transmitting developer-defined Analytics events to the Appcelerator Analytics product. </p>
* @description <p>The analytics module can be used to supply additional context or application-specific
information which can then be accessed during analysis using Analytics.</p>
<p>Use the {@link Titanium.Analytics#method-featureEvent featureEvent} method to generate custom
events that you can view through the Analytics product. You can specify a name for
the feature event which is visible through Analytics.</p>
<p><strong>NOTE</strong> The analytics module lets you transmit some data that is stored, but
not made accessible through the Analytics UI. To access this data, you must
sign up for the optional raw data export service. </p>
<p><em>The following types of data are stored but not made available through the Analytics UI:</em></p>
<ul>
<li><p>Navigation events.</p></li>
<li><p>Extra data added to feature events (the <code>data</code> parameter).</p></li>
</ul>
<p>Viewing navigation events in the Analytics UI will be supported in a future version
of the Analytics product. There is no plan to support the other event types, and they
should not be used.</p>
* <h3>Examples</h3>
<h4>Custom Feature Event</h4>
<p>This example shows how to send a feature event during an application session to indicate
some feature that you would like to track was used.</p>
<pre><code>Titanium.Analytics.featureEvent('app.feature');
</code></pre>
<p>In this case, the Analytics product would show statistics about how many times the
'app.feature' event was generated.</p>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method addEvent
* <p>Sends a generic event for this application session.
<strong>Not displayed in Analytics UI</strong>.</p>
* @removed 3.3.0
* @param {String} type
<p>Event type.</p>
* @param {String} name
<p>Event name.</p>
* @param {Object} data (optional)
<p>Extra data related to the event. Must be serializable as JSON.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method filterEvents
* <p>Sets a list of events that will not be sent to the analytics server.</p>
* @param {Array<String>} events
<p>List of events to be filtered.</p>
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @method settingsEvent
* <p>Sends a settings event for this application session.
<strong>Not displayed in Analytics UI</strong>.</p>
* @removed 3.3.0
* @param {String} name
<p>Event name.</p>
* @param {Object} data (optional)
<p>Extra data related to the event. Must be serializable as JSON.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method timedEvent
* <p>Send a timed event for this application session.
<strong>Not displayed in Analytics UI</strong>.</p>
* @removed 3.3.0
* @param {String} name
<p>Event name.</p>
* @param {Date} start
<p>Event start as a Date object.</p>
* @param {Date} stop
<p>Event end as a Date object.</p>
* @param {Number} duration
<p>Event duration.</p>
* @param {Object} data (optional)
<p>Extra data related to the event. Must be serializable as JSON.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method userEvent
* <p>Sends a user event for this application session. <strong>Not displayed in Analytics UI</strong>.</p>
* @removed 3.3.0
* @param {String} name
<p>Event name.</p>
* @param {Object} data (optional)
<p>Extra data related to the event. Must be serializable as JSON.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method featureEvent
* <p>Sends a feature event for this application session.</p>
* @description <p>From version "6.0.0", the JSON that is being sent will be validated. The JSON can have
a maximum of 5 nested levels, 1000 serialised byte length, 25 keys per level and key length
of up to 50 characters.</p>
<p>If this is successful, you will get a return number of 0. -1 is returned if it is a JSON
Validation error. -2 is returned if Analytics is disabled.</p>
* @param {String} name
<p>Event name, displayed in Analytics UI.</p>
* @param {Object} data (optional)
<p>Extra data related to the event. Must be serializable as JSON.</p>
* @returns {Number}It returns 0 if it is successful. Otherwise, it is an error.
*/
/**
* @method navEvent
* <p>Sends a navigation event for this application session.
<strong>Not displayed in Analytics UI</strong>.</p>
* @param {String} from
<p>String describing the location the user navigated from.</p>
* @param {String} to
<p>String describing the location the user navigated to.</p>
* @param {String} name (optional)
<p>Event name.</p>
* @param {Object} data (optional)
<p>Extra data related to the event. The object must be serializable as JSON.</p>
*/
/**
* @method getLastEvent
* <p>Gets the value of the {@link Titanium.Analytics#property-lastEvent} property.</p>
* @returns {String}
* @platform android 3.1.2
* @platform iphone 3.1.2
* @platform ipad 3.1.2
* @platform windowsphone 4.1.0
*/
/**
* @property lastEvent
* @type String
* @readonly
* <p>JSON representation of the last analytics event generated.</p>
* @description <p>LastEvent is the JSON version of the last event prepared to be sent to Appcelerator
during the application's session. This value may be null or undefined if no such
event was queued.</p>
* @platform android 3.1.2
* @platform iphone 3.1.2
* @platform ipad 3.1.2
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.Android.ActionBar
* @platform android 3.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/ActionBar.yml
* <p>An action bar is a window feature that identifies the application and user location,
and provides user actions and navigation modes.</p>
* @description <p>Starting with Release 3.3.0, the Titanium SDK uses the appcompat library to provide support for
the action bar, including devices running Android 2.3.x and prior. If you are using a release earlier
than 3.3.0, refer to the <em>Applicaton Note</em> below for additional information.</p>
<p>You can add action items to the action bar by defining an Android menu and setting the
menu items to display as action items. See {@link Titanium.Android.Menu Menu} and
{@link Titanium.Android.MenuItem MenuItem} for details.</p>
<p>In JavaScript, wait for the window or tab group's <code>open</code> event before accessing
the action bar from the window or tab group's {@link Titanium.Android.Activity activity}.</p>
<p>Note that setting the {@link Titanium.UI.Window#property-navBarHidden Window.navBarHidden} property
to true disables the Action Bar since it is part of the navigation title bar.</p>
<p>For more examples on using the Action Bar, refer to the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Action_Bar">Android Action Bar guide</a>.</p>
<h4>Application Notes for Alloy</h4>
<p>Starting with Alloy 1.5.0, you can add ActionBar attributes to the <code>ActionBar</code> element.
To use the action bar, add the <code><ActionBar></code> tag as a child of either a
a <code><Window></code> or <code><TabGroup></code>, then set ActionBar attributes in either the XML or TSS file.</p>
<p>Starting with Alloy 1.4.0, you can also add ActionBar attributes to the <code>Menu</code> element.
Do not define ActionBar attributes in both the <code>ActionBar</code> and <code>Menu</code> elements. Only define the
attributes in one element.</p>
<p>To add action items to the action bar, add the <code><Menu></code> tag as a child of either
a <code><Window></code> or <code><TabGroup></code>, then add <code><MenuItem></code> tags as children of the <code><Menu></code> tag.
Set MenuItem attributes in either the XML or TSS file.</p>
<p>For an example of using the Action Bar with Alloy, see "Action Bar using Alloy XML Markup" below.</p>
<h4>Action Bar Icon</h4>
<p>Starting with Release 4.0, due to the requirement that the target SDK must be set to Android 5.0
(API level 21) or higher, the action bar icon may not display. Google is discouraging
the use of icons in toolbars:</p>
<pre><code>In modern Android UIs developers should lean more on a visually distinct color scheme for toolbars
than on their application icon. The use of application icon plus title as a standard layout is
discouraged on API 21 devices and newer.
</code></pre>
<p>Source: <a href="https://developer.android.com/reference/android/support/v7/widget/Toolbar.html">Android Developer: Toolbar API reference</a></p>
<h4>Application Note for Release 3.2.x and earlier</h4>
<p>If you are using Release 3.2.x or earlier, this feature is only available in Android 3.0
(API level 11) and above.</p>
<p>To access the action bar, you must first open a heavyweight window or tab group that
uses one of the action bar themes (such as the Android Holo theme).</p>
* <h3>Examples</h3>
<h4>Action Bar using Alloy XML Markup</h4>
<p>Adds action items and sets several properties on a window's action bar in the XML and TSS files.</p>
<p><code>app/views/index.xml</code>:</p>
<pre><code><Alloy>
<Window title="My Test App">
<ActionBar id="actionbar" title="My XML Menu" onHomeIconItemSelected="doMenuClick" />
<Menu>
<MenuItem id="item1" title="Settings" onClick="openSettings" />
<MenuItem id="item2" title="Search" onClick="doSearch" />
</Menu>
<Label id="label">Welcome!</Label>
</Window>
</Alloy>
</code></pre>
<p><code>app/styles/index.tss</code>:</p>
<pre><code>"MenuItem": {
showAsAction: Ti.Android.SHOW_AS_ACTION_ALWAYS
},
"#item1": {
icon: Ti.Android.R.drawable.ic_menu_preferences
},
"#item2": {
icon: Ti.Android.R.drawable.ic_menu_search
},
"#actionbar": {
icon: "/actionicon.png",
displayHomeAsUp: true,
backgroundImage: "/actionbackground.png"
}
</code></pre><h4>Action Bar Example</h4>
<p>The following example sets several properties on a window's action bar.</p>
<pre><code>var win = Ti.UI.createWindow({
title: "Old Title",
navBarHidden: false
});
var actionBar;
win.addEventListener("open", function() {
if (Ti.Platform.osname === "android") {
if (! win.activity) {
Ti.API.error("Can't access action bar on a lightweight window.");
} else {
actionBar = win.activity.actionBar;
if (actionBar) {
actionBar.backgroundImage = "/bg.png";
actionBar.title = "New Title";
actionBar.onHomeIconItemSelected = function() {
Ti.API.info("Home icon clicked!");
};
}
}
}
});
win.open();
</code></pre>
<p>Nearly identical code can be used for a tab group, but in Release 3.0, the tab group's
activity must be accessed using the {@link Titanium.UI.TabGroup#method-getActivity getActivity} method.</p>
*/
/**
* @method hide
* <p>Hides the action bar if it is currently showing.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/app/ActionBar.html#hide%28%29">hide</a>
in the Android API Reference.</p>
*/
/**
* @method setDisplayShowHomeEnabled
* <p>Shows or hides the action bar home icon</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/app/ActionBar.html#setDisplayShowHomeEnabled%28boolean%29">setDisplayShowHomeEnabled</a>
in the Android API Reference.</p>
* @param {Boolean} show
<p>Boolean to show or hide action bar home icon</p>
* @platform android 3.3.0
*/
/**
* @method setDisplayShowTitleEnabled
* <p>Shows or hides the action bar title/subtitle</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/app/ActionBar.html#setDisplayShowTitleEnabled%28boolean%29">setDisplayShowTitleEnabled</a>
in the Android API Reference.</p>
* @param {Boolean} show
<p>Boolean to show or hide action bar title/subtitle</p>
* @platform android 3.3.0
*/
/**
* @method show
* <p>Shows the action bar if it is currently hidden.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/app/ActionBar.html#show%28%29">show</a>
in the Android API Reference.</p>
*/
/**
* @method setBackgroundImage
* <p>Sets the value of the {@link Titanium.Android.ActionBar#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
*/
/**
* @method setDisplayHomeAsUp
* <p>Sets the value of the {@link Titanium.Android.ActionBar#property-displayHomeAsUp} property.</p>
* @param {Boolean} displayHomeAsUp
<p>New value for the property.</p>
*/
/**
* @method setHomeButtonEnabled
* <p>Sets the value of the {@link Titanium.Android.ActionBar#property-homeButtonEnabled} property.</p>
* @param {Boolean} homeButtonEnabled
<p>New value for the property.</p>
* @platform android 3.3.0
*/
/**
* @method setIcon
* <p>Sets the value of the {@link Titanium.Android.ActionBar#property-icon} property.</p>
* @param {String} icon
<p>New value for the property.</p>
*/
/**
* @method setLogo
* <p>Sets the value of the {@link Titanium.Android.ActionBar#property-logo} property.</p>
* @param {String} logo
<p>New value for the property.</p>
*/
/**
* @method getNavigationMode
* <p>Gets the value of the {@link Titanium.Android.ActionBar#property-navigationMode} property.</p>
* @returns {Number}
*/
/**
* @method setNavigationMode
* <p>Sets the value of the {@link Titanium.Android.ActionBar#property-navigationMode} property.</p>
* @param {Number} navigationMode
<p>New value for the property.</p>
*/
/**
* @method setOnHomeIconItemSelected
* <p>Sets the value of the {@link Titanium.Android.ActionBar#property-onHomeIconItemSelected} property.</p>
* @param {Callback} onHomeIconItemSelected
<p>New value for the property.</p>
*/
/**
* @method getSubtitle
* <p>Gets the value of the {@link Titanium.Android.ActionBar#property-subtitle} property.</p>
* @returns {String}
* @platform android 3.2.3
*/
/**
* @method setSubtitle
* <p>Sets the value of the {@link Titanium.Android.ActionBar#property-subtitle} property.</p>
* @param {String} subtitle
<p>New value for the property.</p>
* @platform android 3.2.3
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.Android.ActionBar#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.Android.ActionBar#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @property backgroundImage
* @type String
* @writeonly
* <p>The background image for the action bar, specified as a local file path or URL.</p>
*/
/**
* @property displayHomeAsUp
* @type Boolean
* @writeonly
* <p>Displays an "up" affordance on the "home" area of the action bar.</p>
* @description <p>See also: <a href="http://developer.android.com/reference/android/app/ActionBar.html#setDisplayHomeAsUpEnabled%28boolean%29">setDisplayHomeAsUpEnabled</a>
in the Android Developer Reference.</p>
*/
/**
* @property homeButtonEnabled
* @type Boolean
* @writeonly
* <p>Enable or disable the "home" button in the corner of the action bar.</p>
* @description <p>See also: <a href="http://developer.android.com/reference/android/app/ActionBar.html#setHomeButtonEnabled%28boolean%29">setHomeButtonEnabled</a>
in the Android Developer Reference.</p>
* @platform android 3.3.0
*/
/**
* @property icon
* @type String
* @writeonly
* <p>Sets the application icon displayed in the "home" area of the action bar, specified as a local file path or URL.</p>
* @description <p>Starting with Release 4.0, the action bar icon may not display. Google is discouraging the
use of icons in toolbars.</p>
<p>Prior to Release 3.3.0, this method only works on devices with Android 4.0 (API 14) and above. See also:
<a href="http://developer.android.com/reference/android/app/ActionBar.html#setIcon%28android.graphics.drawable.Drawable%29">setIcon</a>
in the Android Developer Reference.</p>
*/
/**
* @property logo
* @type String
* @writeonly
* <p>Sets the application logo displayed in the "home" area of the action bar, specified as a local file path or URL.</p>
* @description <p>Prior to Release 3.3.0, this method only works on devices with Android 4.0 (API 14) and above. See also:
<a href="http://developer.android.com/reference/android/app/ActionBar.html#setLogo%28android.graphics.drawable.Drawable%29">setLogo</a>
in the Android Developer Reference.</p>
*/
/**
* @property navigationMode
* @type Number
* <p>Controls the navigation mode.</p>
* @description <p>The navigation mode can be {@link Titanium.Android#property-NAVIGATION_MODE_STANDARD NAVIGATION_MODE_STANDARD}, or {@link Titanium.Android#property-NAVIGATION_MODE_TABS NAVIGATION_MODE_TABS}.
A TabGroup is initialized by Titanium Mobile with <code>NAVIGATION_MODE_TABS</code>, and can be hidden by setting to <code>NAVIGATION_MODE_STANDARD</code>. <code>NAVIGATION_MODE_LIST</code> is not yet supported.
See also: <a href="http://developer.android.com/reference/android/app/ActionBar.html#setNavigationMode%28int%29">setNavigationMode</a>
in the Android Developer Reference.</p>
*/
/**
* @property onHomeIconItemSelected
* @type Callback
* @writeonly
* <p>Callback function called when the home icon is clicked.</p>
*/
/**
* @property subtitle
* @type String
* <p>Sets the subtitle of the action bar.</p>
* @platform android 3.2.3
*/
/**
* @property title
* @type String
* <p>Sets the title of the action bar.</p>
*/
/**
* @class Titanium.Android.Activity
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Activity.yml
* <p>The Titanium binding of an Android Activity.</p>
* @description <p>According to the Android API Reference, an activity is "a single, focused thing that a
user can do."</p>
<p>In almost all cases, an activity is associated with a window. Activities are central
to the Android <strong>Back</strong> button navigation -- the <strong>Back</strong> button closes the current
activity and returns to whatever activity was open previously.</p>
<p>In Titanium, the Android Activity is not created until a window or tab group is opened.
After a Window or TabGroup object is created but before it is opened, its <code>activity</code> property
refers to an empty JavaScript object. You can use it to set properties on the activity, such as
the <code>onCreateOptionsMenu</code> property, but you cannot invoke any Activity methods.</p>
<p>After the window or tab group opens, a real Activity object is created and the properties from
the JavaScript object are copied over. The <code>activity</code> property now refers to this real Activity object,
which you can use to call the various Activity methods. For example, to use the
<code>invalidateOptionsMenu</code> method, you need to get the activity after the window or tab group opens.</p>
<p>See also <a href="http://developer.android.com/reference/android/app/Activity.html">android.app.Activity</a>
in the Android API Reference.</p>
<h4>Activity Lifecycle</h4>
<p>In Android, activities are created, started, resumed, paused, stopped, destroyed and restarted.
Titanium generates lifecycle events for activities but does not generate application-level events.
To be notified when an activity's lifecycle event is triggered, assign callbacks to the following activity
properties:</p>
<ul>
<li>{@link Titanium.Android.Activity#property-onCreate onCreate}</li>
<li>{@link Titanium.Android.Activity#property-onStart onStart}</li>
<li>{@link Titanium.Android.Activity#property-onResume onResume}</li>
<li>{@link Titanium.Android.Activity#property-onPause onPause}</li>
<li>{@link Titanium.Android.Activity#property-onStop onStop}</li>
<li>{@link Titanium.Android.Activity#property-onDestroy onDestroy}</li>
<li>{@link Titanium.Android.Activity#property-onRestart onRestart}</li>
</ul>
<p>See also the "Understand the Lifecycle Callbacks" section in
<a href="http://developer.android.com/training/basics/activity-lifecycle/starting.html">Android Developers: Activity Lifecycle</a>.</p>
<h4>Handling Application Restarts</h4>
<p>Every Android application has a root activity that starts the application. For Titanium
applications, the root activity displays the splash screen. When a backgrounded
application is left inactive (for about 30 minutes or so), upon reopening the app Android
kills off activities above the root activity. This reveals the splash screen activity, making it
appear as if the application is hung. There are two ways to handle this scenario:</p>
<ul>
<li><p>Add the following to the root <code><ti:app></code> element in your project's tiapp.xml:</p>
<pre><code><property name="ti.android.root.reappears.restart" type="bool">true</property>
</code></pre></li>
<li><p>Create an event listener for the <code>"resume"</code> event on the current Android activity that
re-intiializes the application. The benefit to this approach is that it avoids a full
application restart, which occurs with the first option.</p>
<pre><code>if(Ti.Platform.osname == "android") {
var initialLaunchPerformed = false;
Ti.Android.currentActivity.onResume = function() {
if (!initialLaunchPerformed) {
initialLaunchPerformed = true;
return;
}
// If we reach this point the root activity is being resumed for the second (or greater time).
// Re-run the application-specific start-up code again.
runApplication();
};
}
function runApplication() {
// Start-up code here...
}
</code></pre></li>
</ul>
<h4>Don't keep activities option</h4>
<p>Android 4.0 and greater devices have an option called <strong>Don't keep activities</strong> under the <strong>Developer
Options</strong> menu. When this option is enabled, the Android OS will destroy an activity as soon as it
is stopped. It is intended to help developers debug their apps. For example, it can simulate the
case that Android will kill an activity in the background due to memory pressure. In
normal use, it is not recommended to turn this option on because this may lead to unexpected issues
on the apps, such as freezes, force closes and reboots.</p>
<p>When the <strong>Don't keep activities</strong> option is enabled, the lifecycle of the activity is different
from the normal case. Whenever the user leaves an activity, such as backgrounding the app using the
HOME button, this activity is destroyed by Android, which calls <code>onDestroy</code>. In the normal case, <code>onStop</code>
would be called and the activity would not be destroyed. Later, when the user goes back to that activity, this
activity will be recreated, which calls <code>onCreate</code>. In the normal case, since the activity is not destroyed,
<code>onRestart</code> would be called instead. Therefore, some events, such as the open and close events on the Window
or TabGroup, will be fired differently from the normal case, and the root window of the app must set
{@link Titanium.UI.Window#property-exitOnClose exitOnClose} to true; otherwise, the app will be unable to back out, that is,
hitting the BACK button in the root window will not allow the application to exit.</p>
<h4>Deprecated Behavior</h4>
<p>Prior to Release 3.4.0, to monitor lifecycle events, use the activity's events, <code>create</code>, <code>destroy</code>,
<code>pause</code>, <code>resume</code>, <code>start</code> and <code>stop</code>, to be notified when an activity is created, destroyed, paused,
resumed, started and stopped, respectively.</p>
<p>You can only set Activity properties from a TabGroup object after the tab group opens.</p>
<p>Prior to Release 3.2.0, you can create either a "lightweight" or "heavyweight" window, as
described on the {@link Titanium.UI.Window} reference page. A <em>heavyweight</em> window creates a
new <code>Activity</code>. A <em>lightweight</em> window runs inside the same activity as the code that
created it. If you try to reference the activity of lightweight window, it returns undefined.</p>
* <h3>Examples</h3>
<h4>Callback Example</h4>
<p>The following example shows how to start an activity and retrieve a result code
and optional data intent when the activity ends.</p>
<pre><code>activity.startActivityForResult(intent, function(e) {
// The request code used to start this Activity
var requestCode = e.requestCode;
// The result code returned from the activity
// (http://developer.android.com/reference/android/app/Activity.html#StartingActivities)
var resultCode = e.resultCode;
// A Titanium.Android.Intent filled with data returned from the Activity
var intent = e.intent;
// The Activity the received the result
var source = e.source;
});
</code></pre>
*/
/**
* @event create
* <p>Fired from the activity's <code>onCreate</code> method.</p>
* @deprecated 3.4.0 Use <Titanium.Android.Activity.onCreate> instead.
* @description <p>See also:
<a href="http://developer.android.com/reference/android/app/Activity.html#onCreate%28android.os.Bundle%29">onCreate</a>
in the Android Developer Reference.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event destroy
* <p>Fired from the activity's <code>onDestroy</code> method.</p>
* @deprecated 3.4.0 Use <Titanium.Android.Activity.onDestroy> instead.
* @description <p>See also: <a href="http://developer.android.com/reference/android/app/Activity.html#onDestroy%28%29">onDestroy</a>
in the Android Developer Reference.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event newIntent
* <p>Fired when the activity is already running and certain flags are set in its intent.</p>
* @deprecated 3.0.0 Use <Titanium.Android.Activity.newintent> instead.
* @description <p>See also:
<a href="http://developer.android.com/reference/android/app/Activity.html#onNewIntent%28android.content.Intent%29">onNewIntent</a>
in the Android Developer Reference.</p>
* @param {Titanium.Android.Intent} intent
<p>The <code>Intent</code> passed to the native <code>onNewIntent</code> method.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event newintent
* <p>Fired when the activity is already running and certain flags are set in its intent.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/app/Activity.html#onNewIntent%28android.content.Intent%29">onNewIntent</a>
in the Android Developer Reference.</p>
* @param {Titanium.Android.Intent} intent
<p>The <code>Intent</code> passed to the native <code>onNewIntent</code> method.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event pause
* <p>Fired when the activity is paused.</p>
* @deprecated 3.4.0 Use <Titanium.Android.Activity.onPause> instead.
* @description <p>See also:
<a href="http://developer.android.com/reference/android/app/Activity.html#onPause%28%29">onPause</a>
in the Android Developer Reference.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event resume
* <p>Fired when the activity is resumed.</p>
* @deprecated 3.4.0 Use <Titanium.Android.Activity.onResume> instead.
* @description <p>See also: <a href="http://developer.android.com/reference/android/app/Activity.html#onResume%28%29">onResume</a>
in the Android Developer Reference.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event start
* <p>Fired when the activity is started.</p>
* @deprecated 3.4.0 Use <Titanium.Android.Activity.onStart> instead.
* @description <p>See also: <a href="http://developer.android.com/reference/android/app/Activity.html#onStart%28%29">onStart</a>
in the Android Developer Reference.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event stop
* <p>Fired when the activity is stopped.</p>
* @deprecated 3.4.0 Use <Titanium.Android.Activity.onStop> instead.
* @description <p>See also: <a href="http://developer.android.com/reference/android/app/Activity.html#onStop%28%29">onStop</a>
in the Android Developer Reference.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event userleavehint
* <p>Fired when the activity is about to go into the background as a result of user choice.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/app/Activity.html#onUserLeaveHint%28%29">onPause</a>
in the Android Developer Reference.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.2.0
*/
/**
* @method finish
* <p>Closes this activity.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/app/Activity.html#finish%28%29">finish</a>
in the Android API Reference.</p>
*/
/**
* @method getString
* <p>Gets an Android or Application string using the specified Resource ID and optional format arguments.</p>
* @description <p>If the optional format arguments are supplied, these are substituted for the
corresponding format specifiers in the string. For example, given the following
string resource:</p>
<pre><code><string name="greeting">"Hello %1$s, this is %2$s."</string>
</code></pre>
<p>You could call <code>getString</code> like this:</p>
<pre><code>Ti.Android.currentActivity.getString(Ti.App.Android.R.string.greeting, "Bob", "Doug" );
</code></pre>
<p>The resulting string is:</p>
<pre><code>"Hello Bob, this is Doug."
</code></pre>
<p>See also:
* <a href="http://developer.android.com/reference/android/content/Context.html#getString%28int%29">getString</a>
in the Android Developer Reference
* <a href="http://developer.android.com/reference/java/util/Formatter.html">Formatter</a>
in the Android Developer Reference
* <a href="http://developer.android.com/guide/topics/resources/string-resource.html#String">String Resources</a>
in the Android Developer Guide</p>
* @param {Number} resourceId
<p>Resource ID from the Application or Android.</p>
* @param {Object} format
<p>Optional format arguments for the String resource. May be repeated.</p>
* @returns {String}
*/
/**
* @method invalidateOptionsMenu
* <p>Declares that the option menu has changed and should be recreated.</p>
* @description <p>This method needs to be used in Android 3.0 and above when changing menus at runtime. See
<a href="http://developer.android.com/guide/topics/ui/menus.html#ChangingTheMenu">changingTheMenu</a> in
the Android API Reference for more details. </p>
* @platform android 3.0.0
*/
/**
* @method setRequestedOrientation
* <p>Sets the requested Activity orientation.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/app/Activity.html#setRequestedOrientation%28int%29">setRequestedOrientation</a>
in the Android API Reference.</p>
* @param {Number} orientation
<p>Orientation mode for the activity.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_BEHIND}
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_LANDSCAPE}
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_NOSENSOR}
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_PORTRAIT}
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_SENSOR}
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_UNSPECIFIED}
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_USER}
</ul></p>
*/
/**
* @method setResult
* <p>Sets the result of this activity using an <code>Intent</code>.</p>
* @description <p>This should be used in the case when the Activity responds to
{@link Titanium.Android.Activity#method-startActivityForResult startActivityForResult}. </p>
<p>Also see Android's documentation for
<a href="http://developer.android.com/reference/android/app/Activity.html#setResult%28int%29">setResult</a>.</p>
* @param {Number} resultCode
<p>Result code for this activity.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-RESULT_CANCELED}
<li> {@link Titanium.Android#property-RESULT_FIRST_USER}
<li> {@link Titanium.Android#property-RESULT_OK}
</ul></p>
* @param {Titanium.Android.Intent} intent (optional)
<p>An optional <code>Intent</code> with extra result data.</p>
*/
/**
* @method startActivity
* <p>Starts a new activity, using the passed in <code>Intent</code> as the description.</p>
* @description <p>See also: <a href="http://developer.android.com/reference/android/app/Activity.html#startActivity%28android.content.Intent%29">startActivity</a>
in the Android Developer Reference.</p>
* @param {Titanium.Android.Intent} intent
<p>Description of the activity to start.</p>
*/
/**
* @method startActivityForResult
* <p>The same as <code>startActivity</code>, but also accepts a callback function for handling the result of the started Activity.</p>
* @description <p>See also:
<a href="http://developer.android.com/reference/android/app/Activity.html#startActivityForResult%28android.content.Intent, int%29">startActivityForResult</a>
in the Android Developer Reference.</p>
* @param {Titanium.Android.Intent} intent
<p>Description of the activity to start.</p>
* @param {Callback<ActivityResult>} callback
<p>Callback function to be executed when the activity sets result. See
examples.</p>
*/
/**
* @method openOptionsMenu
* <p>Programmatically opens the options menu.</p>
* @description <p>See also: <a href="http://developer.android.com/reference/android/app/Activity.html#onMenuOpened%28int, android.view.Menu%29">onMenuOpened</a>
in the Android API Reference.</p>
* @platform android 3.0.0
*/
/**
* @method sendBroadcast
* <p>Broadcast the passed in <code>Intent</code> to all <code>BroadcastReceiver</code>s.</p>
* @param {Titanium.Android.Intent} intent
<p>Description of the broadcast.</p>
* @platform android 3.2.0
*/
/**
* @method sendBroadcastWithPermission
* <p>Broadcast the passed in <code>Intent</code> to all <code>BroadcastReceiver</code>s with an optional permission.</p>
* @param {Titanium.Android.Intent} intent
<p>Description of the broadcast.</p>
* @param {String} receiverPermission (optional)
<p>Name of the permission that the receiver should hold in order to receive the broadcast.</p>
* @platform android 3.2.0
*/
/**
* @method getActionBar
* <p>Gets the value of the {@link Titanium.Android.Activity#property-actionBar} property.</p>
* @returns {Titanium.Android.ActionBar}
*/
/**
* @method getIntent
* <p>Gets the value of the {@link Titanium.Android.Activity#property-intent} property.</p>
* @returns {Titanium.Android.Intent}
*/
/**
* @method getOnCreate
* <p>Gets the value of the {@link Titanium.Android.Activity#property-onCreate} property.</p>
* @returns {Callback<Object>}
* @platform android 3.4.0
*/
/**
* @method setOnCreate
* <p>Sets the value of the {@link Titanium.Android.Activity#property-onCreate} property.</p>
* @param {Callback<Object>} onCreate
<p>New value for the property.</p>
* @platform android 3.4.0
*/
/**
* @method getOnCreateOptionsMenu
* <p>Gets the value of the {@link Titanium.Android.Activity#property-onCreateOptionsMenu} property.</p>
* @returns {Callback<Object>}
*/
/**
* @method setOnCreateOptionsMenu
* <p>Sets the value of the {@link Titanium.Android.Activity#property-onCreateOptionsMenu} property.</p>
* @param {Callback<Object>} onCreateOptionsMenu
<p>New value for the property.</p>
*/
/**
* @method getOnDestroy
* <p>Gets the value of the {@link Titanium.Android.Activity#property-onDestroy} property.</p>
* @returns {Callback<Object>}
* @platform android 3.4.0
*/
/**
* @method setOnDestroy
* <p>Sets the value of the {@link Titanium.Android.Activity#property-onDestroy} property.</p>
* @param {Callback<Object>} onDestroy
<p>New value for the property.</p>
* @platform android 3.4.0
*/
/**
* @method getOnPause
* <p>Gets the value of the {@link Titanium.Android.Activity#property-onPause} property.</p>
* @returns {Callback<Object>}
* @platform android 3.4.0
*/
/**
* @method setOnPause
* <p>Sets the value of the {@link Titanium.Android.Activity#property-onPause} property.</p>
* @param {Callback<Object>} onPause
<p>New value for the property.</p>
* @platform android 3.4.0
*/
/**
* @method getOnPrepareOptionsMenu
* <p>Gets the value of the {@link Titanium.Android.Activity#property-onPrepareOptionsMenu} property.</p>
* @returns {Callback<Object>}
*/
/**
* @method setOnPrepareOptionsMenu
* <p>Sets the value of the {@link Titanium.Android.Activity#property-onPrepareOptionsMenu} property.</p>
* @param {Callback<Object>} onPrepareOptionsMenu
<p>New value for the property.</p>
*/
/**
* @method getOnRestart
* <p>Gets the value of the {@link Titanium.Android.Activity#property-onRestart} property.</p>
* @returns {Callback<Object>}
* @platform android 3.4.0
*/
/**
* @method setOnRestart
* <p>Sets the value of the {@link Titanium.Android.Activity#property-onRestart} property.</p>
* @param {Callback<Object>} onRestart
<p>New value for the property.</p>
* @platform android 3.4.0
*/
/**
* @method getOnResume
* <p>Gets the value of the {@link Titanium.Android.Activity#property-onResume} property.</p>
* @returns {Callback<Object>}
* @platform android 3.4.0
*/
/**
* @method setOnResume
* <p>Sets the value of the {@link Titanium.Android.Activity#property-onResume} property.</p>
* @param {Callback<Object>} onResume
<p>New value for the property.</p>
* @platform android 3.4.0
*/
/**
* @method getOnStart
* <p>Gets the value of the {@link Titanium.Android.Activity#property-onStart} property.</p>
* @returns {Callback<Object>}
* @platform android 3.4.0
*/
/**
* @method setOnStart
* <p>Sets the value of the {@link Titanium.Android.Activity#property-onStart} property.</p>
* @param {Callback<Object>} onStart
<p>New value for the property.</p>
* @platform android 3.4.0
*/
/**
* @method getOnStop
* <p>Gets the value of the {@link Titanium.Android.Activity#property-onStop} property.</p>
* @returns {Callback<Object>}
* @platform android 3.4.0
*/
/**
* @method setOnStop
* <p>Sets the value of the {@link Titanium.Android.Activity#property-onStop} property.</p>
* @param {Callback<Object>} onStop
<p>New value for the property.</p>
* @platform android 3.4.0
*/
/**
* @property actionBar
* @type Titanium.Android.ActionBar
* @readonly
* <p>The action bar for this activity.</p>
* @description <p>See also: <a href="http://developer.android.com/guide/topics/ui/actionbar.html">Action Bar</a> in
the Android Developer Reference.</p>
*/
/**
* @property intent
* @type Titanium.Android.Intent
* @readonly
* <p>The <code>Intent</code> that was used to start this Activity.</p>
*/
/**
* @property onCreate
* @type Callback<Object>
* <p>Callback function called when the Android activity is created.</p>
* @platform android 3.4.0
*/
/**
* @property onCreateOptionsMenu
* @type Callback<Object>
* <p>Callback function called to initially create an Android options menu
for this Activity when the user presses the <strong>Menu</strong> button.</p>
* @description <p>See the menu examples in {@link Titanium.Android.Menu}.</p>
<p>See also:
<a href="http://developer.android.com/guide/topics/ui/menus.html#options-menu">Creating an Options Menu</a>
in the Android Developer's Guide.</p>
*/
/**
* @property onDestroy
* @type Callback<Object>
* <p>Callback function called when the Android activity is destroyed.</p>
* @platform android 3.4.0
*/
/**
* @property onPause
* @type Callback<Object>
* <p>Callback function called when the Android activity is paused.</p>
* @platform android 3.4.0
*/
/**
* @property onPrepareOptionsMenu
* @type Callback<Object>
* <p>Callback function called to prepare an options menu for display when the user presses
the <strong>Menu</strong> button. </p>
* @description <p>See the menu examples in {@link Titanium.Android.Menu}.</p>
<p>See also:
<a href="http://developer.android.com/guide/topics/ui/menus.html#options-menu">Creating an Options Menu</a>
in the Android Developer's Guide.</p>
*/
/**
* @property onRestart
* @type Callback<Object>
* <p>Callback function called when the Android activity is restarted.</p>
* @platform android 3.4.0
*/
/**
* @property onResume
* @type Callback<Object>
* <p>Callback function called when the Android activity is resumed.</p>
* @platform android 3.4.0
*/
/**
* @property onStart
* @type Callback<Object>
* <p>Callback function called when the Android activity is started.</p>
* @platform android 3.4.0
*/
/**
* @property onStop
* @type Callback<Object>
* <p>Callback function called when the Android activity is stopped.</p>
* @platform android 3.4.0
*/
/**
* @property requestedOrientation
* @type Number
* @writeonly
* <p>Specifies a specific orientation for this activity.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_BEHIND}
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_LANDSCAPE}
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_NOSENSOR}
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_PORTRAIT}
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_SENSOR}
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_UNSPECIFIED}
<li> {@link Titanium.Android#property-SCREEN_ORIENTATION_USER}
</ul></p>
*/
/**
* @class ActivityResult
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Activity.yml
* <p>Simple object passed to the
{@link Titanium.Android.Activity#method-startActivityForResult startActivityForResult} callback.</p>
*/
/**
* @property requestCode
* @type Number
* <p>Unique, automatically generated integer request code.</p>
*/
/**
* @property resultCode
* @type Number
* <p>Integer result code that the started activity passed to
{@link Titanium.Android.Activity#method-setResult setResult}.</p>
*/
/**
* @property intent
* @type Titanium.Android.Intent
* <p>Intent that can contain data returned to the caller. Data can be attached to
the intent as "extras").</p>
*/
/**
* @class Titanium.Android
* @platform android 1.5
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Android.yml
* <p>The top-level Android module.</p>
* @description <p>The Android module allows the application to manage various Android components.</p>
<h4>Action Bar</h4>
<p>An action bar is a UI feature that identifies the application and user location, and
provides user actions and navigation modes.</p>
<p>The Titanium SDK lets you customize the look of the action bar and add action items.
Action items are added using the {@link Titanium.Android.Menu} API.</p>
<p>For more information about the action bar, see the
{@link Titanium.Android.ActionBar Titanium.Android.ActionBar API reference}.</p>
<h4>Activities</h4>
<p>An Android application is made up of one or more activities. Each activity represents a single screen
with a user interface.</p>
<p>In Titanium, each <code>Window</code> or <code>TabGroup</code> has its own activity. The application
can access the activity of a <code>Window</code> and <code>TabGroup</code> object and monitor its lifecycle events.
Titanium also lets you launch new activities by creating intents to launch them.
See the "Intents" section below.</p>
<p>For more information about activities, see the
{@link Titanium.Android.Activity Titanium.Android.Activity API reference}.</p>
<h4>Broadcast Intents and Receivers</h4>
<p>Broadcast Intents allow your application to send out a message to any application that sets up
a Broadcast Receiver to listen to it. Your application can also register Broadcast Receivers
to listen to system events sent by the Android OS, such as low battery warnings or airplane
mode changes.</p>
<p>For more information about broadcasts, see the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Broadcast_Intents_and_Receivers">Android Broadcast Intents and Receivers guide</a>
and {@link Titanium.Android.BroadcastReceiver Titanium.Android.BroadcastReceiver API reference}.</p>
<h4>Intents</h4>
<p>Intents are message objects that specify actions to perform that start either activities,
broadcasts or services.</p>
<p>For more information about intents, see the
{@link Titanium.Android.Intent Titanium.Android.Intent API reference}.</p>
<h4>Intent Filters</h4>
<p>Intent Filters advertise to the Android OS that your application handles certain actions and
data types. For example, when another application wants to share an image or text, your application
can define intent filters to let Android know your application can handle those data types.</p>
<p>For more information about intent filters, see the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Intent_Filters">Android Intent Filters guide</a>.</p>
<h4>Notifications</h4>
<p>Notifications alert the user that something is happening to your application while it is
in the background. Notifications appear in the notification drawer until the user
clears them and on the lock screen for devices running Android 5.0 or greater.
Note that the user can filter or turn notifications on and off from <strong>Settings</strong>.
For more information about notifications, see the
{@link Titanium.Android.Notification Titanium.Android.Notification API reference}.</p>
<p>For Android toast notifications (pop-up notifications sent while the application is in the
foreground), see {@link Titanium.UI.Notification}.</p>
<h4>Options Menu</h4>
<p>The options menu is a feature of older Android devices (prior to Android 3.0 (API 11)), and has been
replaced by the action bar. The options menu is accessed by pressing the <strong>Menu</strong> and presents
a pop-up menu of options the user can execute.</p>
<p>The <code>Titanium.Android.Menu</code> API is used to construct both the options menu and action items for
the action bar.</p>
<p>For more information about the options menu, see the
{@link Titanium.Android.Menu Titanium.Android.Menu API reference}.</p>
<h4>Services</h4>
<p>A service is a component started by an application that runs in the background. The service
does not have any application UI associated with it, so the user does not directly interact
with it, only your application.</p>
<p>The Titanium SDK gives you the ability to write your own Android Services using JavaScript.
The service executes your JavaScript code at intervals you specify. Note that the service
may stop running if the application is killed.</p>
<p>For more information about services, see the
{@link Titanium.Android.Service Titanium.Android.Service API reference}.</p>
<h4>Permissions</h4>
<p>Starting from Android 6.0 (API level 23), users need to grant certain permissions to apps while the
app is running. You can read it more <a href="https://developer.android.com/training/permissions/requesting.html">here</a>.</p>
<p>In Titanium SDK, to support this, we have the method {@link Titanium.Android#method-requestPermissions} starting
from Titanium SDK 5.4.0. This is used to requests any permission you may need. An example of
using this is shown below.</p>
<pre><code>var cameraPermission = "android.permission.CAMERA";
var storagePermission = "android.permission.READ_EXTERNAL_STORAGE";
var hasCameraPermission = Ti.Android.hasPermission(cameraPermission);
var hasStoragePermission = Ti.Android.hasPermission(storagePermission);
var permissionsToRequest = [];
if (!hasCameraPermission) {
permissionsToRequest.push(cameraPermission);
}
if (!hasStoragePermission) {
permissionsToRequest.push(storagePermission);
}
if (permissionsToRequest.length > 0) {
Ti.Android.requestPermissions(permissionsToRequest, function(e) {
if (e.success) {
Ti.API.info("SUCCESS");
} else {
Ti.API.info("ERROR: " + e.error);
}
});
}
</code></pre>
*/
/**
* @method createIntentChooser
* <p>Creates an activity chooser intent, used to allow the user to select a target activity
for an intent.</p>
* @description <p>Use this method when the user wants to take an action that could use any one of a
number of applications. For example, when sending a plain text message, the user
may choose to send a text message, send an email, or post to a social network.</p>
<p>You pass in an {@link Titanium.Android.Intent Intent} representing the action being taken,
and a title for the chooser.</p>
<p>The method returns another intent, representing the chooser, which can be used to
start an activity. See the code example for details on how to display the chooser.</p>
<p>For more information, see the official Android documentation for
<a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_CHOOSER">Intent.ACTION_CHOOSER</a></p>
* <h3>Examples</h3>
<h4>Using a Chooser</h4>
<p>The following example uses an activity chooser to send a plain text message.</p>
<pre><code>var intent = Ti.Android.createIntent( {
action: Ti.Android.ACTION_SEND,
type: 'text/plain'
});
intent.putExtra(Ti.Android.EXTRA_SUBJECT, "This is the subject.");
intent.putExtra(Ti.Android.EXTRA_TEXT, "This is some text to send.")
var chooser = Ti.Android.createIntentChooser(intent, "Send Message");
var activity = Ti.Android.currentActivity.startActivity(chooser);
</code></pre>
* @param {Titanium.Android.Intent} intent
<p>The intent to display a chooser for.</p>
* @param {String} title
<p>Title to display on the chooser.</p>
* @returns {Titanium.Android.Intent}
*/
/**
* @method createPendingIntent
* <p>Creates a {@link Titanium.Android.PendingIntent PendingIntent} to be used inside a
{@link Titanium.Android.Notification Notification}.</p>
* @description <p>If <code>FLAG_NO_CREATE</code> is specified and no matching pending intent exists, returns
<code>null</code>.</p>
* @param {Dictionary<Titanium.Android.PendingIntent>} parameters (optional)
<p>Properties to set on the new object, including any defined by
{@link Titanium.Android.PendingIntent}, except those marked not-creation or read-only.</p>
* @returns {Titanium.Android.PendingIntent}
*/
/**
* @method createService
* <p>Create a {@link Titanium.Android.Service} so you can start/stop it and listen for events from it.</p>
* @param {Titanium.Android.Intent} intent
<p>An <code>Intent</code> created with {@link Titanium.Android#method-createServiceIntent createServiceIntent},
which specifies the service to be instantiated.</p>
* @returns {Titanium.Android.Service}
*/
/**
* @method createServiceIntent
* <p>Create an <code>Intent</code> to be used to start a service.</p>
* @param {ServiceIntentOptions} options
<p>Options for the Service.</p>
* @returns {Titanium.Android.Intent}
*/
/**
* @method hasPermission
* <p>Returns <code>true</code> if the app has permission access.</p>
* @param {String} permission
<p>The permission to check for access. This can be any of the constants listed here
with dangerous protection level <a href="https://developer.android.com/reference/android/Manifest.permission.html">here</a>.
For example, <code>android.permission.WRITE_CONTACTS</code>. </p>
* @returns {Boolean}
* @platform android 5.4.0
*/
/**
* @method requestPermissions
* <p>Request for permission access.</p>
* @param {Array<String>} permissions
<p>The permission(s) to request for access. This can be any of the constants listed here
with dangerous protection level <a href="https://developer.android.com/reference/android/Manifest.permission.html">here</a>.
Normal protection permissions are automatically enabled if they are included in the manifest. An example of a
dangerous protection permission would be <code>android.permission.WRITE_CONTACTS</code>.
The requested permission(s) MUST also be included in the Android Manifest.</p>
<p>Besides this, there are also requestPermission methods that are ready for commonly used situations. These methods are
{@link Titanium.Calendar#method-requestCalendarPermissions}, {@link Titanium.Contacts#method-requestContactsPermissions},
{@link Titanium.Filesystem#method-requestStoragePermissions}, {@link Titanium.Geolocation#method-requestLocationPermissions} and {@link Titanium.Media#method-requestCameraPermissions}.</p>
* @param {Callback<RequestPermissionAccessResult>} callback (optional)
<p>Function to call upon user decision to grant access.</p>
* @platform android 5.4.0
*/
/**
* @method isServiceRunning
* <p>Check on state of Service.</p>
* @param {Titanium.Android.Intent} intent
<p>An <code>Intent</code> created with {@link Titanium.Android#method-createServiceIntent createServiceIntent},
which specifies the service to check.</p>
* @returns {Boolean}
*/
/**
* @method registerBroadcastReceiver
* <p>Registers broadcast receiver for the given actions</p>
* @param {Titanium.Android.BroadcastReceiver} broadcastReceiver
<p>The broadcast receiver to register and handle the broadcast</p>
* @param {Array<String>} actions
<p>The actions that the broadcast reciever will handle</p>
* @platform android 3.1.0
*/
/**
* @method unregisterBroadcastReceiver
* <p>Unregisters a broadcast receiver</p>
* @param {Titanium.Android.BroadcastReceiver} broadcastReceiver
<p>The broadcast receiver to unregister.</p>
* @platform android 3.1.0
*/
/**
* @method startService
* <p>Starts a simple service.</p>
* @param {Titanium.Android.Intent} intent
<p>An <code>Intent</code> created with {@link Titanium.Android#method-createServiceIntent createServiceIntent},
which specifies the service to start.</p>
*/
/**
* @method stopService
* <p>Stop a simple service that was started with <code>startService</code>.</p>
* @param {Titanium.Android.Intent} intent
<p>An <code>Intent</code> created with {@link Titanium.Android#method-createServiceIntent createServiceIntent},
which specifies the service to stop.</p>
*/
/**
* @method createBroadcastIntent
* <p>Create an <code>Intent</code> to be used in a broadcast.</p>
* @param {Dictionary<Titanium.Android.Intent>} parameters (optional)
<p>Properties to set on the new object, including any defined by
{@link Titanium.Android.Intent}, except those marked not-creation or read-only.</p>
* @returns {Titanium.Android.Intent}
* @platform android 3.2.0
*/
/**
* @method createBigPictureStyle
* <p>Creates and returns an instance of {@link Titanium.Android.BigPictureStyle}.</p>
* @param {Dictionary<Titanium.Android.BigPictureStyle>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Android.BigPictureStyle} except those marked not-creation or read-only.</p>
* @returns {Titanium.Android.BigPictureStyle}
* @platform android 5.4.0
*/
/**
* @method createBigTextStyle
* <p>Creates and returns an instance of {@link Titanium.Android.BigTextStyle}.</p>
* @param {Dictionary<Titanium.Android.BigTextStyle>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Android.BigTextStyle} except those marked not-creation or read-only.</p>
* @returns {Titanium.Android.BigTextStyle}
* @platform android 5.4.0
*/
/**
* @method createBroadcastReceiver
* <p>Creates and returns an instance of {@link Titanium.Android.BroadcastReceiver}.</p>
* @param {Dictionary<Titanium.Android.BroadcastReceiver>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Android.BroadcastReceiver} except those marked not-creation or read-only.</p>
* @returns {Titanium.Android.BroadcastReceiver}
* @platform android 3.1.0
*/
/**
* @method createIntent
* <p>Creates and returns an instance of {@link Titanium.Android.Intent}.</p>
* @param {Dictionary<Titanium.Android.Intent>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Android.Intent} except those marked not-creation or read-only.</p>
* @returns {Titanium.Android.Intent}
*/
/**
* @method createNotification
* <p>Creates and returns an instance of {@link Titanium.Android.Notification}.</p>
* @param {Dictionary<Titanium.Android.Notification>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Android.Notification} except those marked not-creation or read-only.</p>
* @returns {Titanium.Android.Notification}
*/
/**
* @method createRemoteViews
* <p>Creates and returns an instance of {@link Titanium.Android.RemoteViews}.</p>
* @param {Dictionary<Titanium.Android.RemoteViews>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Android.RemoteViews} except those marked not-creation or read-only.</p>
* @returns {Titanium.Android.RemoteViews}
* @platform android 1.6
*/
/**
* @property ACTION_AIRPLANE_MODE_CHANGED
* @type String
* @readonly
* <p>User switched airplane mode on or off.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_AIRPLANE_MODE_CHANGED">Intent.ACTION_AIRPLANE_MODE_CHANGED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_ALL_APPS
* @type String
* @readonly
* <p>List all applications.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ALL_APPS">Intent.ACTION_ALL_APPS in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_ANSWER
* @type String
* @readonly
* <p>Handle an incoming phone call.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ANSWER">Intent.ACTION_ANSWER in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_ATTACH_DATA
* @type String
* @readonly
* <p>Used to indicate that the data is an attachment.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ATTACH_DATA">Intent.ACTION_ATTACH_DATA in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_BATTERY_CHANGED
* @type String
* @readonly
* <p>Listen to battery state change status.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>Note that Titanium exposes battery monitoring using the {@link Titanium.Platform} API.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_BATTERY_CHANGED">Intent.ACTION_BATTERY_CHANGED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_BATTERY_LOW
* @type String
* @readonly
* <p>Indicates low battery condition on the device.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>Note that Titanium exposes battery monitoring using the {@link Titanium.Platform} API.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_BATTERY_LOW">Intent.ACTION_BATTERY_LOW in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_BATTERY_OKAY
* @type String
* @readonly
* <p>Inidicates the battery is now okay after being low.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>Note that Titanium exposes battery monitoring using the {@link Titanium.Platform} API.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_BATTERY_OKAY">Intent.ACTION_BATTERY_OKAY in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_BOOT_COMPLETED
* @type String
* @readonly
* <p>Indicates the system has finished booting.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>The application needs to also set the <code>android.permission.RECEIVE_BOOT_COMPLETED</code> permission
in the Android manifest section of the <code>tiapp.xml</code> file.</p>
<pre><code><ti:app>
<android>
<manifest>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
</manifest>
</android>
</ti:app>
</code></pre>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_BOOT_COMPLETED">Intent.ACTION_BOOT_COMPLETED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_BUG_REPORT
* @type String
* @readonly
* <p>Show activity for reporting a bug.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_BUG_REPORT">Intent.ACTION_BUG_REPORT in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_CALL
* @type String
* @readonly
* <p>Perform a call to someone specified by the <code>data</code> property.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_CALL">Intent.ACTION_CALL in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_CALL_BUTTON
* @type String
* @readonly
* <p>User pressed the call button.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_CALL_BUTTON">Intent.ACTION_CALL_BUTTON in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_CAMERA_BUTTON
* @type String
* @readonly
* <p>The camera button was pressed.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_CAMERA_BUTTON">Intent.ACTION_CAMERA_BUTTON in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_CHOOSER
* @type String
* @readonly
* <p>Display an activity chooser.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an Activity Chooser.</p>
<p>You can also create an activity chooser using the {@link Titanium.Android#method-createIntentChooser} method.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_CHOOSER">Intent.ACTION_CHOOSER in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_CLOSE_SYSTEM_DIALOGS
* @type String
* @readonly
* <p>User dismissed a temporary system dialog, such as the notification drawer or recent-app drawer.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_CLOSE_SYSTEM_DIALOGS">Intent.ACTION_CLOSE_SYSTEM_DIALOGS in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_CONFIGURATION_CHANGED
* @type String
* @readonly
* <p>The device's configuration changed.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_CONFIGURATION_CHANGED">Intent.ACTION_CONFIGURATION_CHANGED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_CREATE_SHORTCUT
* @type String
* @readonly
* <p>Create a shortcut.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_CREATE_SHORTCUT">Intent.ACTION_CREATE_SHORTCUT in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_DATE_CHANGED
* @type String
* @readonly
* <p>Date changed.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_DATE_CHANGED">Intent.ACTION_DATE_CHANGED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_DEFAULT
* @type String
* @readonly
* <p>Default action, which is <code>Titanium.Android.ACTION_VIEW</code></p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_DEFAULT">Intent.ACTION_DEFAULT in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_DELETE
* @type String
* @readonly
* <p>Delete the data specified by the Intent's <code>data</code> property.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_DELETE">Intent.ACTION_DELETE in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_DEVICE_STORAGE_LOW
* @type String
* @readonly
* <p>Indicates a low memory condition on the device.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_DEVICE_STORAGE_LOW">Intent.ACTION_DEVICE_STORAGE_LOW in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_DIAL
* @type String
* @readonly
* <p>Dial a number specified by the Intent's <code>data</code> property.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_DIAL">Intent.ACTION_DIAL in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_EDIT
* @type String
* @readonly
* <p>Provide editable access to the data specified by the Intent's <code>data</code> property.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_EDIT">Intent.ACTION_EDIT in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_GET_CONTENT
* @type String
* @readonly
* <p>Allow the user to select a particular kind of data specified by the Intent's <code>type</code> property.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_GET_CONTENT">Intent.ACTION_GET_CONTENT in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_GTALK_SERVICE_CONNECTED
* @type String
* @readonly
* <p>GTalk connection has been established.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_GTALK_SERVICE_CONNECTED">Intent.ACTION_GTALK_SERVICE_CONNECTED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_GTALK_SERVICE_DISCONNECTED
* @type String
* @readonly
* <p>GTalk connections has been disconnected.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_GTALK_SERVICE_DISCONNECTED">Intent.ACTION_GTALK_SERVICE_DISCONNECTED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_HEADSET_PLUG
* @type String
* @readonly
* <p>A wired headset has been plugged in or unplugged.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_HEADSET_PLUG">Intent.ACTION_HEADSET_PLUG in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_INPUT_METHOD_CHANGED
* @type String
* @readonly
* <p>An input method has been changed.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_INPUT_METHOD_CHANGED">Intent.ACTION_INPUT_METHOD_CHANGED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_INSERT
* @type String
* @readonly
* <p>Insert an empty item into the given container.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_INSERT">Intent.ACTION_INSERT in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_INSERT_OR_EDIT
* @type String
* @readonly
* <p>Pick an existing item or insert an empty item, then edit it.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_INSERT_OR_EDIT">Intent.ACTION_INSERT_OR_EDIT in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MAIN
* @type String
* @readonly
* <p>Start as the main entry point.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MAIN">Intent.ACTION_MAIN in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MANAGE_PACKAGE_STORAGE
* @type String
* @readonly
* <p>Indicates low memory condition notification acknowledged by user and package management should be started.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MANAGE_PACKAGE_STORAGE">Intent.ACTION_MANAGE_PACKAGE_STORAGE in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_BAD_REMOVAL
* @type String
* @readonly
* <p>External media was removed from SD card slot, but mount point was not unmounted.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_BAD_REMOVAL">Intent.ACTION_MEDIA_BAD_REMOVAL in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_BUTTON
* @type String
* @readonly
* <p>The media button was pressed.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_BUTTON">Intent.ACTION_MEDIA_BUTTON in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_CHECKING
* @type String
* @readonly
* <p>External media is present and being disk-checked</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>Applications should close all files they have open within the mount point when they receive this intent.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_CHECKING">Intent.ACTION_MEDIA_CHECKING in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_EJECT
* @type String
* @readonly
* <p>User has expressed the desire to remove the external storage media.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_EJECT">Intent.ACTION_MEDIA_EJECT in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_MOUNTED
* @type String
* @readonly
* <p>External media is present and mounted at its mount point.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_MOUNTED">Intent.ACTION_MEDIA_MOUNTED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_NOFS
* @type String
* @readonly
* <p>External media is present, but is using an incompatible filesystem or is blank.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_NOFS">Intent.ACTION_MEDIA_NOFS in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_REMOVED
* @type String
* @readonly
* <p>External media has been removed.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_REMOVED">Intent.ACTION_MEDIA_REMOVED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_SCANNER_FINISHED
* @type String
* @readonly
* <p>The media scanner has finished scanning a directory.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_SCANNER_FINISHED">Intent.ACTION_MEDIA_SCANNER_FINISHED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_SCANNER_SCAN_FILE
* @type String
* @readonly
* <p>Request the media scanner to scan a file and add it to the media database.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_SCANNER_SCAN_FILE">Intent.ACTION_MEDIA_SCANNER_SCAN_FILE in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_SCANNER_STARTED
* @type String
* @readonly
* <p>The media scanner has started scanning a directory.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_SCANNER_STARTED">Intent.ACTION_MEDIA_SCANNER_STARTED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_SHARED
* @type String
* @readonly
* <p>External media is unmounted because it is being shared via USB mass storage.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_SHARED">Intent.ACTION_MEDIA_SHARED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_UNMOUNTABLE
* @type String
* @readonly
* <p>Corresponds to the Android <code>Intent.ACTION_MEDIA_UNMOUNTABLE</code> constant.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_UNMOUNTABLE">Intent.ACTION_MEDIA_UNMOUNTABLE in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_MEDIA_UNMOUNTED
* @type String
* @readonly
* <p>External media is present, but not mounted at its mount point.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_UNMOUNTED">Intent.ACTION_MEDIA_UNMOUNTED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_NEW_OUTGOING_CALL
* @type String
* @readonly
* <p>An outgoing call is about to be placed.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>The application needs to also set the <code>android.permission.NEW_OUTGOING_CALL</code> permission
in the Android manifest section of the <code>tiapp.xml</code> file.</p>
<pre><code><ti:app>
<android>
<manifest>
<uses-permission android:name="android.permission.NEW_OUTGOING_CALL" />
</manifest>
</android>
</ti:app>
</code></pre>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_NEW_OUTGOING_CALL">Intent.ACTION_NEW_OUTGOING_CALL in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_PACKAGE_ADDED
* @type String
* @readonly
* <p>A new application package has been installed on the device.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_ADDED">Intent.ACTION_PACKAGE_ADDED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_PACKAGE_CHANGED
* @type String
* @readonly
* <p>An existing application package has been changed.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_CHANGED">Intent.ACTION_PACKAGE_CHANGED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_PACKAGE_DATA_CLEARED
* @type String
* @readonly
* <p>The user has cleared the data of a package.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_DATA_CLEARED">Intent.ACTION_PACKAGE_DATA_CLEARED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_PACKAGE_INSTALL
* @type String
* @readonly
* <p>Trigger the download and eventual installation of a package.</p>
* <p> <b>Requires:</b>
Android 4.0 and earlier
</p>
* @description <p><strong>Note:</strong> this constant has never been used by Android.</p>
<p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_INSTALL">Intent.ACTION_PACKAGE_INSTALL in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_PACKAGE_REMOVED
* @type String
* @readonly
* <p>An existing application package has been removed from the device.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_REMOVED">Intent.ACTION_PACKAGE_REMOVED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_PACKAGE_REPLACED
* @type String
* @readonly
* <p>A new version of an application package has been installed, replacing an existing version that was previously installed.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_REPLACED">Intent.ACTION_PACKAGE_REPLACED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_PACKAGE_RESTARTED
* @type String
* @readonly
* <p>The user has restarted a package, and all of its processes have been killed.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_RESTARTED">Intent.ACTION_PACKAGE_RESTARTED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_PICK
* @type String
* @readonly
* <p>Pick an item from the directory indicated by the Intent's <code>data</code> property.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_PICK">Intent.ACTION_PICK in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_PICK_ACTIVITY
* @type String
* @readonly
* <p>Pick an activity given an intent.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>Add the activity intent using the intent's <code>putExtra()</code> method. Pass the method
<code>Titanium.Android.EXTRA_INTENT</code> as the <code>name</code> parameter and the activity intent
as the <code>data</code> parameter.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_PICK_ACTIVITY">Intent.ACTION_PICK_ACTIVITY in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_POWER_CONNECTED
* @type String
* @readonly
* <p>External power has been connected to the device.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_CONNECTED">Intent.ACTION_POWER_CONNECTED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_POWER_DISCONNECTED
* @type String
* @readonly
* <p>External power has been disconnected from the device.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_DISCONNECTED">Intent.ACTION_POWER_DISCONNECTED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_POWER_USAGE_SUMMARY
* @type String
* @readonly
* <p>Show power usage information to the user.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_USAGE_SUMMARY">Intent.ACTION_POWER_USAGE_SUMMARY in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_PROVIDER_CHANGED
* @type String
* @readonly
* <p>Content provider published new events or items.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_PROVIDER_CHANGED">Intent.ACTION_PROVIDER_CHANGED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_REBOOT
* @type String
* @readonly
* <p>Device rebooted.</p>
* @description <p><strong>Only used by the system.</strong></p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_REBOOT">Intent.ACTION_REBOOT in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_RUN
* @type String
* @readonly
* <p>Run the data.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_RUN">Intent.ACTION_RUN in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_SCREEN_OFF
* @type String
* @readonly
* <p>Sent when the device goes to sleep and becomes non-interactive.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_SCREEN_OFF">Intent.ACTION_SCREEN_OFF in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_SCREEN_ON
* @type String
* @readonly
* <p>Sent when the device wakes up and becomes interactive.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_SCREEN_ON">Intent.ACTION_SCREEN_ON in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_SEARCH
* @type String
* @readonly
* <p>Perform a search.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_SEARCH">Intent.ACTION_SEARCH in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_SEARCH_LONG_PRESS
* @type String
* @readonly
* <p>Start action associated with long pressing on the search key.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_SEARCH_LONG_PRESS">Intent.ACTION_SEARCH_LONG_PRESS in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_SEND
* @type String
* @readonly
* <p>Deliver data to another activity.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_SEND">Intent.ACTION_SEND in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_SENDTO
* @type String
* @readonly
* <p>Deliver data to the recipient specified by the Intent's <code>data</code> property.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_SENDTO">Intent.ACTION_SENDTO in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_SEND_MULTIPLE
* @type String
* @readonly
* <p>Deliver multiple data to another activity.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_SEND_MULTIPLE">Intent.ACTION_SEND_MULTIPLE in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_SET_WALLPAPER
* @type String
* @readonly
* <p>Show settings for choosing the system wallpaper.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_SET_WALLPAPER">Intent.ACTION_SET_WALLPAPER in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_SHUTDOWN
* @type String
* @readonly
* <p>Device is shutting down.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_SHUTDOWN">Intent.ACTION_SHUTDOWN in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_SYNC
* @type String
* @readonly
* <p>Perform data synchronization.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_SYNC">Intent.ACTION_SYNC in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_SYSTEM_TUTORIAL
* @type String
* @readonly
* <p>Start the platform-defined tutorial.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_SYSTEM_TUTORIAL">Intent.ACTION_SYSTEM_TUTORIAL in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_TIME_CHANGED
* @type String
* @readonly
* <p>The time was set.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_TIME_CHANGED">Intent.ACTION_TIME_CHANGED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_TIME_TICK
* @type String
* @readonly
* <p>The current time changed. Sent every minute.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_TIME_TICK">Intent.ACTION_TIME_TICK in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_UID_REMOVED
* @type String
* @readonly
* <p>A user ID was removed from the system.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_UID_REMOVED">Intent.ACTION_UID_REMOVED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_UMS_CONNECTED
* @type String
* @readonly
* <p>The device has entered USB Mass Storage mode.</p>
* <p> <b>Requires:</b>
Android 4.0 and earlier
</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_UMS_CONNECTED">Intent.ACTION_UMS_CONNECTED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_UMS_DISCONNECTED
* @type String
* @readonly
* <p>The device has exited USB Mass Storage mode.</p>
* <p> <b>Requires:</b>
Android 4.0 and earlier
</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_UMS_DISCONNECTED">Intent.ACTION_UMS_DISCONNECTED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_USER_PRESENT
* @type String
* @readonly
* <p>Sent when the user is present after device wakes up.</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_USER_PRESENT">Intent.ACTION_USER_PRESENT in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_VIEW
* @type String
* @readonly
* <p>Display data to the user.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW">Intent.ACTION_VIEW in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_VOICE_COMMAND
* @type String
* @readonly
* <p>Start voice command.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_VOICE_COMMAND">Intent.ACTION_VOICE_COMMAND in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_WALLPAPER_CHANGED
* @type String
* @readonly
* <p>The current system wallpaper has changed.</p>
* <p> <b>Requires:</b>
Android 4.1 and earlier
</p>
* @description <p>Pass to the {@link Titanium.Android#method-registerBroadcastReceiver} method to listen to the system broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_WALLPAPER_CHANGED">Intent.ACTION_WALLPAPER_CHANGED in the Android API Reference</a>.</p>
*/
/**
* @property ACTION_WEB_SEARCH
* @type String
* @readonly
* <p>Perform a web search.</p>
* @description <p>Use with the {@link Titanium.Android.Intent#property-action} property to create an <strong>Activity Intent</strong>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_WEB_SEARCH">Intent.ACTION_WEB_SEARCH in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_ALTERNATIVE
* @type String
* @readonly
* <p>Set if the activity should be considered as an alternative action to the data the user is currently viewing.</p>
* @description <p>Pass to the Intent's {@link Titanium.Android.Intent#method-addCategory addCategory()} method to set a category.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_ALTERNATIVE">Intent.CATEGORY_ALTERNATIVE in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_BROWSABLE
* @type String
* @readonly
* <p>Activity can browse the Internet.</p>
* @description <p>Pass to the Intent's {@link Titanium.Android.Intent#method-addCategory addCategory()} method to set a category.</p>
<p>The <code>Titanium.Android.ACTION_MAIN</code> constant must also be set in the intent's <code>action</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_BROWSABLE">Intent.CATEGORY_BROWSABLE in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_DEFAULT
* @type String
* @readonly
* <p>Activity should be used as the default action to perform on a piece of data.</p>
* @description <p>Pass to the Intent's {@link Titanium.Android.Intent#method-addCategory addCategory()} method to set a category.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_DEFAULT">Intent.CATEGORY_DEFAULT in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_DEVELOPMENT_PREFERENCE
* @type String
* @readonly
* <p>Activity is in the development preference panel.</p>
* @description <p>Pass to the Intent's {@link Titanium.Android.Intent#method-addCategory addCategory()} method to set a category.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_DEVELOPMENT_PREFERENCE">Intent.CATEGORY_DEVELOPMENT_PREFERENCE in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_EMBED
* @type String
* @readonly
* <p>Activity can run inside a parent activity.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_EMBED">Intent.CATEGORY_EMBED in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST
* @type String
* @readonly
* <p>To be used as test code for framework instrumentation tests.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST">Intent.CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_HOME
* @type String
* @readonly
* <p>Home activity, the first activity that is displayed when the device boots.</p>
* @description <p>Pass to the Intent's {@link Titanium.Android.Intent#method-addCategory addCategory()} method to set a category.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_HOME">Intent.CATEGORY_HOME in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_INFO
* @type String
* @readonly
* <p>Provides information about the package it is in.</p>
* @description <p>Pass to the Intent's {@link Titanium.Android.Intent#method-addCategory addCategory()} method to set a category.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_INFO">Intent.CATEGORY_INFO in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_LAUNCHER
* @type String
* @readonly
* <p>Activity is in the device's launcher.</p>
* @description <p>Pass to the Intent's {@link Titanium.Android.Intent#method-addCategory addCategory()} method to set a category.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_LAUNCHER">Intent.CATEGORY_LAUNCHER in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_MONKEY
* @type String
* @readonly
* <p>This activity may be exercised by the monkey or other automated test tools.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_MONKEY">Intent.CATEGORY_MONKEY in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_OPENABLE
* @type String
* @readonly
* <p>Activity can open raw <code>file://</code> or <code>scheme://</code> URIs.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_OPENABLE">Intent.CATEGORY_OPENABLE in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_PREFERENCE
* @type String
* @readonly
* <p>This activity is a preference panel.</p>
* @description <p>Pass to the Intent's {@link Titanium.Android.Intent#method-addCategory addCategory()} method to set a category.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_PREFERENCE">Intent.CATEGORY_PREFERENCE in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_SAMPLE_CODE
* @type String
* @readonly
* <p>To be used as a sample code example (not part of the normal user experience).</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_SAMPLE_CODE">Intent.CATEGORY_SAMPLE_CODE in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_SELECTED_ALTERNATIVE
* @type String
* @readonly
* <p>Activity should be considered as an alternative selection action to the data the user
has currently selected.</p>
* @description <p>Pass to the Intent's {@link Titanium.Android.Intent#method-addCategory addCategory()} method to set a category.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_SELECTED_ALTERNATIVE">Intent.CATEGORY_SELECTED_ALTERNATIVE in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_TAB
* @type String
* @readonly
* <p>Activity to be used in a tab activity.</p>
* @description <p>Pass to the Intent's {@link Titanium.Android.Intent#method-addCategory addCategory()} method to set a category.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_TAB">Intent.CATEGORY_TAB in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_TEST
* @type String
* @readonly
* <p>To be used as a test (not part of the normal user experience).</p>
* @description <p>Pass to the Intent's {@link Titanium.Android.Intent#method-addCategory addCategory()} method to set a category.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_TEST">Intent.CATEGORY_TEST in the Android API Reference</a>.</p>
*/
/**
* @property CATEGORY_UNIT_TEST
* @type String
* @readonly
* <p>To be used as a unit test (run through the Test Harness).</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#CATEGORY_UNIT_TEST">Intent.CATEGORY_UNIT_TEST in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_ALARM_COUNT
* @type String
* @readonly
* <p>Integer indicating how many pending alarms are being delivered with the intent.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_ALARM_COUNT">Intent.EXTRA_ALARM_COUNT in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_BCC
* @type String
* @readonly
* <p>String array containing e-mail addresses for blind carbon copying.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_BCC">Intent.EXTRA_BCC in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_CC
* @type String
* @readonly
* <p>String array containing e-mail addresses for carbon copying.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_CC">Intent.EXTRA_CC in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_DATA_REMOVED
* @type String
* @readonly
* <p>Boolean indicating full uninstall (true) or partial uninstall (false).</p>
* @description <p>Sent with the <code>Titanium.Android.ACTION_PACKAGE_REMOVED</code> broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_DATA_REMOVED">Intent.EXTRA_DATA_REMOVED in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_DONT_KILL_APP
* @type String
* @readonly
* <p>Boolean indicating to restart the application or not.</p>
* @description <p>Sent with the <code>Titanium.Android.ACTION_PACKAGE_REMOVED</code> and
<code>Titanium.Android.ACTION_PACKAGE_CHANGED</code> broadcasts.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_DONT_KILL_APP">Intent.EXTRA_DONT_KILL_APP in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_EMAIL
* @type String
* @readonly
* <p>String array containing e-mail addresses.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_EMAIL">Intent.EXTRA_EMAIL in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_INTENT
* @type String
* @readonly
* <p>An Intent describing the choices you would like shown.</p>
* @description <p>Set if the Intent's action is <code>Titanium.Android.ACTION_PICK_ACTIVITY</code>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_INTENT">Intent.EXTRA_INTENT in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_KEY_EVENT
* @type String
* @readonly
* <p>A KeyEvent object containing the event that triggered the creation of the Intent it is in.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_KEY_EVENT">Intent.EXTRA_KEY_EVENT in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_PHONE_NUMBER
* @type String
* @readonly
* <p>String holding the phone number to call or number that was called.</p>
* @description <p>Sent with the <code>Titanium.Android.ACTION_NEW_OUTGOING_CALL</code> broadcast.</p>
<p>Set if the Intent's action is <code>Titanium.Android.ACTION_CALL</code>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_PHONE_NUMBER">Intent.EXTRA_PHONE_NUMBER in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_REPLACING
* @type String
* @readonly
* <p>Boolean indicating if the package is being replaced.</p>
* @description <p>Sent with the <code>Titanium.Android.ACTION_PACKAGE_REMOVED</code> broadcast.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_REPLACING">Intent.EXTRA_REPLACING in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_SHORTCUT_ICON
* @type String
* @readonly
* <p>Bitmap icon.</p>
* @description <p>Return value of an intent with a <code>Titanium.Android.ACTION_CREATE_SHORTCUT</code> action.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_SHORTCUT_ICON">Intent.EXTRA_SHORTCUT_ICON in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_SHORTCUT_ICON_RESOURCE
* @type String
* @readonly
* <p>Resource of the shortcut.</p>
* @description <p>Return value of an intent with a <code>Titanium.Android.ACTION_CREATE_SHORTCUT</code> action.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_SHORTCUT_ICON_RESOURCE">Intent.EXTRA_SHORTCUT_ICON_RESOURCE in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_SHORTCUT_INTENT
* @type String
* @readonly
* <p>Intent of a shortcut.</p>
* @description <p>Return value of an intent with a <code>Titanium.Android.ACTION_CREATE_SHORTCUT</code> action.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_SHORTCUT_INTENT">Intent.EXTRA_SHORTCUT_INTENT in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_SHORTCUT_NAME
* @type String
* @readonly
* <p>Name of the shortcut.</p>
* @description <p>Return value of an intent with a <code>Titanium.Android.ACTION_CREATE_SHORTCUT</code> action.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_SHORTCUT_NAME">Intent.EXTRA_SHORTCUT_NAME in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_STREAM
* @type String
* @readonly
* <p>URI containing the stream data.</p>
* @description <p>Use if the Intent's action is <code>Titanium.Android.ACTION_SEND</code>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_STREAM">Intent.EXTRA_STREAM in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_SUBJECT
* @type String
* @readonly
* <p>Subject line of a message.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_SUBJECT">Intent.EXTRA_SUBJECT in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_TEMPLATE
* @type String
* @readonly
* <p>Initial data to place in a newly created record.</p>
* @description <p>Use if the Intent's action is <code>Titanium.Android.ACTION_INSERT</code>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_TEMPLATE">Intent.EXTRA_TEMPLATE in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_TEXT
* @type String
* @readonly
* <p>Corresponds to the Android <code>Intent.EXTRA_TEXT</code> constant.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_TEXT">Intent.EXTRA_TEXT in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_TITLE
* @type String
* @readonly
* <p>Corresponds to the Android <code>Intent.EXTRA_TITLE</code> constant.</p>
* @description <p>Set if the Intent's action is <code>Titanium.Android.ACTION_CHOOSER</code>.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_TITLE">Intent.EXTRA_TITLE in the Android API Reference</a>.</p>
*/
/**
* @property EXTRA_UID
* @type String
* @readonly
* <p>UID of the assigned packaged.</p>
* @description <p>Sent with the <code>Titanium.Android.ACTION_UID_REMOVED</code> broadcast, and may be sent with the
<code>Titanium.Android.ACTION_PACKAGE_CHANGED</code> and <code>Titanium.Android.ACTION_PACKAGE_REMOVED</code> broadcasts.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#EXTRA_UID">Intent.EXTRA_UID in the Android API Reference</a>.</p>
*/
/**
* @property FILL_IN_ACTION
* @type Number
* @readonly
* <p>Not used.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FILL_IN_ACTION">Intent.FILL_IN_ACTION in the Android API Reference</a>.</p>
*/
/**
* @property FILL_IN_CATEGORIES
* @type Number
* @readonly
* <p>Not used.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FILL_IN_CATEGORIES">Intent.FILL_IN_CATEGORIES in the Android API Reference</a>.</p>
*/
/**
* @property FILL_IN_COMPONENT
* @type Number
* @readonly
* <p>Not used.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FILL_IN_COMPONENT">Intent.FILL_IN_COMPONENT in the Android API Reference</a>.</p>
*/
/**
* @property FILL_IN_DATA
* @type Number
* @readonly
* <p>Not used.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FILL_IN_DATA">Intent.FILL_IN_DATA in the Android API Reference</a>.</p>
*/
/**
* @property FILL_IN_PACKAGE
* @type Number
* @readonly
* <p>Not used.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FILL_IN_PACKAGE">Intent.FILL_IN_PACKAGE in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_BROUGHT_TO_FRONT
* @type Number
* @readonly
* <p>If activity is already running, bring it to the foreground.</p>
* @description <p>Set by the system when launching a task.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_BROUGHT_TO_FRONT">Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_CLEAR_TOP
* @type Number
* @readonly
* <p>If the activity is present, removes any activities on top of it to make it the foreground activity.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP">Intent.FLAG_ACTIVITY_CLEAR_TOP in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET
* @type Number
* @readonly
* <p>Corresponds to the Android <code>Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET</code> constant.</p>
* <p> <b>Requires:</b>
Android 5.0 and earlier
</p>
* @description <p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET">Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
* @type Number
* @readonly
* <p>Exclude the activity from recently launched activities.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS">Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_FORWARD_RESULT
* @type Number
* @readonly
* <p>Return result to the original calling activity.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_FORWARD_RESULT">Intent.FLAG_ACTIVITY_FORWARD_RESULT in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
* @type Number
* @readonly
* <p>Activity was launched from history.</p>
* @description <p>Set by the system when launching a task.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY">Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_MULTIPLE_TASK
* @type Number
* @readonly
* <p>Start the activity as a new task even if it exists.</p>
* @description <p>Must be used with the <code>Titanium.Android.FLAG_ACTIVITY_NEW_TASK</code>.</p>
<p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_MULTIPLE_TASK">Intent.FLAG_ACTIVITY_MULTIPLE_TASK in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_NEW_TASK
* @type Number
* @readonly
* <p>Activity will be the start of a new task (collection of activities).</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NEW_TASK">Intent.FLAG_ACTIVITY_NEW_TASK in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_NO_ANIMATION
* @type Number
* @readonly
* <p>Prevent transition animation.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_ANIMATION">Intent.FLAG_ACTIVITY_NO_ANIMATION in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_NO_HISTORY
* @type Number
* @readonly
* <p>Do not keep the activity in the history stack.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_HISTORY">Intent.FLAG_ACTIVITY_NO_HISTORY in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_NO_USER_ACTION
* @type Number
* @readonly
* <p>Disables the <a href="http://developer.android.com/reference/android/app/Activity.html#onUserLeaveHint%28%29">onUserLeaveHint()</a> callback.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_USER_ACTION">Intent.FLAG_ACTIVITY_NO_USER_ACTION in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_PREVIOUS_IS_TOP
* @type Number
* @readonly
* <p>Corresponds to the Android <code>Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP</code> constant.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_PREVIOUS_IS_TOP">Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_REORDER_TO_FRONT
* @type Number
* @readonly
* <p>If the activity already exists, place it at the top of the history stack.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT">Intent.FLAG_ACTIVITY_REORDER_TO_FRONT in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
* @type Number
* @readonly
* <p>If the task already exists, resets the task to its initial state.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_RESET_TASK_IF_NEEDED">Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ACTIVITY_SINGLE_TOP
* @type Number
* @readonly
* <p>Do not launch the activity if it is already running.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_SINGLE_TOP">Intent.FLAG_ACTIVITY_SINGLE_TOP in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_DEBUG_LOG_RESOLUTION
* @type Number
* @readonly
* <p>Enable a log message to print out the resolution of the intent.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_DEBUG_LOG_RESOLUTION">Intent.FLAG_DEBUG_LOG_RESOLUTION in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_FROM_BACKGROUND
* @type Number
* @readonly
* <p>Indicates the intent is coming from a background operation.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_FROM_BACKGROUND">Intent.FLAG_FROM_BACKGROUND in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_GRANT_READ_URI_PERMISSION
* @type Number
* @readonly
* <p>Grant read permission on the URI in the Intent's data or clipboard.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMISSION">Intent.FLAG_GRANT_READ_URI_PERMISSION in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_GRANT_WRITE_URI_PERMISSION
* @type Number
* @readonly
* <p>Grants write permission on the URI in the Intent's data or clipboard.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_GRANT_WRITE_URI_PERMISSION">Intent.FLAG_GRANT_WRITE_URI_PERMISSION in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_RECEIVER_REGISTERED_ONLY
* @type Number
* @readonly
* <p>When sending a broadcast, only registered receivers will be called.</p>
* @description <p>Bitwise-OR the constant with the Intent's <code>flags</code> property.</p>
<p>See <a href="http://developer.android.com/reference/android/content/Intent.html#FLAG_RECEIVER_REGISTERED_ONLY">Intent.FLAG_RECEIVER_REGISTERED_ONLY in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_CANCEL_CURRENT
* @type Number
* @readonly
* <p>Cancel the current pending intent before creating a new one.</p>
* @description <p>Use with the {@link Titanium.Android.PendingIntent#property-flags} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_CANCEL_CURRENT">PendingIntent.FLAG_CANCEL_CURRENT in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_NO_CREATE
* @type Number
* @readonly
* <p>If the current intent does not exist, do not create it.</p>
* @description <p>Use with the {@link Titanium.Android.PendingIntent#property-flags} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_NO_CREATE">PendingIntent.FLAG_NO_CREATE in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ONE_SHOT
* @type Number
* @readonly
* <p>The pending intent can only be used once.</p>
* @description <p>Use with the {@link Titanium.Android.PendingIntent#property-flags} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_ONE_SHOT">PendingIntent.FLAG_ONE_SHOT in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_UPDATE_CURRENT
* @type Number
* @readonly
* <p>If the current pending intent already exists, only update the current intent's extra data.</p>
* @description <p>Use with the {@link Titanium.Android.PendingIntent#property-flags} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_UPDATE_CURRENT">PendingIntent.FLAG_UPDATE_CURRENT in the Android API
Reference</a>.</p>
*/
/**
* @property CATEGORY_ALARM
* @type String
* @readonly
* <p>Notification category indicating an alarm or timer.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_ALARM">Notification.CATEGORY_ALARM in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property CATEGORY_CALL
* @type String
* @readonly
* <p>Notification category indicating an incoming call (voice or video) or similar synchronous
communication request.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_CALL">Notification.CATEGORY_CALL in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property CATEGORY_EMAIL
* @type String
* @readonly
* <p>Notification category indicating an asynchronous bulk message (email).</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_EMAIL">Notification.CATEGORY_EMAIL in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property CATEGORY_ERROR
* @type String
* @readonly
* <p>Notification category indicating an error in background operation or authentication status.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_ERROR">Notification.CATEGORY_ERROR in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property CATEGORY_EVENT
* @type String
* @readonly
* <p>Notification category indicating a calendar event.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_EVENT">Notification.CATEGORY_EVENT in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property CATEGORY_MESSAGE
* @type String
* @readonly
* <p>Notification category indicating an incoming direct message (SMS, instant message, etc.).</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_MESSAGE">Notification.CATEGORY_MESSAGE in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property CATEGORY_PROGRESS
* @type String
* @readonly
* <p>Notification category indicating the progress of a long-running background operation.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_PROGRESS">Notification.CATEGORY_PROGRESS in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property CATEGORY_PROMO
* @type String
* @readonly
* <p>Notification category indicating a promotion or advertisement.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_PROMO">Notification.CATEGORY_PROMO in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property CATEGORY_RECOMMENDATION
* @type String
* @readonly
* <p>Notification category indicating a specific, timely recommendation for a single thing.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_RECOMMENDATION">Notification.CATEGORY_RECOMMENDATION in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property CATEGORY_SERVICE
* @type String
* @readonly
* <p>Notification category for a running background service.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_SERVICE">Notification.CATEGORY_SERVICE in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property CATEGORY_SOCIAL
* @type String
* @readonly
* <p>Notification category for a social network or sharing update.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_SOCIAL">Notification.CATEGORY_SOCIAL in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property CATEGORY_STATUS
* @type String
* @readonly
* <p>Notification category indicating ongoing information about device or contextual status.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_STATUS">Notification.CATEGORY_STATUS in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property CATEGORY_TRANSPORT
* @type String
* @readonly
* <p>Notification category indicating media transport control for playback.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-category} property.</p>
<p>See <a href="http://developer.android.com/reference/android/app/Notification.html#CATEGORY_TRANSPORT">Notification.CATEGORY_TRANSPORT in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property DEFAULT_ALL
* @type Number
* @readonly
* <p>Use all default settings for a notification; see
{@link Titanium.Android.Notification#property-defaults Notification.defaults}.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/app/Notification.html#DEFAULT_ALL">Notification.DEFAULT_ALL in the Android API Reference</a>.</p>
*/
/**
* @property DEFAULT_LIGHTS
* @type Number
* @readonly
* <p>Use the default light settings for a notification; see
{@link Titanium.Android.Notification#property-defaults Notification.defaults}.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/app/Notification.html#DEFAULT_LIGHTS">Notification.DEFAULT_LIGHTS in the Android API Reference</a>.</p>
*/
/**
* @property DEFAULT_SOUND
* @type Number
* @readonly
* <p>Use the default sound settings for a notification; see
{@link Titanium.Android.Notification#property-defaults Notification.defaults}.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/app/Notification.html#DEFAULT_SOUND">Notification.DEFAULT_SOUND in the Android API Reference</a>.</p>
*/
/**
* @property DEFAULT_VIBRATE
* @type Number
* @readonly
* <p>Use the default vibration settings for a notification; see
{@link Titanium.Android.Notification#property-defaults Notification.defaults}.</p>
* @description <p>See <a href="http://developer.android.com/reference/android/app/Notification.html#DEFAULT_VIBRATE">Notification.DEFAULT_VIBRATE in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_AUTO_CANCEL
* @type Number
* @readonly
* <p>Cancel the notification when it is clicked by the user.</p>
* @description <p>Use with {@link Titanium.Android.Notification#property-flags Notification.flags}.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#FLAG_AUTO_CANCEL">Notification.FLAG_AUTO_CANCEL in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_INSISTENT
* @type Number
* @readonly
* <p>Repeat audio until the notification is cancelled or the notification window
is opened.</p>
* @description <p>Use with {@link Titanium.Android.Notification#property-flags Notification.flags}.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#FLAG_INSISTENT">Notification.FLAG_INSISTENT in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_NO_CLEAR
* @type Number
* @readonly
* <p>Do not cancel the notification when the user clicks the Clear All button.</p>
* @description <p>Use with {@link Titanium.Android.Notification#property-flags Notification.flags}.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#FLAG_NO_CLEAR">Notification.FLAG_NO_CLEAR in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ONGOING_EVENT
* @type Number
* @readonly
* <p>Specifies that a notification is in reference to something that is ongoing, like a phone call.</p>
* @description <p>Use with {@link Titanium.Android.Notification#property-flags Notification.flags}.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#FLAG_ONGOING_EVENT">Notification.FLAG_ONGOING_EVENT in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_ONLY_ALERT_ONCE
* @type Number
* @readonly
* <p>Play an alert (sound, lights, and/or vibration) once each time the notification is sent, even if it has not been canceled before that.</p>
* @description <p>Use with {@link Titanium.Android.Notification#property-flags Notification.flags}.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#FLAG_ONLY_ALERT_ONCE">Notification.FLAG_ONLY_ALERT_ONCE in the Android API Reference</a>.</p>
*/
/**
* @property FLAG_SHOW_LIGHTS
* @type Number
* @readonly
* <p>Use LED lights to alert the user to the notification.</p>
* @description <p>Use with {@link Titanium.Android.Notification#property-flags Notification.flags}.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#FLAG_SHOW_LIGHTS">Notification.FLAG_SHOW_LIGHTS in the Android API Reference</a>.</p>
*/
/**
* @property PRIORITY_MAX
* @type Number
* @readonly
* <p>Use for urgent or time-critical notifications, for example, turn-by-turn directions or
emergency alerts.</p>
* <p> <b>Requires:</b>
Android 4.1 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-priority} property.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#PRIORITY_MAX">Notification.PRIORITY_MAX in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property PRIORITY_HIGH
* @type Number
* @readonly
* <p>Use for high priority notifications like real-time chat messages.</p>
* <p> <b>Requires:</b>
Android 4.1 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-priority} property.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#PRIORITY_HIGH">Notification.PRIORITY_HIGH in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property PRIORITY_DEFAULT
* @type Number
* @readonly
* <p>Default priority if it does no fit into another priority category.</p>
* <p> <b>Requires:</b>
Android 4.1 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-priority} property.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#PRIORITY_DEFAULT">Notification.PRIORITY_DEFAULT in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property PRIORITY_LOW
* @type Number
* @readonly
* <p>Use for low priority notifications like software updates.</p>
* <p> <b>Requires:</b>
Android 4.1 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-priority} property.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#PRIORITY_LOW">Notification.PRIORITY_LOW in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property PRIORITY_MIN
* @type Number
* @readonly
* <p>Use for expired events.</p>
* <p> <b>Requires:</b>
Android 4.1 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-priority} property.</p>
<p>Note that the user will not be alerted to the notification (sound, vibration, etc.),
but the notification will appear in the drawer.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#PRIORITY_MIN">Notification.PRIORITY_MIN in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property VISIBILITY_PRIVATE
* @type Number
* @readonly
* <p>Shows basic information about the notification.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-visibility} property.</p>
<p>Only the application name and icon appear in the lock screen with the message: "Contents hidden".</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#VISIBILITY_PRIVATE">Notification.VISIBILITY_PRIVATE in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property VISIBILITY_PUBLIC
* @type Number
* @readonly
* <p>Shows the notification's full content on the lockscreen. This is the system default if visibility is left unspecified.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-visibility} property.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#VISIBILITY_PUBLIC">Notification.VISIBILITY_PUBLIC in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property VISIBILITY_SECRET
* @type Number
* @readonly
* <p>Shows the most minimal information of the notification on the lockscreen.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>Use with the {@link Titanium.Android.Notification#property-visibility} property.</p>
<p>See also: <a href="http://developer.android.com/reference/android/app/Notification.html#VISIBILITY_SECRET">Notification.VISIBILITY_SECRET in the Android API Reference</a>.</p>
* @platform android 3.6.0
*/
/**
* @property PENDING_INTENT_FOR_ACTIVITY
* @type Number
* @readonly
* <p>Not used.</p>
* @deprecated 2.0.0
*/
/**
* @property PENDING_INTENT_FOR_BROADCAST
* @type Number
* @readonly
* <p>Not used.</p>
* @deprecated 2.0.0
*/
/**
* @property PENDING_INTENT_FOR_SERVICE
* @type Number
* @readonly
* <p>Not used.</p>
* @deprecated 2.0.0
*/
/**
* @property PENDING_INTENT_MAX_VALUE
* @type Number
* @readonly
* <p>Not used.</p>
* @deprecated 2.0.0
*/
/**
* @property R
* @type Titanium.Android.R
* @readonly
* <p>Accessor for Android system resources.</p>
*/
/**
* @property RESULT_CANCELED
* @type Number
* @readonly
* <p>Used with {@link Titanium.Android.Activity#method-setResult setResult} to specify that
an activity was canceled.</p>
*/
/**
* @property RESULT_FIRST_USER
* @type Number
* @readonly
* <p>Used with {@link Titanium.Android.Activity#method-setResult setResult} to specify a
user-defined result.</p>
* @description <p>User-defined result constants values start at <code>RESULT_FIRST_USER</code>.</p>
*/
/**
* @property RESULT_OK
* @type Number
* @readonly
* <p>Used with {@link Titanium.Android.Activity#method-setResult setResult} to specify that
an activity succeeded.</p>
*/
/**
* @property SCREEN_ORIENTATION_BEHIND
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Activity#property-requestedOrientation requestedOrientation} to
specify the activity should run in the same orientation as the activity behind it
in the activity stack.</p>
*/
/**
* @property SCREEN_ORIENTATION_LANDSCAPE
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Activity#property-requestedOrientation requestedOrientation} to
specify a landscape screen orientation.</p>
*/
/**
* @property SCREEN_ORIENTATION_NOSENSOR
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Activity#property-requestedOrientation requestedOrientation} to
specify that the sensor should be ignored and the display should not rotate.</p>
*/
/**
* @property SCREEN_ORIENTATION_PORTRAIT
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Activity#property-requestedOrientation requestedOrientation} to
specify a portrait screen orientation.</p>
*/
/**
* @property SCREEN_ORIENTATION_SENSOR
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Activity#property-requestedOrientation requestedOrientation} to
specify that orientation should be determined by the orientation sensor.</p>
*/
/**
* @property SCREEN_ORIENTATION_UNSPECIFIED
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Activity#property-requestedOrientation requestedOrientation} to
specify that the system should use its default rules for determining the best
orientation.</p>
*/
/**
* @property SCREEN_ORIENTATION_USER
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Activity#property-requestedOrientation requestedOrientation} to
specify that the system should use the user's preferred orientation.</p>
*/
/**
* @property SHOW_AS_ACTION_ALWAYS
* @type Number
* @readonly
* <p>Always show this item as an action button in the action bar.</p>
* @description <p>Use with the MenuItem's {@link Titanium.Android.MenuItem#property-showAsAction} property.</p>
* @platform android 3.0.0
*/
/**
* @property SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW
* @type Number
* @readonly
* <p>The action view can collapse to a normal menu item.</p>
* @description <p>Use with the MenuItem's {@link Titanium.Android.MenuItem#property-showAsAction} property.</p>
* @platform android 3.0.0
*/
/**
* @property SHOW_AS_ACTION_IF_ROOM
* @type Number
* @readonly
* <p>Show this item as an action button if the system decides there is room for it.</p>
* @description <p>Use with the MenuItem's {@link Titanium.Android.MenuItem#property-showAsAction} property.</p>
* @platform android 3.0.0
*/
/**
* @property SHOW_AS_ACTION_NEVER
* @type Number
* @readonly
* <p>Never display this item as an action button in the action bar.</p>
* @description <p>Use with the MenuItem's {@link Titanium.Android.MenuItem#property-showAsAction} property.</p>
* @platform android 3.0.0
*/
/**
* @property SHOW_AS_ACTION_WITH_TEXT
* @type Number
* @readonly
* <p>When this item is in the action bar, always show it with a text label.</p>
* @description <p>Use with the MenuItem's {@link Titanium.Android.MenuItem#property-showAsAction} property.</p>
* @platform android 3.0.0
*/
/**
* @property NAVIGATION_MODE_STANDARD
* @type Number
* @readonly
* <p>Standard Action Bar navigation mode</p>
* @description <p>Use with the {@link Titanium.Android.ActionBar#property-navigationMode} property.</p>
* @platform android 3.2.0
*/
/**
* @property NAVIGATION_MODE_TABS
* @type Number
* @readonly
* <p>Action Bar tab navigation mode</p>
* @description <p>Use with the {@link Titanium.Android.ActionBar#property-navigationMode} property.</p>
* @platform android 3.2.0
*/
/**
* @property START_NOT_STICKY
* @type Number
* @readonly
* <p>A Service start mode indicating that if the host application is stopped by Android, the service should not be restarted automatically.</p>
* @description <p>Use as a <code>startMode</code> value in the options object passed to
{@link Titanium.Android#method-createServiceIntent createServiceIntent}.</p>
*/
/**
* @property START_REDELIVER_INTENT
* @type Number
* @readonly
* <p>A Service start mode indicating that if the host application is stopped by Android, the service should be restarted automatically and the original Intent re-sent.</p>
* @description <p>Use as a <code>startMode</code> value in the options object passed to
{@link Titanium.Android#method-createServiceIntent createServiceIntent}.</p>
*/
/**
* @property STREAM_ALARM
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Notification#property-audioStreamType audioStreamType} to
request that the alarm stream type for notifications be used.</p>
*/
/**
* @property STREAM_DEFAULT
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Notification#property-audioStreamType audioStreamType} to request that the
default stream type for notifications be used.</p>
*/
/**
* @property STREAM_MUSIC
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Notification#property-audioStreamType audioStreamType} to
request that the music stream type for notifications be used.</p>
*/
/**
* @property STREAM_NOTIFICATION
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Notification#property-audioStreamType audioStreamType} to request that the
notification stream type for notifications be used.</p>
*/
/**
* @property STREAM_RING
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Notification#property-audioStreamType audioStreamType} to request that the
ring stream type for notifications be used.</p>
*/
/**
* @property STREAM_SYSTEM
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Notification#property-audioStreamType audioStreamType} to request that the
system stream type for notifications be used.</p>
*/
/**
* @property STREAM_VOICE_CALL
* @type Number
* @readonly
* <p>Use with {@link Titanium.Android.Notification#property-audioStreamType audioStreamType} to request that the
voice call stream type for notifications be used.</p>
*/
/**
* @property URI_INTENT_SCHEME
* @type Number
* @readonly
* <p>The URI scheme used for intent URIs.</p>
*/
/**
* @property currentActivity
* @type Titanium.Android.Activity
* @readonly
* <p>Activity of the active context.</p>
*/
/**
* @property currentService
* @type Titanium.Android.Service
* @readonly
* <p>Service in the active context.</p>
*/
/**
* @class ServiceIntentOptions
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Android.yml
* <p>Options passed to {@link Titanium.Android#method-createServiceIntent}.</p>
*/
/**
* @property url
* @type String
* <p>URL for the service's JavaScript.</p>
*/
/**
* @property [startMode=Titanium.Android.START_REDELIVER_INTENT]
* @type Number
* <p>One of the <code>START_</code> constants from {@link Titanium.Android} to specify the "stickiness" of the Service when Android shuts down the host application.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-START_NOT_STICKY}
<li> {@link Titanium.Android#property-START_REDELIVER_INTENT}
</ul></p>
*/
/**
* @class RequestPermissionAccessResult
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Android.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @class Titanium.Android.BigPictureStyle
* @platform android 5.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/BigPictureStyle.yml
* <p>Helper object for generating large-format notifications that include a large image attachment.</p>
* @description <p>If the platform does not provide large-format notifications, this style helper has no effect.
The user will always see the normal notification view.</p>
<p>This style object attaches to a {@link Titanium.UI.Notification} object and modifies its behavior.</p>
* <h3>Examples</h3>
<h4>Big picture style Example</h4>
<p>// This example will be use image that placed in one of the density-specific folder
// under <code>Resources/android/images</code></p>
<p>var bigPictureStyle = Titanium.Android.createBigPictureStyle({
bigPicture: "/images/bigPicture.png",
bigContentTitle: "Title for big picture",
summaryText: "Summary for big picture"
});</p>
<p>// Create big image style notification
var notification = Titanium.Android.createNotification({
contentTitle: 'Something Happened',
contentText : 'Click to return to the application.',
style: bigPictureStyle,
time: Date.now()
});</p>
<p>// Send the notification.
Titanium.Android.NotificationManager.notify(1, notification);</p>
*/
/**
* @method getBigLargeIcon
* <p>Gets the value of the {@link Titanium.Android.BigPictureStyle#property-bigLargeIcon} property.</p>
* @returns {Number/String}
*/
/**
* @method setBigLargeIcon
* <p>Sets the value of the {@link Titanium.Android.BigPictureStyle#property-bigLargeIcon} property.</p>
* @param {Number/String} bigLargeIcon
<p>New value for the property.</p>
*/
/**
* @method getBigPicture
* <p>Gets the value of the {@link Titanium.Android.BigPictureStyle#property-bigPicture} property.</p>
* @returns {Number/String/Titanium.Blob/Titanium.Filesystem.File}
*/
/**
* @method setBigPicture
* <p>Sets the value of the {@link Titanium.Android.BigPictureStyle#property-bigPicture} property.</p>
* @param {Number/String/Titanium.Blob/Titanium.Filesystem.File} bigPicture
<p>New value for the property.</p>
*/
/**
* @method getBigContentTitle
* <p>Gets the value of the {@link Titanium.Android.BigPictureStyle#property-bigContentTitle} property.</p>
* @returns {String}
*/
/**
* @method setBigContentTitle
* <p>Sets the value of the {@link Titanium.Android.BigPictureStyle#property-bigContentTitle} property.</p>
* @param {String} bigContentTitle
<p>New value for the property.</p>
*/
/**
* @method getDecodeRetries
* <p>Gets the value of the {@link Titanium.Android.BigPictureStyle#property-decodeRetries} property.</p>
* @returns {Number}
*/
/**
* @method setDecodeRetries
* <p>Sets the value of the {@link Titanium.Android.BigPictureStyle#property-decodeRetries} property.</p>
* @param {Number} decodeRetries
<p>New value for the property.</p>
*/
/**
* @method getSummaryText
* <p>Gets the value of the {@link Titanium.Android.BigPictureStyle#property-summaryText} property.</p>
* @returns {String}
*/
/**
* @method setSummaryText
* <p>Sets the value of the {@link Titanium.Android.BigPictureStyle#property-summaryText} property.</p>
* @param {String} summaryText
<p>New value for the property.</p>
*/
/**
* @property bigLargeIcon
* @type Number/String
* <p>Override the {@link Titanium.Android.Notification#property-largeIcon} when the big notification is shown.</p>
* @description <p>If specified as a URL, the icon must be placed in one of the density-specific
folders under <code>Resources/android/images</code>. For example, if your icon is called
<code>my_big_large_icon.png</code>, you would create high- and medium-density versions of the icons
with the following paths:</p>
<pre><code>Resources/android/images/res-hdpi/my_big_large_icon.png
Resources/android/images/res-mdpi/my_big_large_icon.png
</code></pre>
<p>To access this icon, you'd use the URL '/images/my_big_large_icon.png'.</p>
<p>To access the same icon using an Android resource ID, place the icon in:</p>
<pre><code>platform/android/res/drawable/my_big_large_icon.png
</code></pre>
<p>This icon's resource ID can be referenced through the {@link Titanium.App.Android.R}
object:</p>
<pre><code>icon: Ti.App.Android.R.drawable.my_big_large_icon,
</code></pre>
<p>See {@link Titanium.App.Android.R} for more information on accessing
Android resources by ID.</p>
*/
/**
* @property bigPicture
* @type Number/String/Titanium.Blob/Titanium.Filesystem.File
* <p>Provide the bitmap to be used as the payload for the BigPicture notification.</p>
* @description <p>Image to display, defined using a local filesystem path, a <code>File</code> object, a remote URL,
or a <code>Blob</code> object containing image data.</p>
<p>If there is a redirect and change in protocol, it will not follow. For example,
from http to https and vice versa. See <a href="http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4620571">Java Bug Database</a>
for more information.</p>
<p>If specified as a local URL, the bigPicture must be placed in one of the density-specific
folders under <code>Resources/android/images</code>. For example, if your bigPicture is called
<code>my_big_picture.png</code>, you would create high- and medium-density versions of the bigPicture
with the following paths:</p>
<pre><code>Resources/android/images/res-hdpi/my_big_picture.png
Resources/android/images/res-mdpi/my_big_picture.png
</code></pre>
<p>To access this bigPicture, you'd use the URL '/images/my_big_picture.png'.</p>
<p>To access the same bigPicture using an Android resource ID, place the bigPicture in:</p>
<pre><code>platform/android/res/drawable/my_big_picture.png
</code></pre>
<p>This bigPicture's resource ID can be referenced through the {@link Titanium.App.Android.R}
object:</p>
<pre><code>bigPicture: Ti.App.Android.R.drawable.my_big_picture,
</code></pre>
<p>See {@link Titanium.App.Android.R} for more information on accessing
Android resources by ID.</p>
*/
/**
* @property [bigContentTitle={@link Titanium.Android.Notification#property-contentTitle}]
* @type String
* <p>Overrides {@link Titanium.Android.Notification#property-contentTitle} in the big form of the notification. This defaults to the value passed to {@link Titanium.Android.Notification#property-contentTitle}.</p>
*/
/**
* @property [decodeRetries=5]
* @type Number
* <p>Number of times to retry decoding the bitmap at bigPicture URL.</p>
*/
/**
* @property summaryText
* @type String
* <p>Set the first line of text after the detail section in the big form of the notification.</p>
*/
/**
* @class Titanium.Android.BigTextStyle
* @platform android 5.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/BigTextStyle.yml
* <p>Helper object for generating large-format notifications that include a lot of text.</p>
* @description <p>If the platform does not provide large-format notifications, this style helper has no effect.
The user will always see the normal notification view.</p>
<p>This style object attaches to a {@link Titanium.Android.Notification} object and modifies its behavior.</p>
* <h3>Examples</h3>
<h4>Big text style Example</h4>
<pre><code>var bigTextStyle = Titanium.Android.createBigTextStyle({
bigText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
bigContentTitle: "Title for big text",
summaryText: "Summary for big text"
});
// Create big text style notification
var notification = Titanium.Android.createNotification({
contentTitle: 'Something Happened',
contentText : 'Click to return to the application.',
style: bigTextStyle,
time: Date.now()
});
// Send the notification.
Titanium.Android.NotificationManager.notify(1, notification);</code></pre>
*/
/**
* @method getBigText
* <p>Gets the value of the {@link Titanium.Android.BigTextStyle#property-bigText} property.</p>
* @returns {String}
*/
/**
* @method setBigText
* <p>Sets the value of the {@link Titanium.Android.BigTextStyle#property-bigText} property.</p>
* @param {String} bigText
<p>New value for the property.</p>
*/
/**
* @method getBigContentTitle
* <p>Gets the value of the {@link Titanium.Android.BigTextStyle#property-bigContentTitle} property.</p>
* @returns {String}
*/
/**
* @method setBigContentTitle
* <p>Sets the value of the {@link Titanium.Android.BigTextStyle#property-bigContentTitle} property.</p>
* @param {String} bigContentTitle
<p>New value for the property.</p>
*/
/**
* @method getSummaryText
* <p>Gets the value of the {@link Titanium.Android.BigTextStyle#property-summaryText} property.</p>
* @returns {String}
*/
/**
* @method setSummaryText
* <p>Sets the value of the {@link Titanium.Android.BigTextStyle#property-summaryText} property.</p>
* @param {String} summaryText
<p>New value for the property.</p>
*/
/**
* @property bigText
* @type String
* <p>Sets the longer text to be displayed in the big form of the notification in place of the content text.</p>
*/
/**
* @property [bigContentTitle={@link Titanium.Android.Notification#property-contentTitle}]
* @type String
* <p>Overrides {@link Titanium.Android.Notification#property-contentTitle} in the big form of the notification. This defaults to the value passed to {@link Titanium.Android.Notification#property-contentTitle}.</p>
*/
/**
* @property summaryText
* @type String
* <p>Set the first line of text after the detail section in the big form of the notification.</p>
*/
/**
* @class Titanium.Android.BroadcastReceiver
* @platform android 3.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/BroadcastReceiver.yml
* <p>Monitor and handle Android system broadcasts.</p>
* @description <p>The application can use broadcast receivers to monitor system events from the Android OS
as well as custom broadcasts sent by other applications. The application will need to know the
name of the broadcast actions in order to monitor them. Note that Titanium only supports
programmatically creating and registering broadcast receivers. Titanium does not support
declaring a receiver in the Android manifest.</p>
<p>To create a Broadcast Receiver, use the {@link Titanium.Android#method-createBroadcastReceiver} method.
Specify either a callback to handle the broadcast with the <code>onReceived</code> property or a
JavaScript file with the <code>url</code> property. Do not specify both. If both properties are
used, the <code>url</code> property takes precedence.</p>
<p>To start listening to a broadcast, pass the <code>BroadcastReceiver</code> object and an array of
broadcast actions to listen for to the {@link Titanium.Android#method-registerBroadcastReceiver} method.</p>
<p>Titanium exposes some of the system-level broadcasts as the <code>Titanium.Android.ACTION_*</code>
constants. Note that some of these constants are not broadcast messages.</p>
<p>You can also define a custom broadcast action. Use a reverse domain name scheme in order to
avoid potential conflicts with other applications.</p>
<p>To stop listening to a broadcast, pass the <code>BroadcastReceiver</code> object to the
{@link Titanium.Android#method-unregisterBroadcastReceiver} method.</p>
<p>To monitor a broadcast that requires a special permission, declare the <strong><code><uses-permission></code></strong>
element in the Android manifest section of the <code>tiapp.xml</code> file for each broadcast that uses
a special permission. For example, to monitor the <code>NEW_OUTGOING_CALL</code> broadcast, the
application needs to add the following permission:</p>
<pre><code><ti:app>
<android>
<manifest>
<uses-permission android:name="android.permission.NEW_OUTGOING_CALL" />
</manifest>
</android>
</ti:app>
</code></pre>
<p>Further Reading:</p>
<ul>
<li><a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Broadcast_Intents_and_Receivers">Android Broadcast Intents and Receivers guide</a></li>
<li><a href="http://developer.android.com/reference/android/content/BroadcastReceiver.html">Android Developers: Broadcast Receivers</a>.</li>
</ul>
* <h3>Examples</h3>
<h4>Create and register a broadcast receiver</h4>
<p>This example creates a broadcast receiver and registers it to handle the airplane mode broadcast.</p>
<pre><code>var bc = Ti.Android.createBroadcastReceiver({
onReceived: function() {
Ti.API.info('Handling broadcast.');
}
});
Ti.Android.registerBroadcastReceiver(bc, [Ti.Android.ACTION_AIRPLANE_MODE_CHANGED]);
</code></pre>
*/
/**
* @method getOnReceived
* <p>Gets the value of the {@link Titanium.Android.BroadcastReceiver#property-onReceived} property.</p>
* @returns {Callback<Object>}
*/
/**
* @method setOnReceived
* <p>Sets the value of the {@link Titanium.Android.BroadcastReceiver#property-onReceived} property.</p>
* @param {Callback<Object>} onReceived
<p>New value for the property.</p>
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.Android.BroadcastReceiver#property-url} property.</p>
* @returns {String}
*/
/**
* @method setUrl
* <p>Sets the value of the {@link Titanium.Android.BroadcastReceiver#property-url} property.</p>
* @param {String} url
<p>New value for the property.</p>
*/
/**
* @property onReceived
* @type Callback<Object>
* <p>The function called when a broadcast is received.</p>
*/
/**
* @property url
* @type String
* <p>URL of the JavaScript file to handle the broadcast.</p>
*/
/**
* @class Titanium.Android.Calendar.Alert
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Calendar/Alert.yml
* <p>An object that represents a single alert for an event in an Android calendar.</p>
* @deprecated 3.2.0
*/
/**
* @method getAlarmTime
* <p>Gets the value of the {@link Titanium.Android.Calendar.Alert#property-alarmTime} property.</p>
* @returns {Date}
*/
/**
* @method getBegin
* <p>Gets the value of the {@link Titanium.Android.Calendar.Alert#property-begin} property.</p>
* @returns {Date}
*/
/**
* @method getEnd
* <p>Gets the value of the {@link Titanium.Android.Calendar.Alert#property-end} property.</p>
* @returns {Date}
*/
/**
* @method getEventId
* <p>Gets the value of the {@link Titanium.Android.Calendar.Alert#property-eventId} property.</p>
* @returns {Number}
*/
/**
* @method getId
* <p>Gets the value of the {@link Titanium.Android.Calendar.Alert#property-id} property.</p>
* @returns {String}
*/
/**
* @method getMinutes
* <p>Gets the value of the {@link Titanium.Android.Calendar.Alert#property-minutes} property.</p>
* @returns {Number}
*/
/**
* @method getState
* <p>Gets the value of the {@link Titanium.Android.Calendar.Alert#property-state} property.</p>
* @returns {Number}
*/
/**
* @property alarmTime
* @type Date
* @readonly
* <p>Date/time at which this alert alarm is set to trigger.</p>
*/
/**
* @property begin
* @type Date
* @readonly
* <p>Start date/time for the corresponding event.</p>
*/
/**
* @property end
* @type Date
* @readonly
* <p>End date/time for the corresponding event.</p>
*/
/**
* @property eventId
* @type Number
* @readonly
* <p>Identifier of the event for which this alert is set.</p>
*/
/**
* @property id
* @type String
* @readonly
* <p>Identifier of this alert.</p>
*/
/**
* @property minutes
* @type Number
* @readonly
* <p>Reminder notice period in minutes, that determines how long prior to the event this alert
should trigger.</p>
*/
/**
* @property state
* @type Number
* @readonly
* <p>The current state of the alert.</p>
* @description <p>One of {@link Titanium.Android.Calendar#property-STATE_DISMISSED STATE_DISMISSED},
{@link Titanium.Android.Calendar#property-STATE_FIRED STATE_FIRED},
or {@link Titanium.Android.Calendar#property-STATE_SCHEDULED STATE_SCHEDULED}.</p>
*/
/**
* @class Titanium.Android.Calendar
* @platform android 1.5
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Calendar/Calendar.yml
* <p>The Android.Calendar module provides proxies and methods for accessing the native Android
calendar functionality.</p>
* @deprecated 3.2.0 Use <Titanium.Calendar> instead.
* @description <p>This module supports retrieving information about existing events and creating new events. <br>
However, modifying or deleting existing events is not yet supported. <br>
Additionally, recurring events are not yet supported.</p>
<p>Currently, calendar permissions must be explicitly configured in <code>tiapp.xml</code> in order to access the
calendar. See "Common Requirements" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference">tiapp.xml and timodule.xml Reference</a>.</p>
* <h3>Examples</h3>
<h4>All Calendars vs Selectable Calendars</h4>
<p>Print the names of all calendars known to Android, and the names of calendars that
have been selected in the native Android calendar application.</p>
<pre><code>function showCalendars(calendars) {
for (var i = 0; i < calendars.length; i++) {
Ti.API.info(calendars[i].name);
}
}
Ti.API.info('ALL CALENDARS:');
showCalendars(Ti.Android.Calendar.allCalendars);
Ti.API.info('SELECTABLE CALENDARS:');
showCalendars(Ti.Android.Calendar.selectableCalendars);
</code></pre><h4>Events in a year</h4>
<p>Create a picker to allow an existing calendar to be selected and, when a button is clicked,
generate details of all events in that calendar for the current year .</p>
<pre><code>var calendars = [];
var selectedCalendarName;
var selectedCalendarId;
var pickerData = [];
var win = Ti.UI.createWindow({
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false,
layout: 'vertical',
title: 'Calendar Demo'
});
var scrollView = Ti.UI.createScrollView({
backgroundColor: '#eee',
height: 500,
top: 20
});
var label = Ti.UI.createLabel({
backgroundColor: 'white',
text: 'Click on the button to display the events for the selected calendar',
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,
top: 20
});
scrollView.add(label);
var selectableCalendars = Ti.Android.Calendar.selectableCalendars;
for (var i = 0, ilen = selectableCalendars.length; i < ilen; i++) {
calendars.push({ name: selectableCalendars[i].name, id: selectableCalendars[i].id });
pickerData.push( Ti.UI.createPickerRow({ title: calendars[i].name }) );
if(i === 0){
selectedCalendarName = selectableCalendars[i].name;
selectedCalendarId = selectableCalendars[i].id;
}
}
var selectableCalendars = null;
if(!calendars.length){
label.text = 'No calendars available. Select at least one in the native calendar before using this app';
} else {
label.text = 'Click button to view calendar events';
var picker = Ti.UI.createPicker({
top:20
});
picker.add(pickerData);
win.add(picker);
picker.addEventListener('change', function(e){
for (var i = 0, ilen = calendars.length; i < ilen; i++) {
if(calendars[i].name === e.row.title){
selectedCalendarName = calendars[i].name;
selectedCalendarId = calendars[i].id;
}
}
});
var button = Ti.UI.createButton({
title: 'View events',
top: 20
});
win.add(button);
button.addEventListener('click', function(e){
label.text = 'Generating...';
var currentYear = new Date().getFullYear();
var consoleString = '';
function print(s) {
if (consoleString.length) {
consoleString = consoleString + '\n';
}
consoleString = consoleString + s;
}
var calendar = Ti.Android.Calendar.getCalendarById(selectedCalendarId);
function printReminder(r) {
var typetext = '[method unknown]';
if (r.method == Ti.Android.Calendar.METHOD_EMAIL) {
typetext = 'Email';
} else if (r.method == Ti.Android.Calendar.METHOD_SMS) {
typetext = 'SMS';
} else if (r.method == Ti.Android.Calendar.METHOD_ALERT) {
typetext = 'Alert';
} else if (r.method == Ti.Android.Calendar.METHOD_DEFAULT) {
typetext = '[default reminder method]';
}
print(typetext + ' reminder to be sent ' + r.minutes + ' minutes before the event');
}
function printAlert(a) {
print('Alert id ' + a.id + ' begin ' + a.begin + '; end ' + a.end + '; alarmTime ' + a.alarmTime + '; minutes ' + a.minutes);
}
function printEvent(event) {
if (event.allDay) {
print('Event: ' + event.title + '; ' + event.begin.toLocaleDateString() + ' (all day)');
} else {
print('Event: ' + event.title + '; ' + event.begin.toLocaleDateString() + ' ' + event.begin.toLocaleTimeString()+ '-' + event.end.toLocaleTimeString());
}
var reminders = event.reminders;
if (reminders && reminders.length) {
print('There is/are ' + reminders.length + ' reminder(s)');
for (var i = 0; i < reminders.length; i++) {
printReminder(reminders[i]);
}
}
print('hasAlarm? ' + event.hasAlarm);
var alerts = event.alerts;
if (alerts && alerts.length) {
for (var i = 0; i < alerts.length; i++) {
printAlert(alerts[i]);
}
}
var status = event.status;
if (status == Ti.Android.Calendar.STATUS_TENTATIVE) {
print('This event is tentative');
}
if (status == Ti.Android.Calendar.STATUS_CONFIRMED) {
print('This event is confirmed');
}
if (status == Ti.Android.Calendar.STATUS_CANCELED) {
print('This event was canceled');
}
}
var events = calendar.getEventsInYear(currentYear);
if (events && events.length) {
print(events.length + ' event(s) in ' + currentYear);
print('');
for (var i = 0; i < events.length; i++) {
printEvent(events[i]);
print('');
}
} else {
print('No events');
}
label.text = consoleString;
});
}
win.add(scrollView);
win.open();
</code></pre><h4>Create an Event and Reminder</h4>
<p>Creates an event and adds an e-mail reminder for 10 minutes before the event.</p>
<pre><code>var CALENDAR_TO_USE = 3;
var calendar = Ti.Android.Calendar.getCalendarById(CALENDAR_TO_USE);
// Create the event
var eventBegins = new Date(2010, 11, 26, 12, 0, 0);
var eventEnds = new Date(2010, 11, 26, 14, 0, 0);
var details = {
title: 'Do some stuff',
description: "I'm going to do some stuff at this time.",
begin: eventBegins,
end: eventEnds
};
var event = calendar.createEvent(details);
// Now add a reminder via e-mail for 10 minutes before the event.
var reminderDetails = {
minutes: 10,
method: Ti.Android.Calendar.METHOD_EMAIL
};
event.createReminder(reminderDetails);
</code></pre>
*/
/**
* @method getCalendarById
* <p>Gets the calendar with the specified identifier.</p>
* @param {Number} id
<p>Integer identifier of the calendar.</p>
* @returns {Titanium.Android.Calendar.Calendar}
*/
/**
* @method getAllAlerts
* <p>Gets the value of the {@link Titanium.Android.Calendar#property-allAlerts} property.</p>
* @returns {Titanium.Android.Calendar.Alert[]}
*/
/**
* @method getAllCalendars
* <p>Gets the value of the {@link Titanium.Android.Calendar#property-allCalendars} property.</p>
* @returns {Titanium.Android.Calendar.Calendar[]}
*/
/**
* @method getSelectableCalendars
* <p>Gets the value of the {@link Titanium.Android.Calendar#property-selectableCalendars} property.</p>
* @returns {Titanium.Android.Calendar.Calendar[]}
*/
/**
* @property METHOD_ALERT
* @type Number
* @readonly
* <p>Reminder alert delivery method.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Reminder}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-METHOD_ALERT METHOD_ALERT},
{@link Titanium.Android.Calendar#property-METHOD_DEFAULT METHOD_DEFAULT},
{@link Titanium.Android.Calendar#property-METHOD_EMAIL METHOD_EMAIL},
and {@link Titanium.Android.Calendar#property-METHOD_SMS METHOD_SMS}.</p>
*/
/**
* @property METHOD_DEFAULT
* @type Number
* @readonly
* <p>Reminder default delivery method.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Reminder}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-METHOD_ALERT METHOD_ALERT},
{@link Titanium.Android.Calendar#property-METHOD_DEFAULT METHOD_DEFAULT},
{@link Titanium.Android.Calendar#property-METHOD_EMAIL METHOD_EMAIL},
and {@link Titanium.Android.Calendar#property-METHOD_SMS METHOD_SMS}.</p>
*/
/**
* @property METHOD_EMAIL
* @type Number
* @readonly
* <p>Reminder email delivery method.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Reminder}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-METHOD_ALERT METHOD_ALERT},
{@link Titanium.Android.Calendar#property-METHOD_DEFAULT METHOD_DEFAULT},
{@link Titanium.Android.Calendar#property-METHOD_EMAIL METHOD_EMAIL},
and {@link Titanium.Android.Calendar#property-METHOD_SMS METHOD_SMS}.</p>
*/
/**
* @property METHOD_SMS
* @type Number
* @readonly
* <p>Reminder SMS delivery method.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Reminder}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-METHOD_ALERT METHOD_ALERT},
{@link Titanium.Android.Calendar#property-METHOD_DEFAULT METHOD_DEFAULT},
{@link Titanium.Android.Calendar#property-METHOD_EMAIL METHOD_EMAIL},
and {@link Titanium.Android.Calendar#property-METHOD_SMS METHOD_SMS}.</p>
*/
/**
* @property STATE_DISMISSED
* @type Number
* @readonly
* <p>Alert dismissed state.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Alert}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-STATE_DISMISSED STATE_DISMISSED},
{@link Titanium.Android.Calendar#property-STATE_FIRED STATE_FIRED},
and {@link Titanium.Android.Calendar#property-STATE_SCHEDULED STATE_SCHEDULED}.</p>
*/
/**
* @property STATE_FIRED
* @type Number
* @readonly
* <p>Alert fired state.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Alert}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-STATE_DISMISSED STATE_DISMISSED},
{@link Titanium.Android.Calendar#property-STATE_FIRED STATE_FIRED},
and {@link Titanium.Android.Calendar#property-STATE_SCHEDULED STATE_SCHEDULED}.</p>
*/
/**
* @property STATE_SCHEDULED
* @type Number
* @readonly
* <p>Alert scheduled status.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Alert}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-STATE_DISMISSED STATE_DISMISSED},
{@link Titanium.Android.Calendar#property-STATE_FIRED STATE_FIRED},
and {@link Titanium.Android.Calendar#property-STATE_SCHEDULED STATE_SCHEDULED}.</p>
*/
/**
* @property STATUS_CANCELED
* @type Number
* @readonly
* <p>Event canceled status.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Event}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-STATUS_CANCELED STATUS_CANCELED},
{@link Titanium.Android.Calendar#property-STATUS_CONFIRMED STATUS_CONFIRMED},
and {@link Titanium.Android.Calendar#property-STATUS_TENTATIVE STATUS_TENTATIVE}.</p>
*/
/**
* @property STATUS_CONFIRMED
* @type Number
* @readonly
* <p>Event confirmed status.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Event}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-STATUS_CANCELED STATUS_CANCELED},
{@link Titanium.Android.Calendar#property-STATUS_CONFIRMED STATUS_CONFIRMED},
and {@link Titanium.Android.Calendar#property-STATUS_TENTATIVE STATUS_TENTATIVE}.</p>
*/
/**
* @property STATUS_TENTATIVE
* @type Number
* @readonly
* <p>Event tentative status.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Event}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-STATUS_CANCELED STATUS_CANCELED},
{@link Titanium.Android.Calendar#property-STATUS_CONFIRMED STATUS_CONFIRMED},
and {@link Titanium.Android.Calendar#property-STATUS_TENTATIVE STATUS_TENTATIVE}.</p>
*/
/**
* @property VISIBILITY_CONFIDENTIAL
* @type Number
* @readonly
* <p>Event confidential visibility.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Event}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-VISIBILITY_CONFIDENTIAL VISIBILITY_CONFIDENTIAL},
{@link Titanium.Android.Calendar#property-VISIBILITY_DEFAULT VISIBILITY_DEFAULT},
{@link Titanium.Android.Calendar#property-VISIBILITY_PRIVATE VISIBILITY_PRIVATE},
and {@link Titanium.Android.Calendar#property-VISIBILITY_PUBLIC VISIBILITY_PUBLIC}.</p>
*/
/**
* @property VISIBILITY_DEFAULT
* @type Number
* @readonly
* <p>Event default visibility.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Event}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-VISIBILITY_CONFIDENTIAL VISIBILITY_CONFIDENTIAL},
{@link Titanium.Android.Calendar#property-VISIBILITY_DEFAULT VISIBILITY_DEFAULT},
{@link Titanium.Android.Calendar#property-VISIBILITY_PRIVATE VISIBILITY_PRIVATE},
and {@link Titanium.Android.Calendar#property-VISIBILITY_PUBLIC VISIBILITY_PUBLIC}.</p>
*/
/**
* @property VISIBILITY_PRIVATE
* @type Number
* @readonly
* <p>Event private visibility.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Event}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-VISIBILITY_CONFIDENTIAL VISIBILITY_CONFIDENTIAL},
{@link Titanium.Android.Calendar#property-VISIBILITY_DEFAULT VISIBILITY_DEFAULT},
{@link Titanium.Android.Calendar#property-VISIBILITY_PRIVATE VISIBILITY_PRIVATE},
and {@link Titanium.Android.Calendar#property-VISIBILITY_PUBLIC VISIBILITY_PUBLIC}.</p>
*/
/**
* @property VISIBILITY_PUBLIC
* @type Number
* @readonly
* <p>Event public visibility.</p>
* @description <p>Used with {@link Titanium.Android.Calendar.Event}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Android.Calendar#property-VISIBILITY_CONFIDENTIAL VISIBILITY_CONFIDENTIAL},
{@link Titanium.Android.Calendar#property-VISIBILITY_DEFAULT VISIBILITY_DEFAULT},
{@link Titanium.Android.Calendar#property-VISIBILITY_PRIVATE VISIBILITY_PRIVATE},
and {@link Titanium.Android.Calendar#property-VISIBILITY_PUBLIC VISIBILITY_PUBLIC}.</p>
*/
/**
* @property allAlerts
* @type Titanium.Android.Calendar.Alert[]
* @readonly
* <p>All alerts in selected calendars.</p>
*/
/**
* @property allCalendars
* @type Titanium.Android.Calendar.Calendar[]
* @readonly
* <p>All calendars known to the native calendar app.</p>
*/
/**
* @property selectableCalendars
* @type Titanium.Android.Calendar.Calendar[]
* @readonly
* <p>All calendars selected within the native calendar app, which may be a subset of <code>allCalendars</code>. </p>
* @description <p>The native calendar application may know via the registered webservices, such as Gooogle or
Facebook accounts about calendars that it has access to but have not been selected to be
displayed in the native calendar app.</p>
*/
/**
* @class CalendarPermissionResponse
* @platform android 5.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Calendar/Calendar.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates whether the request succeeded.</p>
* @description <p>Returns <code>true</code> if request succeeded.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>May be undefined if <code>success</code> is <code>true</code>.</p>
*/
/**
* @property code
* @type Number
* <p>Error code, if any returned.</p>
* @description <p>May be undefined if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Titanium.Android.Calendar.Calendar
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Calendar/CalendarProxy.yml
* <p>An object that represents a single calendar on Android.</p>
* @deprecated 3.2.0
*/
/**
* @method createEvent
* <p>Creates an event in this calendar.</p>
* @param {Dictionary<Titanium.Android.Calendar.Event>} properties
<p>Properties of the event</p>
* @returns {Titanium.Android.Calendar.Event}
*/
/**
* @method getEventById
* <p>Gets the event with the specified identifier.</p>
* @param {Number} id
<p>Identifier of the event.</p>
* @returns {Titanium.Android.Calendar.Event}
*/
/**
* @method getEventsBetweenDates
* <p>Gets events that occur between two dates.</p>
* @param {Date} date1
<p>Start date.</p>
* @param {Date} date2
<p>End date.</p>
* @returns {Titanium.Android.Calendar.Event[]}
*/
/**
* @method getEventsInDate
* <p>Gets events that occur on a specified date.</p>
* @param {Number} year
<p>Year of the events.</p>
* @param {Number} month
<p>Month of the events, as a zero-based integer with January at 0 and December at 11.</p>
* @param {Number} day
<p>Day of the month of the events.</p>
* @returns {Titanium.Android.Calendar.Event[]}
*/
/**
* @method getEventsInMonth
* <p>Gets events that occur during a specified month.</p>
* @param {Number} year
<p>Year of the events.</p>
* @param {Number} month
<p>Month of the events, as a zero-based integer with January at 0 and December at 11.</p>
* @returns {Titanium.Android.Calendar.Event[]}
*/
/**
* @method getEventsInYear
* <p>Gets all events that occur during a specified year.</p>
* @param {Number} year
<p>Year of the events.</p>
* @returns {Titanium.Android.Calendar.Event[]}
*/
/**
* @method getHidden
* <p>Gets the value of the {@link Titanium.Android.Calendar.Calendar#property-hidden} property.</p>
* @returns {Boolean}
*/
/**
* @method getId
* <p>Gets the value of the {@link Titanium.Android.Calendar.Calendar#property-id} property.</p>
* @returns {String}
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.Android.Calendar.Calendar#property-name} property.</p>
* @returns {String}
*/
/**
* @method getSelected
* <p>Gets the value of the {@link Titanium.Android.Calendar.Calendar#property-selected} property.</p>
* @returns {Boolean}
*/
/**
* @property hidden
* @type Boolean
* @readonly
* <p>Indicates whether this calendar is hidden.</p>
* @description <p>This property is <code>true</code> when this calendar is hidden.</p>
*/
/**
* @property id
* @type String
* @readonly
* <p>Identifier of this calendar.</p>
*/
/**
* @property name
* @type String
* @readonly
* <p>Display name of this calendar.</p>
*/
/**
* @property selected
* @type Boolean
* @readonly
* <p>Indicates whether the calendar is selected.</p>
* @description <p>Set to <code>true</code> when this calendar is selected.</p>
<p>See {@link Titanium.Android.Calendar} for examples.</p>
*/
/**
* @class Titanium.Android.Calendar.Event
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Calendar/Event.yml
* <p>An object that represents a single event in an Android calendar.</p>
* @deprecated 3.2.0
* @description <p>The API supports retrieving information about existing events and creating new events. <br>
Be aware that modifying or deleting existing events is not yet supported. Additionally, recurring
events are not yet supported.</p>
<p>See {@link Titanium.Android.Calendar} for examples of retrieving event information and creating events.</p>
*/
/**
* @method createAlert
* <p>Creates an alert for this event.</p>
* @param {Dictionary<Titanium.Android.Calendar.Alert>} data
<p>Properties for the alert.</p>
* @returns {Titanium.Android.Calendar.Alert}
*/
/**
* @method createReminder
* <p>Creates a reminder for this event.</p>
* @param {Dictionary<Titanium.Android.Calendar.Reminder>} data
<p>Properties for the reminder.</p>
* @returns {Titanium.Android.Calendar.Reminder}
*/
/**
* @method getExtendedProperty
* <p>Gets the value of the specified extended property.</p>
* @param {String} name
<p>Name of an existing extended property.</p>
* @returns {String}
*/
/**
* @method setExtendedProperty
* <p>Sets the value of the specified extended property.</p>
* @param {String} name
<p>Property name.</p>
* @param {String} value
<p>Property value.</p>
*/
/**
* @method getAlerts
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-alerts} property.</p>
* @returns {Titanium.Android.Calendar.Alert[]}
*/
/**
* @method getAllDay
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-allDay} property.</p>
* @returns {Boolean}
*/
/**
* @method getBegin
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-begin} property.</p>
* @returns {Date}
*/
/**
* @method getDescription
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-description} property.</p>
* @returns {String}
*/
/**
* @method getEnd
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-end} property.</p>
* @returns {Date}
*/
/**
* @method getExtendedProperties
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-extendedProperties} property.</p>
* @returns {Dictionary}
*/
/**
* @method getHasAlarm
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-hasAlarm} property.</p>
* @returns {Boolean}
*/
/**
* @method getHasExtendedProperties
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-hasExtendedProperties} property.</p>
* @returns {Boolean}
*/
/**
* @method getId
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-id} property.</p>
* @returns {String}
*/
/**
* @method getLocation
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-location} property.</p>
* @returns {String}
*/
/**
* @method getReminders
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-reminders} property.</p>
* @returns {Titanium.Android.Calendar.Reminder[]}
*/
/**
* @method getStatus
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-status} property.</p>
* @returns {Number}
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-title} property.</p>
* @returns {String}
*/
/**
* @method getVisibility
* <p>Gets the value of the {@link Titanium.Android.Calendar.Event#property-visibility} property.</p>
* @returns {Number}
*/
/**
* @property alerts
* @type Titanium.Android.Calendar.Alert[]
* @readonly
* <p>Existing alerts for this event.</p>
*/
/**
* @property allDay
* @type Boolean
* @readonly
* <p>Indicates whether this event is all day.</p>
*/
/**
* @property begin
* @type Date
* @readonly
* <p>Start date/time of this event.</p>
*/
/**
* @property description
* @type String
* @readonly
* <p>Description of this event.</p>
*/
/**
* @property end
* @type Date
* @readonly
* <p>End date/time of this event.</p>
*/
/**
* @property extendedProperties
* @type Dictionary
* @readonly
* <p>Extended properties of this event.</p>
*/
/**
* @property hasAlarm
* @type Boolean
* @readonly
* <p>Indicates whether an alarm is scheduled for this event.</p>
*/
/**
* @property hasExtendedProperties
* @type Boolean
* @readonly
* <p>Indicates whether {@link Titanium.Android.Calendar.Event#property-extendedProperties extendedProperties}
exists for this event.</p>
*/
/**
* @property id
* @type String
* @readonly
* <p>Identifier of this event.</p>
*/
/**
* @property location
* @type String
* @readonly
* <p>Location of this event.</p>
*/
/**
* @property reminders
* @type Titanium.Android.Calendar.Reminder[]
* @readonly
* <p>Existing reminders for this event.</p>
*/
/**
* @property status
* @type Number
* @readonly
* <p>Status of this event.</p>
* @description <p>One of {@link Titanium.Android.Calendar#property-STATUS_CANCELED STATUS_CANCELED},
{@link Titanium.Android.Calendar#property-STATUS_CONFIRMED STATUS_CONFIRMED},
and {@link Titanium.Android.Calendar#property-STATUS_TENTATIVE STATUS_TENTATIVE}.</p>
*/
/**
* @property title
* @type String
* @readonly
* <p>Title of this event.</p>
*/
/**
* @property visibility
* @type Number
* @readonly
* <p>Visibility of this event.</p>
* @description <p>One of {@link Titanium.Android.Calendar#property-VISIBILITY_CONFIDENTIAL VISIBILITY_CONFIDENTIAL},
{@link Titanium.Android.Calendar#property-VISIBILITY_DEFAULT VISIBILITY_DEFAULT},
{@link Titanium.Android.Calendar#property-VISIBILITY_PRIVATE VISIBILITY_PRIVATE},
and {@link Titanium.Android.Calendar#property-VISIBILITY_PUBLIC VISIBILITY_PUBLIC}.</p>
*/
/**
* @class Titanium.Android.Calendar.Reminder
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Calendar/Reminder.yml
* <p>An object that represents a single reminder for an event in an Android calendar.</p>
* @deprecated 3.2.0
* @description <p>Reminders should be created using the {@link Titanium.Android.Calendar.Event#method-createReminder} method
rather than directly.</p>
<p>See {@link Titanium.Android.Calendar} for examples of retrieving reminder information and creating
reminders for events.</p>
*/
/**
* @method getId
* <p>Gets the value of the {@link Titanium.Android.Calendar.Reminder#property-id} property.</p>
* @returns {String}
*/
/**
* @method getMethod
* <p>Gets the value of the {@link Titanium.Android.Calendar.Reminder#property-method} property.</p>
* @returns {Number}
*/
/**
* @method getMinutes
* <p>Gets the value of the {@link Titanium.Android.Calendar.Reminder#property-minutes} property.</p>
* @returns {Number}
*/
/**
* @property id
* @type String
* @readonly
* <p>Identifier of this reminder.</p>
*/
/**
* @property method
* @type Number
* @readonly
* <p>Method by which this reminder will be delivered.</p>
* @description <p>One of {@link Titanium.Android.Calendar#property-METHOD_ALERT METHOD_ALERT},
{@link Titanium.Android.Calendar#property-METHOD_DEFAULT METHOD_DEFAULT},
{@link Titanium.Android.Calendar#property-METHOD_EMAIL METHOD_EMAIL},
or {@link Titanium.Android.Calendar#property-METHOD_SMS METHOD_SMS}.</p>
*/
/**
* @property minutes
* @type Number
* @readonly
* <p>Reminder notice period in minutes, that determines how long prior to the event this reminder
should trigger.</p>
*/
/**
* @class Titanium.Android.Intent
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Intent.yml
* <p>Message objects passed between Android application components.</p>
* @description <p>In Android, applications and application components cannot directly communicate with each other.
In order to communicate with another application, use an intent. An intent is a message sent
to the Android OS. Android directs the message to an application or application component based
on the intent's settings.</p>
<p>To receive an intent, an application needs to declare an Intent Filter. An intent filter
indicates to the Android OS that your application can handle certain data types or URIs.
For details on using Intent Filters, see the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Intent_Filters">Android Intent Filters guide</a>.</p>
<p>Intents can be used to start an activity, start a service or start a broadcast.</p>
<ul>
<li>To create an intent to start an <strong>Activity</strong>, use the {@link Titanium.Android#method-createIntent} method.</li>
<li>To create an intent to start a <strong>Broadcast</strong>, use the {@link Titanium.Android#method-createBroadcastIntent} method.</li>
<li>To create an intent to start a <strong>Service</strong>, use the {@link Titanium.Android#method-createServiceIntent} method.</li>
</ul>
<p>You can create either an implicit intent or an explicit intent.</p>
<p>An <em>explicit intent</em> specifies the application or application component to launch. To create an
explicit intent, specify the Intent's <code>className</code> and <code>packageName</code> properties to specify the
application component to launch or the <code>url</code> property to specify a JavaScript file to handle
the data.</p>
<p>An <em>implicit intent</em> does not specify a particular application. Android will present the options
to the user of which applications to launch if a default application was not selected to handle
a particular data type or content URI. To create an implicit intent, do not specify the
<code>className</code>, <code>packageName</code> or <code>url</code> properties.</p>
<p>Note that the parameters to create a Service Intent are different than the ones used to
create an Activity or Broadcast. The properties and methods listed below
are used for Activity and Broadcast Intents. See the {@link Titanium.Android#method-createServiceIntent} method
for the parameters to create a Service Intent.</p>
<h4>Action</h4>
<p>The <code>action</code> property specifies the action you want the activity to perform, or in the case of
broadcasts, the action that just completed you want to report.</p>
<p>Titanium exposes some of the Android Intent actions as the <code>Titanium.Android.ACTION_*</code> constants.
Note that some of these actions are for system-level broadcasts that only Android can send.
If Titanium has not exposed a particular constant, you can pass the string value listed in the
Android API reference guide instead.</p>
<p>You can also define your own custom action names. Use a reverse domain scheme to name the
action to avoid potential conflicts, for example, <code>com.appcelerator.action.LINT</code>.
Custom actions are only useful to communicate between your applications and application
activities using intents.</p>
<h4>Data</h4>
<p>The {@link Titanium.Android.Intent#property-data data} property specifies a content URI you want the activity to handle.</p>
<p>The {@link Titanium.Android.Intent#property-type type} property specifies a MIME type the activity can handle.</p>
<p>For Broadcast Intents, do not use the <code>data</code> or <code>type</code> properties. Use extras to pass data.
See the <em>Extras</em> section below.</p>
<h4>Category</h4>
<p>Add a category to your Intent by invoking the {@link Titanium.Android.Intent#method-addCategory addCategory()}
method on it. A category provides additional details about the purpose of the intent.
Note that most categories are only useful for intent filters.</p>
<p>Titanium exposes some of the Android Intent categories as the <code>Titanium.Android.CATEGORY_*</code> constants.
Note that some of these categories are for Notifications. If Titanium has not exposed a
particular constant, you can pass the string value listed in the Android API reference instead.</p>
<p>You can also define your own custom category names. Use a reverse domain scheme to name the
category to avoid potential conflicts, for example, <code>org.foo.category.SUPER</code>.
Custom categories are only useful to communicate between your applications and application
activities using intents.</p>
<h4>Flags</h4>
<p>Bitwise-OR flags with the Intent's {@link Titanium.Android.Intent#property-flags flags} property
or pass a flag to the {@link Titanium.Android.Intent#method-addFlags addFlags()} method.
Flags modify the behavior of the intent.</p>
<p>Titanium exposes some of the Android Intent flags as the <code>Titanium.Android.FLAG_*</code> constants.
If Titanium has not exposed a particular constant, you can pass the constant value listed in
the Android API reference instead.</p>
<h4>Extras</h4>
<p>Extras are key-value pairs that are useful to pass on extra data with the Intent that can be
used by another application component.</p>
<ul>
<li>Use one of the <code>get*Extra()</code> methods to retrieve the data. Pass the method the extra key.</li>
<li>Use the {@link Titanium.Android.Intent#method-hasExtra hasExtra()} method to check if the intent contains an extra.
Pass the method the key of the extra.</li>
<li>Use the {@link Titanium.Android.Intent#method-putExtra putExtra()} method to add data to the intent.
Pass the method the extra key and data.</li>
</ul>
<p>Titanium exposes the Android-defined extra keys as the <code>Titanium.Android.EXTRA_*</code> constants.
You can also define your own custom extra keys to use between your applications and application
components.</p>
<h4>Further Reading</h4>
<ul>
<li><a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Intents">Android Intents guide</a></li>
<li><a href="http://developer.android.com/reference/android/content/Intent.html">Android Developer: Intent</a></li>
</ul>
* <h3>Examples</h3>
<h4>Create an Intent for Launching an Activity</h4>
<p>This example creates an intent and uses it to launch a new activity.</p>
<pre><code>var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_MAIN,
url: 'activity1.js'
});
intent.addCategory(Ti.Android.CATEGORY_LAUNCHER);
Ti.Android.currentActivity.startActivity(intent);
</code></pre><h4>Create an Intent to get a Contact URI</h4>
<p>This example creates an intent to retrieve contact information from the user's
contacts.</p>
<pre><code>var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_GET_CONTENT,
type: "vnd.android.cursor.item/phone"
});
</code></pre><h4>Pick a Photo from the Photo Gallery</h4>
<p>This example creates an intent to pick an image from the photo gallery.</p>
<pre><code>var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_PICK,
type: "image/*"
});
intent.addCategory(Ti.Android.CATEGORY_DEFAULT);
</code></pre><h4>Create an ImageView from an Image Send Intent</h4>
<p>This example requires that an intent filter be set up in the project's <code>tiapp.xml</code> file.
After copying the default root activity of your application from the <code>AndroidManifest.xml</code>
file to the Android manifest section of the <code>tiapp.xml</code> file, add an intent filter.
For detailed instructions, refer to the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Intent_Filters">Android Intent Filters guide</a>.</p>
<p>You can trigger this intent filter by long pressing on an image in the Android gallery
and selecting "share".</p>
<p><code>tiapp.xml</code>:</p>
<pre><code><ti:app>
<android>
<manifest>
<application>
<activity android:name=".YourapplicationnameActivity">
<intent-filter>
<data android:mimeType="image/*"/>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
</android>
</ti:app>
</code></pre>
<p><code>app.js</code>:</p>
<pre><code> var win = Ti.UI.createWindow({
backgroundColor: '#fff',
fullscreen: false,
exitOnClose: true
});
win.addEventListener('open', function(e) {
var intent = Ti.Android.currentActivity.getIntent();
var iname = Ti.Android.EXTRA_STREAM;
if (intent && intent.hasExtra(iname)) {
// Create ImageView from TiBlob
var blob = intent.getBlobExtra(iname);
win.add(Ti.UI.createImageView({
image: blob,
height: 300,
width: 300,
left: 0,
top: 0
}));
} else {
Ti.API.info('No extra named "' + iname + '" found in Intent');
}
});
win.open();
</code></pre>
*/
/**
* @method addCategory
* <p>Adds a category to this Intent.</p>
* @param {String} name
<p>The category name.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-CATEGORY_ALTERNATIVE}
<li> {@link Titanium.Android#property-CATEGORY_BROWSABLE}
<li> {@link Titanium.Android#property-CATEGORY_DEFAULT}
<li> {@link Titanium.Android#property-CATEGORY_DEVELOPMENT_PREFERENCE}
<li> {@link Titanium.Android#property-CATEGORY_EMBED}
<li> {@link Titanium.Android#property-CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST}
<li> {@link Titanium.Android#property-CATEGORY_HOME}
<li> {@link Titanium.Android#property-CATEGORY_INFO}
<li> {@link Titanium.Android#property-CATEGORY_LAUNCHER}
<li> {@link Titanium.Android#property-CATEGORY_MONKEY}
<li> {@link Titanium.Android#property-CATEGORY_OPENABLE}
<li> {@link Titanium.Android#property-CATEGORY_PREFERENCE}
<li> {@link Titanium.Android#property-CATEGORY_SAMPLE_CODE}
<li> {@link Titanium.Android#property-CATEGORY_SELECTED_ALTERNATIVE}
<li> {@link Titanium.Android#property-CATEGORY_TAB}
<li> {@link Titanium.Android#property-CATEGORY_TEST}
<li> {@link Titanium.Android#property-CATEGORY_UNIT_TEST}
<li> {@link Titanium.Android#property-CATEGORY_ALARM}
<li> {@link Titanium.Android#property-CATEGORY_CALL}
<li> {@link Titanium.Android#property-CATEGORY_EMAIL}
<li> {@link Titanium.Android#property-CATEGORY_ERROR}
<li> {@link Titanium.Android#property-CATEGORY_EVENT}
<li> {@link Titanium.Android#property-CATEGORY_MESSAGE}
<li> {@link Titanium.Android#property-CATEGORY_PROGRESS}
<li> {@link Titanium.Android#property-CATEGORY_PROMO}
<li> {@link Titanium.Android#property-CATEGORY_RECOMMENDATION}
<li> {@link Titanium.Android#property-CATEGORY_SERVICE}
<li> {@link Titanium.Android#property-CATEGORY_SOCIAL}
<li> {@link Titanium.Android#property-CATEGORY_STATUS}
<li> {@link Titanium.Android#property-CATEGORY_TRANSPORT}
</ul></p>
*/
/**
* @method addFlags
* <p>Adds to the existing flags on the <code>Intent</code>.</p>
* @description <p>The specified flag are combined with the existing flags using a bitwise OR.</p>
* @param {Number} flags
<p>Bitwise OR of the flags to add to the existing set.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_BROUGHT_TO_FRONT}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_CLEAR_TOP}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_FORWARD_RESULT}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_MULTIPLE_TASK}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_NEW_TASK}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_NO_ANIMATION}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_NO_HISTORY}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_NO_USER_ACTION}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_PREVIOUS_IS_TOP}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_REORDER_TO_FRONT}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_RESET_TASK_IF_NEEDED}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_SINGLE_TOP}
<li> {@link Titanium.Android#property-FLAG_DEBUG_LOG_RESOLUTION}
<li> {@link Titanium.Android#property-FLAG_FROM_BACKGROUND}
<li> {@link Titanium.Android#property-FLAG_GRANT_READ_URI_PERMISSION}
<li> {@link Titanium.Android#property-FLAG_GRANT_WRITE_URI_PERMISSION}
<li> {@link Titanium.Android#property-FLAG_RECEIVER_REGISTERED_ONLY}
<li> {@link Titanium.Android#property-FLAG_CANCEL_CURRENT}
<li> {@link Titanium.Android#property-FLAG_NO_CREATE}
<li> {@link Titanium.Android#property-FLAG_ONE_SHOT}
<li> {@link Titanium.Android#property-FLAG_UPDATE_CURRENT}
<li> {@link Titanium.Android#property-FLAG_AUTO_CANCEL}
<li> {@link Titanium.Android#property-FLAG_INSISTENT}
<li> {@link Titanium.Android#property-FLAG_NO_CLEAR}
<li> {@link Titanium.Android#property-FLAG_ONGOING_EVENT}
<li> {@link Titanium.Android#property-FLAG_ONLY_ALERT_ONCE}
<li> {@link Titanium.Android#property-FLAG_SHOW_LIGHTS}
</ul></p>
*/
/**
* @method getBlobExtra
* <p>Get a {@link Titanium.Blob} property from this <code>Intent</code>.</p>
* @param {String} name
<p>The {@link Titanium.Blob} extra to get, most commonly {@link Titanium.Android#property-EXTRA_STREAM}.</p>
* @returns {Titanium.Blob}
* @platform android 2.1.0
*/
/**
* @method getBooleanExtra
* <p>Get a boolean property from this Intent.</p>
* @param {String} name
<p>Property to get.</p>
* @returns {Boolean}
*/
/**
* @method getData
* <p>Get the Data URI from this <code>Intent</code>.</p>
* @returns {String}
*/
/**
* @method getDoubleExtra
* <p>Get a double property from this <code>Intent</code>.</p>
* @param {String} name
<p>Property to get.</p>
* @returns {Number}
*/
/**
* @method getIntExtra
* <p>Get an integer property from this <code>Intent</code>.</p>
* @param {String} name
<p>Property to get.</p>
* @returns {Number}
*/
/**
* @method getLongExtra
* <p>Get a long property from this <code>Intent</code>.</p>
* @param {String} name
<p>Property to get.</p>
* @returns {Number}
*/
/**
* @method getStringExtra
* <p>Get a string property from this <code>Intent</code>.</p>
* @description <p>Can also be used to get the string representation of a property that's stored
as an Android <code>Parcel</code>, such as a URI.</p>
<p>Titanium does not support <code>getParcelableExtra</code> due to the inability to translate
all of its possible return types to JavaScript.</p>
<p>See also:
[getParcelableExtra](<a href="http://developer.android.com/reference/android/content/Intent.html#getParcelableExtra(java.lang.String)">http://developer.android.com/reference/android/content/Intent.html#getParcelableExtra(java.lang.String)</a>
in the Android Developer Reference.</p>
* @param {String} name
<p>Property to get.</p>
* @returns {String}
*/
/**
* @method hasExtra
* <p>Returns <code>true</code> if this <code>Intent</code> has the specified property.</p>
* @param {String} name
<p>Property name to check for.</p>
* @returns {Boolean}
*/
/**
* @method putExtra
* <p>Puts an extra property on this <code>Intent</code>.</p>
* @param {String} name
<p>Name of the property to add.</p>
* @param {Object} value
<p>Property value to set.</p>
*/
/**
* @method putExtraUri
* <p>Put a URI property on this <code>Intent</code> (useful for {@link Titanium.Android#property-EXTRA_STREAM}).</p>
* @param {String} name
<p>The property name.</p>
* @param {Object} value
<p>The URI, as a string or a string array.</p>
*/
/**
* @method getAction
* <p>Gets the value of the {@link Titanium.Android.Intent#property-action} property.</p>
* @returns {String}
*/
/**
* @method setAction
* <p>Sets the value of the {@link Titanium.Android.Intent#property-action} property.</p>
* @param {String} action
<p>New value for the property.</p>
*/
/**
* @method getClassName
* <p>Gets the value of the {@link Titanium.Android.Intent#property-className} property.</p>
* @returns {String}
*/
/**
* @method setClassName
* <p>Sets the value of the {@link Titanium.Android.Intent#property-className} property.</p>
* @param {String} className
<p>New value for the property.</p>
*/
/**
* @method getData
* <p>Gets the value of the {@link Titanium.Android.Intent#property-data} property.</p>
* @returns {String}
*/
/**
* @method getFlags
* <p>Gets the value of the {@link Titanium.Android.Intent#property-flags} property.</p>
* @returns {Number}
*/
/**
* @method setFlags
* <p>Sets the value of the {@link Titanium.Android.Intent#property-flags} property.</p>
* @param {Number} flags
<p>New value for the property.</p>
*/
/**
* @method getPackageName
* <p>Gets the value of the {@link Titanium.Android.Intent#property-packageName} property.</p>
* @returns {String}
*/
/**
* @method setPackageName
* <p>Sets the value of the {@link Titanium.Android.Intent#property-packageName} property.</p>
* @param {String} packageName
<p>New value for the property.</p>
*/
/**
* @method getType
* <p>Gets the value of the {@link Titanium.Android.Intent#property-type} property.</p>
* @returns {String}
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.Android.Intent#property-url} property.</p>
* @returns {String}
*/
/**
* @method setUrl
* <p>Sets the value of the {@link Titanium.Android.Intent#property-url} property.</p>
* @param {String} url
<p>New value for the property.</p>
*/
/**
* @property action
* @type String
* @creationOnly
* <p>The action associated with this intent.</p>
* @description <p>Specify one of the <code>ACTION</code> constants from {@link Titanium.Android}, or an application-specific custom action string.</p>
*/
/**
* @property className
* @type String
* @creationOnly
* <p>The Java class name of the activity associated with this intent
({@link Titanium.Android.Intent#property-packageName packageName} must also be set).</p>
*/
/**
* @property data
* @type String
* @readonly
* @creationOnly
* <p>The Intent's Data URI.</p>
* @description <p>The data URI can be set when the intent is created. It is read-only after the
intent is created.</p>
<p>For more information on data URIs, see:
<a href="http://developer.android.com/reference/android/content/Intent.html#setData%28android.net.Uri%29">Intent.setData in the Android API Reference</a></p>
*/
/**
* @property flags
* @type Number
* <p>Intent flags.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_BROUGHT_TO_FRONT}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_CLEAR_TOP}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_FORWARD_RESULT}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_MULTIPLE_TASK}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_NEW_TASK}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_NO_ANIMATION}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_NO_HISTORY}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_NO_USER_ACTION}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_PREVIOUS_IS_TOP}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_REORDER_TO_FRONT}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_RESET_TASK_IF_NEEDED}
<li> {@link Titanium.Android#property-FLAG_ACTIVITY_SINGLE_TOP}
<li> {@link Titanium.Android#property-FLAG_DEBUG_LOG_RESOLUTION}
<li> {@link Titanium.Android#property-FLAG_FROM_BACKGROUND}
<li> {@link Titanium.Android#property-FLAG_GRANT_READ_URI_PERMISSION}
<li> {@link Titanium.Android#property-FLAG_GRANT_WRITE_URI_PERMISSION}
<li> {@link Titanium.Android#property-FLAG_RECEIVER_REGISTERED_ONLY}
<li> {@link Titanium.Android#property-FLAG_CANCEL_CURRENT}
<li> {@link Titanium.Android#property-FLAG_NO_CREATE}
<li> {@link Titanium.Android#property-FLAG_ONE_SHOT}
<li> {@link Titanium.Android#property-FLAG_UPDATE_CURRENT}
<li> {@link Titanium.Android#property-FLAG_AUTO_CANCEL}
<li> {@link Titanium.Android#property-FLAG_INSISTENT}
<li> {@link Titanium.Android#property-FLAG_NO_CLEAR}
<li> {@link Titanium.Android#property-FLAG_ONGOING_EVENT}
<li> {@link Titanium.Android#property-FLAG_ONLY_ALERT_ONCE}
<li> {@link Titanium.Android#property-FLAG_SHOW_LIGHTS}
</ul></p>
*/
/**
* @property packageName
* @type String
* @creationOnly
* <p>The fully-qualified Java package name of the activity.</p>
*/
/**
* @property type
* @type String
* @readonly
* @creationOnly
* <p>The MIME type for this Intent.</p>
* @description <p>The MIME type can be set when the intent is created. It is read-only after the
intent is created.</p>
<p>For information on MIME types and intents, see:
<a href="http://developer.android.com/reference/android/content/Intent.html#setType%28java.lang.String%29">Intent.setType in the Android API Reference</a>.</p>
*/
/**
* @property url
* @type String
* @creationOnly
* <p>The URL to a Titanium JavaScript Activity.</p>
*/
/**
* @class Titanium.Android.Menu
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Menu.yml
* <p>The Titanium binding of an Android Options Menu.</p>
* @description <p>Starting with Release 3.3.0, the Menu and MenuItems APIs are used to create the action items
for the action bar. Action items can appear in either the action bar or the action bar's
overflow menu.</p>
<p>To create action items with JavaScript, assign a callback function to the activity's
{@link Titanium.Android.Activity#property-onCreateOptionsMenu onCreateOptionsMenu} property.
The activity's menu object is passed in to the <code>onCreateOptionsMenu</code> function when the menu is created.
Use the Menu's {@link Titanium.Android.Menu#method-add add()} method to create new action items.</p>
<p>In Alloy you can use <code><Menu></code> and <code><MenuItem></code> elements to create an options menu.</p>
<pre><code><Menu id="menu" platform="android">
<!-- Cannot specify node text. Use attributes only. -->
<MenuItem id="saveitem" title="Save" icon="item1.png" onClick="doSave" />
<MenuItem id="closeitem" title="Close" icon="item1.png" onClick="doClose" />
</Menu>
</code></pre>
<p>To switch menu items dynamically, call
{@link Titanium.Android.Activity#method-invalidateOptionsMenu invalidateOptionsMenu}, which causes
the <code>onCreateOptionsMenu</code> callback to be called again.</p>
<h4>Menus on Tab Groups</h4>
<p>Prior to Titanium 3.0, menu items could be added to the individual windows of a tab
group.</p>
<p>Starting in Titanium 3.0, menus must be added to tab groups using the tab group's
activity. These changes were required to support the Android 3.0 action bar.</p>
<p>The TabGroup activity is available using {@link Titanium.UI.TabGroup#method-getActivity TabGroup.getActivity}.
However, unlike a window's activity it is not currently possible to set properties on
the tab group's activity before the tab group is opened. To add a menu to a tab group,
set the <code>onCreateOptionsMenu</code> property to the tab group's <code>open</code> event listener, and
then call <code>invalidateOptionsMenu</code> to force the changes to take effect.</p>
<pre><code>tabGroup.addEventListener("open", function(e) {
var activity = globals.tabs.getActivity();
activity.onCreateOptionsMenu = function(e) {
var menuItem = e.menu.add({
title : "Add Task",
showAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS,
icon : "add_icon.png"
});
menuItem.addEventListener("click", function(e) {
//
});
}
activity.invalidateOptionsMenu();
});
</code></pre>
<h3>Application Notes for Release 3.2.x and earlier</h3>
<p>If you are using Release 3.2.x and earlier, the options menu is presented differently
based on the Android version and application settings.</p>
<p>On Android devices prior to Android 3.0 (API level 11), the menu is always presented
as an options menu, which is displayed when the <strong>Menu</strong> button is pressed.</p>
<p>On Android 3.0 and later, menu items can be displayed as <em>action items</em> in the action
bar. To enable this, the application must be built with a theme that supports the
action bar, such as the Holo theme. (See
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Themes">Android Themes</a> in
the Titanium Guides for information on setting your application's theme.)</p>
<p>For menu items displayed in the menu, the <code>onCreateOptionsMenu</code> function is called
once, and the {@link Titanium.Android.Activity#property-onPrepareOptionsMenu onPrepareOptionsMenu} callback function is called each
time the menu is opened. The <code>onPrepareOptionsMenu</code> function can be used to switch menu items dynamically.</p>
<h4>Further Reading</h4>
<p>See also:</p>
<ul>
<li><p><a href="http://developer.android.com/guide/topics/ui/menus.html">Menus</a> in the
Android Developer Guides.</p></li>
<li><p><a href="http://developer.android.com/guide/topics/ui/actionbar.html">Action Bar</a> in
the Android Developer Guides.</p></li>
<li><p><a href="http://developer.android.com/reference/android/view/Menu.html">Menu</a>
in the Android Developer Reference.</p></li>
</ul>
* <h3>Examples</h3>
<h4>Creating a Simple Menu</h4>
<p>This sample creates an Android menu that displays a menu item named "Item 1",
which logs a debug message when clicked.</p>
<p>If the action bar is in use, the menu item will be displayed as an action item if there is room in the action bar.</p>
<pre><code>var win = Ti.UI.createWindow({
fullscreen: true
});
var activity = win.activity;
activity.onCreateOptionsMenu = function(e){
var menu = e.menu;
var menuItem = menu.add({
title: "Item 1",
icon: "item1.png",
showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM
});
menuItem.addEventListener("click", function(e) {
Ti.API.debug("I was clicked");
});
};
win.open();
</code></pre><h4>Creating a Dynamic Menu</h4>
<p>This sample creates an Android menu that displays a menu item named
"Login" or "Logout", depending on the value of a <code>loggedIn</code> Boolean variable.
Click on the item to toggle the variable's value.</p>
<pre><code>var win = Ti.UI.createWindow({
fullscreen: true
});
var LOGIN = 1, LOGOUT = 2;
var loggedIn = false;
var activity = win.activity;
activity.onCreateOptionsMenu = function(e){
var menu = e.menu;
var login = menu.add({ title: "Login", itemId: LOGIN });
login.setIcon("login.png");
login.addEventListener("click", function(e) {
loggedIn = true;
// In Android 3.0 and above we need to call invalidateOptionsMenu() for menu changes at runtime
win.activity.invalidateOptionsMenu();
});
var logout = menu.add({ title: "Logout", itemId: LOGOUT });
logout.setIcon("logout.png");
logout.addEventListener("click", function(e) {
loggedIn = false;
// In Android 3.0 and above we need to call invalidateOptionsMenu() for menu changes at runtime
win.activity.invalidateOptionsMenu();
});
};
activity.onPrepareOptionsMenu = function(e) {
var menu = e.menu;
menu.findItem(LOGIN).setVisible(!loggedIn);
menu.findItem(LOGOUT).setVisible(loggedIn);
};
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous simple menu example as an Alloy view.</p>
<p>Due to the way menus are created in Alloy, menus created using Alloy markup are not
displayed until the options menu is invalidated. To force menus (or action items)
to be displayed, call <code>invalidateOptionsMenu</code> from the <code>open</code> event listener of the window or tab group
where the menu is defined.</p>
<p>index.xml:</p>
<pre><code><Alloy>
<!-- Create a heavyweight window to use the Android menu. -->
<Window id="win" fullscreen="true" onOpen="doOpen">
<!-- The Menu tag adds the Android menu. -->
<Menu id="menu" platform="android">
<!-- Cannot specify node text. Use attributes only. -->
<MenuItem id="menuItem" title="Item 1" icon="item1.png" onClick="doClick" showAsAction="Ti.Android.SHOW_AS_ACTION_IF_ROOM" />
</Menu>
<!-- Place additional views here -->
</Window>
</Alloy>
</code></pre>
<p>index.js:</p>
<pre><code>function doClick(e) {
Ti.API.info("Menu item clicked: " + e.source.title);
}
// Ensure menu is displayed
function doOpen(e) {
$.win.invalidateOptionsMenu();
}
</code></pre>
*/
/**
* @method add
* <p>Creates a {@link Titanium.Android.MenuItem} from the passed creation options.</p>
* @param {Object} options
<p>Creation options. Supported options are
{@link Titanium.Android.MenuItem#property-itemId itemId},
{@link Titanium.Android.MenuItem#property-groupId groupId},
{@link Titanium.Android.MenuItem#property-title title},
{@link Titanium.Android.MenuItem#property-order order},
{@link Titanium.Android.MenuItem#property-actionView actionView},
{@link Titanium.Android.MenuItem#property-checkable checkable},
{@link Titanium.Android.MenuItem#property-checked checked},
{@link Titanium.Android.MenuItem#property-enabled enabled},
{@link Titanium.Android.MenuItem#property-icon icon},
{@link Titanium.Android.MenuItem#property-showAsAction showAsAction},
{@link Titanium.Android.MenuItem#property-titleCondensed titleCondensed}, and
{@link Titanium.Android.MenuItem#property-visible visible}.</p>
* @returns {Titanium.Android.MenuItem}
*/
/**
* @method clear
* <p>Clears all items from this menu.</p>
* @description <p>You should release all references you have retained to {@link Titanium.Android.MenuItem} previously created.</p>
*/
/**
* @method close
* <p>Closes the menu, if visible.</p>
*/
/**
* @method findItem
* <p>Locates a {@link Titanium.Android.MenuItem MenuItem} in this menu, by item ID or reference.</p>
* @description <p>Returns the identified menu item, or <code>null</code> if the menu item was not located.</p>
* @param {Number/Titanium.Android.MenuItem} item
<p>Integer {@link Titanium.Android.MenuItem#property-itemId itemId} or a reference to a <code>MenuItem</code> object.</p>
* @returns {Titanium.Android.MenuItem}
*/
/**
* @method getItem
* <p>Returns the {@link Titanium.Android.MenuItem MenuItem} at a specific index.</p>
* @description <p>Returns <code>null</code> if no menu item exists at the specified index.</p>
* @param {Number} index
<p>Index of the menu item to return.</p>
* @returns {Titanium.Android.MenuItem}
*/
/**
* @method hasVisibleItems
* <p>Returns <code>true</code> if this menu has visible items.</p>
* @returns {Boolean}
*/
/**
* @method removeGroup
* <p>Removes all menu items with the specified
{@link Titanium.Android.MenuItem#property-groupId groupId}.</p>
* @param {Number} groupId
<p>Group ID of items to remove.</p>
*/
/**
* @method removeItem
* <p>Removes a specific {@link Titanium.Android.MenuItem MenuItem} identified by its
{@link Titanium.Android.MenuItem#property-itemId itemId}.</p>
* @param {Number} itemId
<p>Item ID of item to remove.</p>
*/
/**
* @method setGroupEnabled
* <p>Enables or disables a group of menu items identified by a
{@link Titanium.Android.MenuItem#property-groupId groupId}.</p>
* @param {Number} groupId
<p>ID of the group to enable or disable.</p>
* @param {Boolean} enabled
<p>True to enable the specified group, false to disable it.</p>
*/
/**
* @method setGroupVisible
* <p>Shows or hides a group of menu items identified by a
{@link Titanium.Android.MenuItem#property-groupId groupId}.</p>
* @param {Number} groupId
<p>Group ID to enable or disable.</p>
* @param {Boolean} visible
<p>True to show the group, false to hide it.</p>
*/
/**
* @method size
* <p>Number of items in this menu.</p>
* @returns {Number}
*/
/**
* @method getItems
* <p>Gets the value of the {@link Titanium.Android.Menu#property-items} property.</p>
* @returns {Titanium.Android.MenuItem[]}
*/
/**
* @property items
* @type Titanium.Android.MenuItem[]
* @readonly
* <p>Array of menu items in this menu.</p>
*/
/**
* @class Titanium.Android.MenuItem
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/MenuItem.yml
* <p>The Titanium binding of an Android menu item.</p>
* @description <p>As of Release 3.3.0, the Menu and MenuItem APIs are used to create action items for the action bar.
Prior to Release 3.3.0, the APIs could also be used to customize the Options Menu.</p>
<p>In JavaScript, use the Menu's {@link Titanium.Android.Menu#method-add add()} method to create
new action items.</p>
<p>In Alloy you can define <strong><code><MenuItem></code></strong> elements inside a <code><Menu></code> element.</p>
<pre><code><Menu id="menu" platform="android">
<MenuItem id="saveitem" title="Save" icon="item1.png" onClick="doSave" />
<MenuItem id="closeitem" title="Close" icon="item1.png" onClick="doClose" />
</Menu>
</code></pre>
<p>Action items can appear in either the action bar or the action bar's
overflow menu. To determine how an action item is displayed, set
{@link Titanium.Android.MenuItem#property-showAsAction showAsAction}.</p>
<p>You can optionally customize the look of action items using the
{@link Titanium.Android.MenuItem#property-actionView actionView} property.</p>
<p>See the {@link Titanium.Android.Menu} reference page for additional code examples.</p>
<p>Further Reading:</p>
<ul>
<li><a href="http://developer.android.com/reference/android/view/MenuItem.html">Android Developers: MenuItem</a></li>
</ul>
*/
/**
* @event click
* <p>Fired when the user clicks the menu item.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event expand
* <p>Fired when the action view has been expanded.</p>
* @description <p>This is an action-bar specific API. Prior to Release 3.3.0, this API only works
on devices running Android 4.0 (API level 14) and greater.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event collapse
* <p>Fired when the action view has been collapsed.</p>
* @description <p>This is an action-bar specific API. Prior to Release 3.3.0, this API only works
on devices running Android 4.0 (API level 14) and greater.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @method collapseActionView
* <p>Collapse the action view associated with this menu item.</p>
* @description <p>This is an action-bar specific API. Prior to Release 3.3.0, this API only works
on devices running Android 4.0 (API level 14) and greater.</p>
* @platform android 3.0.0
*/
/**
* @method expandActionView
* <p>Expand the action view associated with this menu item.</p>
* @description <p>This is an action-bar specific API. Prior to Release 3.3.0, this API only works
on devices running Android 3.0 (API level 11) and greater.</p>
* @platform android 3.0.0
*/
/**
* @method isActionViewExpanded
* <p>Returns the {@link Titanium.Android.MenuItem#property-actionViewExpanded actionViewExpanded} state of the menu item.</p>
* @description <p>This is an action-bar specific API. Prior to Release 3.3.0, this API only works
on devices running Android 4.0 (API level 14) and greater.</p>
* @returns {Boolean}
*/
/**
* @method isCheckable
* <p>Returns the {@link Titanium.Android.MenuItem#property-checkable checkable} state of the menu item.</p>
* @returns {Boolean}
*/
/**
* @method isChecked
* <p>Returns the {@link Titanium.Android.MenuItem#property-checked checked} state of the menu item.</p>
* @returns {Boolean}
*/
/**
* @method isEnabled
* <p>Returns the {@link Titanium.Android.MenuItem#property-enabled enabled} state of the menu item.</p>
* @returns {Boolean}
*/
/**
* @method isVisible
* <p>Returns the {@link Titanium.Android.MenuItem#property-visible visible} state of the menu item.</p>
* @returns {Boolean}
*/
/**
* @method setCheckable
* <p>Sets the {@link Titanium.Android.MenuItem#property-checkable checkable} state of the menu item.</p>
* @param {Boolean} checkable
<p>True enable checking and unchecking this item, false to disable it.</p>
*/
/**
* @method setChecked
* <p>Sets the {@link Titanium.Android.MenuItem#property-checked checked} state of the menu item.</p>
* @param {Boolean} enabled
<p>True to check the item, false to uncheck it.</p>
*/
/**
* @method setEnabled
* <p>Sets the {@link Titanium.Android.MenuItem#property-enabled enabled} state of the menu item.</p>
* @param {Boolean} enabled
<p>True to enable item, false to disable it.</p>
*/
/**
* @method setVisible
* <p>Sets the {@link Titanium.Android.MenuItem#property-visible visible} state of the menu item.</p>
* @param {Boolean} visible
<p>True to show the item, false to hide it.</p>
*/
/**
* @method getActionView
* <p>Gets the value of the {@link Titanium.Android.MenuItem#property-actionView} property.</p>
* @returns {Titanium.UI.View}
* @platform android 3.0.0
*/
/**
* @method setActionView
* <p>Sets the value of the {@link Titanium.Android.MenuItem#property-actionView} property.</p>
* @param {Titanium.UI.View} actionView
<p>New value for the property.</p>
* @platform android 3.0.0
*/
/**
* @method getGroupId
* <p>Gets the value of the {@link Titanium.Android.MenuItem#property-groupId} property.</p>
* @returns {Number}
*/
/**
* @method setIcon
* <p>Sets the value of the {@link Titanium.Android.MenuItem#property-icon} property.</p>
* @param {Number/String} icon
<p>New value for the property.</p>
*/
/**
* @method getItemId
* <p>Gets the value of the {@link Titanium.Android.MenuItem#property-itemId} property.</p>
* @returns {Number}
*/
/**
* @method getOrder
* <p>Gets the value of the {@link Titanium.Android.MenuItem#property-order} property.</p>
* @returns {Number}
*/
/**
* @method setShowAsAction
* <p>Sets the value of the {@link Titanium.Android.MenuItem#property-showAsAction} property.</p>
* @param {Number} showAsAction
<p>New value for the property.</p>
* @platform android 3.0.0
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.Android.MenuItem#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.Android.MenuItem#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getTitleCondensed
* <p>Gets the value of the {@link Titanium.Android.MenuItem#property-titleCondensed} property.</p>
* @returns {String}
*/
/**
* @method setTitleCondensed
* <p>Sets the value of the {@link Titanium.Android.MenuItem#property-titleCondensed} property.</p>
* @param {String} titleCondensed
<p>New value for the property.</p>
*/
/**
* @property actionView
* @type Titanium.UI.View
* <p>Custom view that replaces the default menu item button.</p>
* @description <p>This is an action-bar specific API. Prior to Release 3.3.0, this API only works
on devices running Android 3.0 (API level 11) and greater.</p>
<p>In order to display the custom view, set the item's
{@link Titanium.Android.MenuItem#property-showAsAction showAsAction} property to either
<code>Titanium.Android.SHOW_AS_ACTION_ALWAYS</code> or
<code>Titanium.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW</code>.</p>
<p>Since Alloy 1.6.0, you can specify this property using the <code><ActionView></code> element as a child
of the <code><MenuItem></code> element, for example:</p>
<pre><code><Alloy>
<Window>
<Menu>
<MenuItem showAsAction="Ti.Android.SHOW_AS_ACTION_ALWAYS" title="Search">
<ActionView>
<SearchView ns="Ti.UI.Android" hintText="Type Something"/>
</ActionView>
</MenuItem>
</Menu>
</Window>
</Alloy>
</code></pre>
* @platform android 3.0.0
*/
/**
* @property actionViewExpanded
* @type Boolean
* @readonly
* <p>True if this menu item's action view has been expanded.</p>
* @description <p>This is an action-bar specific API. Prior to Release 3.3.0, this API only works
on devices running Android 4.0 (API level 14) and greater.</p>
* @platform android 3.0.0
*/
/**
* @property [checkable=false]
* @type Boolean
* <p>Determines if the item can be checked.</p>
* @description <p>Note that check marks are not supported in the icon menus (main
options menu shown when fewer than six options are included).
Check marks are discouraged in expanded menus (available when
six or more options menu items are defined).</p>
*/
/**
* @property [checked=false]
* @type Boolean
* <p>Determines if the item is checked.</p>
* @description <p>Note that check marks are not supported in the icon menus (main
options menu shown when fewer than six options are included).
Check marks are discouraged in expanded menus (available when
six or more options menu items are defined).</p>
*/
/**
* @property [enabled=true]
* @type Boolean
* <p>Determines if the item is enabled.</p>
*/
/**
* @property groupId
* @type Number
* @readonly
* @creationOnly
* <p>Group ID for this item.</p>
* @description <p>Items that share a group ID may be operated on as a group using
the menu's {@link Titanium.Android.Menu#method-setGroupEnabled setGroupEnabled} and
{@link Titanium.Android.Menu#method-setGroupVisible setGroupVisible} methods.</p>
*/
/**
* @property icon
* @type Number/String
* @writeonly
* <p>Icon to display for the this menu item.</p>
* @description <p>Icons are not displayed in expanded menus.</p>
<p>Icons can be specified as a local image URI or an Android resource ID.</p>
*/
/**
* @property itemId
* @type Number
* @readonly
* @creationOnly
* <p>Item ID for this item.</p>
*/
/**
* @property order
* @type Number
* @readonly
* @creationOnly
* <p>Integer used for controlling the category and sort order for menu items.</p>
* @description <p>The lower bits of this value control the order of the menu item related to other
menu items within its category. A menu item with a given value will be displayed
before any items with higher values.</p>
<p>The upper bits of the value control the category. These can be set to the values
defined by the <code>CATEGORY</code> constants in the Android <code>Menu</code> class,
These values are not exposed as constants in Titanium.</p>
<p>See also:</p>
<ul>
<li><p><a href="http://developer.android.com/reference/android/view/MenuItem.html#getOrder%28%29">getOrder</a>
in the Android Developer Reference.</p></li>
<li><p><a href="http://developer.android.com/reference/android/view/Menu.html">Menu</a> in the
Android Developer Reference for definitions of the <code>CATEGORY</code> values.</p></li>
</ul>
*/
/**
* @property showAsAction
* @type Number
* @writeonly
* <p>A set of flags that controls how this item appears in the action bar.</p>
* @description <p>This is an action-bar specific API. Prior to Release 3.3.0, this property only works
on devices running Android 3.0 (API level 11) and greater.</p>
<p>You may set one or more flags (by OR'ing them together) to control how
this menu item should be placed inside the action bar.</p>
<p>To control if your item should be displayed as an action button or
placed in the overflow menu set one of these flags:
{@link Titanium.Android#property-SHOW_AS_ACTION_ALWAYS},
{@link Titanium.Android#property-SHOW_AS_ACTION_IF_ROOM},
or {@link Titanium.Android#property-SHOW_AS_ACTION_NEVER}.</p>
<p>If you only wish to display the text label even if the item
has an icon set the {@link Titanium.Android#property-SHOW_AS_ACTION_WITH_TEXT} flag.
Note that the <code>SHOW_AS_ACTION_WITH_TEXT</code> setting is only a hint to the system --
the text may or may not be shown depending on the width of the screen. For
example, text may not be shown on phones in portrait mode. In addition if the
application can be displayed in both portrait and landscape mode, whether or not
the text is displayed depends on the device's orientation <em>when the application
launches</em>. (This is true of both Titanium applications and native Android
applications.) For this reason, using <code>SHOW_AS_ACTION_WITH_TEXT</code> is not recommended
for applications that support both orientions.</p>
<p>If you want to guarantee that text and icon are always visible, you can create a
button with the text and image, and specify it as the item's <code>actionView</code>.</p>
<p>You may specify if your action view is collapsible by setting this property to
{@link Titanium.Android#property-SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW}.</p>
<p>For a collapsible item, the item button (icon and/or text) is displayed when the item is
collapsed, and the action view is displayed when the item is expanded.</p>
<p>If <code>SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW</code> is <strong>not</strong> specified, any <code>actionView</code>
specified is displayed <em>instead of</em> the item's icon and/or text.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-SHOW_AS_ACTION_ALWAYS}
<li> {@link Titanium.Android#property-SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW}
<li> {@link Titanium.Android#property-SHOW_AS_ACTION_IF_ROOM}
<li> {@link Titanium.Android#property-SHOW_AS_ACTION_NEVER}
<li> {@link Titanium.Android#property-SHOW_AS_ACTION_WITH_TEXT}
</ul></p>
* @platform android 3.0.0
*/
/**
* @property title
* @type String
* <p>Title of the item.</p>
*/
/**
* @property titleCondensed
* @type String
* <p>Shortened version of the item's title.</p>
* @description <p>If both <code>title</code> and <code>titleCondensed</code> are specified, <code>titleCondensed</code> is used in the
icon menus, and the <code>title</code> is used in the extended menus.</p>
*/
/**
* @property [visible=true]
* @type Boolean
* <p>Determines whether the menu item is visible.</p>
*/
/**
* @class Titanium.Android.Notification
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Notification.yml
* <p>UI notifications that can be sent while the application is in the background.</p>
* @description <p>Notifications alert the user that something is happening to your application while it is
in the background. Notifications appear in the notification drawer until the user
clears them and on the lock screen for devices running Android 5.0 or greater.
Note that the user can filter or turn notifications on and off from <strong>Settings</strong>.</p>
<p>For Android toast notifications (pop-up notifications sent while the application is in the
foreground), see {@link Titanium.UI.Notification}.</p>
<p>To create a notification, use the {@link Titanium.Android#method-createNotification} method.</p>
<p>Pass the Notification object to the methods of the {@link Titanium.Android.NotificationManager} class
to send or cancel notifications.</p>
<p>For examples of using Notifications, see <a href="#!/guide/Android_Notifications">Android Notifications</a>.</p>
<p>Further Reading:</p>
<ul>
<li><a href="http://developer.android.com/design/patterns/notifications.html">Android Developers: Notifications</a></li>
</ul>
<h4>Android 5.0 Changes</h4>
<p>Starting with Android 5.0 (API 21), ticker text, defined with the <code>tickerText</code> property,
no longer appears in the status bar when the notification is first sent but is used as an
audible notification if accessibility services are enabled.</p>
<p>Notifications now appear in the lock screen. The user can customize the visibility level of
these notifications from <strong>Settings</strong>. The visibility level is based on the <code>visibility</code>
property set on the notification.</p>
* <h3>Examples</h3>
<h4>Simple Notification Example</h4>
<p>The following example shows how to create a notification that launches the
application when the user clicks on the notification.</p>
<p>To have the notification launch an application when the user clicks on it,
assign the <code>contentIntent</code> property to an {@link Titanium.Android.Intent Intent} object
that launches the main activity of the application by specifying the <code>packageName</code>
and <code>className</code> properties of the intent.</p>
<p>The <code>packageName</code> is the project's application ID. For Titanium applications, you
can find this in the <code>tiapp.xml</code> file.</p>
<p>The <code>className</code> is the name of the main activity, prefixed with the <code>packageName</code>.
For Titanium applications, the name of the main activity is the application name with
only the first character capitalized suffixed with <code>Activity</code>. You can also find the name
of the main activity in the <code>build/android/AndroidManifest.xml</code> file after you build your
application.</p>
<p>For example, if the application ID is <code>com.appcelerator.notificationsample</code> and the
application name is <code>NotificationSample</code>, the class name will be:</p>
<pre><code>com.appcelerator.notificationsample.NotificationsampleActivity
</code></pre>
<p>The notification icon must be specified as an Android resource ID. In this case,
the icon, <code>my_icon.png</code> would be placed in <code>platforms/android/res/drawable/my_icon.png</code>.
See {@link Titanium.App.Android.R} for more information.</p>
<p>This example does not include a custom alert sound. For information on adding a
custom alert sound, see {@link Titanium.Android.Notification#property-sound Notification.sound}.</p>
<pre><code>// Intent object to launch the application
var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_MAIN,
// Substitute the correct class name for your application
className: 'com.appcelerator.notificationsample.NotificationsampleActivity',
// Substitue the correct package name for your application
packageName: 'com.appcelerator.notificationsample'
});
intent.flags |= Ti.Android.FLAG_ACTIVITY_CLEAR_TOP | Ti.Android.FLAG_ACTIVITY_NEW_TASK;
intent.addCategory(Ti.Android.CATEGORY_LAUNCHER);
// Create a PendingIntent to tie together the Activity and Intent
var pending = Titanium.Android.createPendingIntent({
intent: intent,
flags: Titanium.Android.FLAG_UPDATE_CURRENT
});
// Create the notification
var notification = Titanium.Android.createNotification({
// icon is passed as an Android resource ID -- see Ti.App.Android.R.
icon: Ti.App.Android.R.drawable.my_icon,
contentTitle: 'Something Happened',
contentText : 'Click to return to the application.',
contentIntent: pending
});
// Send the notification.
Titanium.Android.NotificationManager.notify(1, notification);
</code></pre>
*/
/**
* @method setLatestEventInfo
* <p>Sets the latest event info using the built-in notification view for this notification.</p>
* @param {String} contentTitle
<p>Title to display when the notification is expanded.</p>
* @param {String} contentText
<p>Text to display when the notification is expanded.</p>
* @param {Titanium.Android.PendingIntent} contentIntent
<p>Intent to launch when the user clicks on the notification.</p>
*/
/**
* @method getAudioStreamType
* <p>Gets the value of the {@link Titanium.Android.Notification#property-audioStreamType} property.</p>
* @returns {Number}
*/
/**
* @method setAudioStreamType
* <p>Sets the value of the {@link Titanium.Android.Notification#property-audioStreamType} property.</p>
* @param {Number} audioStreamType
<p>New value for the property.</p>
*/
/**
* @method getCategory
* <p>Gets the value of the {@link Titanium.Android.Notification#property-category} property.</p>
* @returns {String}
* @platform android 3.6.0
*/
/**
* @method setCategory
* <p>Sets the value of the {@link Titanium.Android.Notification#property-category} property.</p>
* @param {String} category
<p>New value for the property.</p>
* @platform android 3.6.0
*/
/**
* @method getContentIntent
* <p>Gets the value of the {@link Titanium.Android.Notification#property-contentIntent} property.</p>
* @returns {Titanium.Android.PendingIntent}
*/
/**
* @method setContentIntent
* <p>Sets the value of the {@link Titanium.Android.Notification#property-contentIntent} property.</p>
* @param {Titanium.Android.PendingIntent} contentIntent
<p>New value for the property.</p>
*/
/**
* @method getContentText
* <p>Gets the value of the {@link Titanium.Android.Notification#property-contentText} property.</p>
* @returns {String}
*/
/**
* @method setContentText
* <p>Sets the value of the {@link Titanium.Android.Notification#property-contentText} property.</p>
* @param {String} contentText
<p>New value for the property.</p>
*/
/**
* @method getContentTitle
* <p>Gets the value of the {@link Titanium.Android.Notification#property-contentTitle} property.</p>
* @returns {String}
*/
/**
* @method setContentTitle
* <p>Sets the value of the {@link Titanium.Android.Notification#property-contentTitle} property.</p>
* @param {String} contentTitle
<p>New value for the property.</p>
*/
/**
* @method setContentView
* <p>Sets the value of the {@link Titanium.Android.Notification#property-contentView} property.</p>
* @param {Titanium.Android.RemoteViews} contentView
<p>New value for the property.</p>
*/
/**
* @method getDefaults
* <p>Gets the value of the {@link Titanium.Android.Notification#property-defaults} property.</p>
* @returns {Number}
*/
/**
* @method setDefaults
* <p>Sets the value of the {@link Titanium.Android.Notification#property-defaults} property.</p>
* @param {Number} defaults
<p>New value for the property.</p>
*/
/**
* @method getDeleteIntent
* <p>Gets the value of the {@link Titanium.Android.Notification#property-deleteIntent} property.</p>
* @returns {Titanium.Android.PendingIntent}
*/
/**
* @method setDeleteIntent
* <p>Sets the value of the {@link Titanium.Android.Notification#property-deleteIntent} property.</p>
* @param {Titanium.Android.PendingIntent} deleteIntent
<p>New value for the property.</p>
*/
/**
* @method getFlags
* <p>Gets the value of the {@link Titanium.Android.Notification#property-flags} property.</p>
* @returns {Number}
*/
/**
* @method setFlags
* <p>Sets the value of the {@link Titanium.Android.Notification#property-flags} property.</p>
* @param {Number} flags
<p>New value for the property.</p>
*/
/**
* @method getIcon
* <p>Gets the value of the {@link Titanium.Android.Notification#property-icon} property.</p>
* @returns {Number/String}
*/
/**
* @method setIcon
* <p>Sets the value of the {@link Titanium.Android.Notification#property-icon} property.</p>
* @param {Number/String} icon
<p>New value for the property.</p>
*/
/**
* @method getLargeIcon
* <p>Gets the value of the {@link Titanium.Android.Notification#property-largeIcon} property.</p>
* @returns {Number/String}
* @platform android 4.2.0
*/
/**
* @method setLargeIcon
* <p>Sets the value of the {@link Titanium.Android.Notification#property-largeIcon} property.</p>
* @param {Number/String} largeIcon
<p>New value for the property.</p>
* @platform android 4.2.0
*/
/**
* @method getLedARGB
* <p>Gets the value of the {@link Titanium.Android.Notification#property-ledARGB} property.</p>
* @returns {Number}
*/
/**
* @method setLedARGB
* <p>Sets the value of the {@link Titanium.Android.Notification#property-ledARGB} property.</p>
* @param {Number} ledARGB
<p>New value for the property.</p>
*/
/**
* @method getLedOffMS
* <p>Gets the value of the {@link Titanium.Android.Notification#property-ledOffMS} property.</p>
* @returns {Number}
*/
/**
* @method setLedOffMS
* <p>Sets the value of the {@link Titanium.Android.Notification#property-ledOffMS} property.</p>
* @param {Number} ledOffMS
<p>New value for the property.</p>
*/
/**
* @method getLedOnMS
* <p>Gets the value of the {@link Titanium.Android.Notification#property-ledOnMS} property.</p>
* @returns {Number}
*/
/**
* @method setLedOnMS
* <p>Sets the value of the {@link Titanium.Android.Notification#property-ledOnMS} property.</p>
* @param {Number} ledOnMS
<p>New value for the property.</p>
*/
/**
* @method getNumber
* <p>Gets the value of the {@link Titanium.Android.Notification#property-number} property.</p>
* @returns {Number}
*/
/**
* @method setNumber
* <p>Sets the value of the {@link Titanium.Android.Notification#property-number} property.</p>
* @param {Number} number
<p>New value for the property.</p>
*/
/**
* @method getPriority
* <p>Gets the value of the {@link Titanium.Android.Notification#property-priority} property.</p>
* @returns {Number}
* @platform android 3.6.0
*/
/**
* @method setPriority
* <p>Sets the value of the {@link Titanium.Android.Notification#property-priority} property.</p>
* @param {Number} priority
<p>New value for the property.</p>
* @platform android 3.6.0
*/
/**
* @method getSound
* <p>Gets the value of the {@link Titanium.Android.Notification#property-sound} property.</p>
* @returns {String}
*/
/**
* @method setSound
* <p>Sets the value of the {@link Titanium.Android.Notification#property-sound} property.</p>
* @param {String} sound
<p>New value for the property.</p>
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.Android.Notification#property-style} property.</p>
* @returns {Titanium.Android.BigTextStyle/Titanium.Android.BigPictureStyle}
* @platform android 5.4.0
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.Android.Notification#property-style} property.</p>
* @param {Titanium.Android.BigTextStyle/Titanium.Android.BigPictureStyle} style
<p>New value for the property.</p>
* @platform android 5.4.0
*/
/**
* @method getTickerText
* <p>Gets the value of the {@link Titanium.Android.Notification#property-tickerText} property.</p>
* @returns {String}
*/
/**
* @method setTickerText
* <p>Sets the value of the {@link Titanium.Android.Notification#property-tickerText} property.</p>
* @param {String} tickerText
<p>New value for the property.</p>
*/
/**
* @method getVisibility
* <p>Gets the value of the {@link Titanium.Android.Notification#property-visibility} property.</p>
* @returns {Number}
* @platform android 3.6.0
*/
/**
* @method setVisibility
* <p>Sets the value of the {@link Titanium.Android.Notification#property-visibility} property.</p>
* @param {Number} visibility
<p>New value for the property.</p>
* @platform android 3.6.0
*/
/**
* @method getWhen
* <p>Gets the value of the {@link Titanium.Android.Notification#property-when} property.</p>
* @returns {Date/Number}
*/
/**
* @method setWhen
* <p>Sets the value of the {@link Titanium.Android.Notification#property-when} property.</p>
* @param {Date/Number} when
<p>New value for the property.</p>
*/
/**
* @property audioStreamType
* @type Number
* <p>The audio stream type to use when playing the sound.</p>
* @description <p>Specify one of the <code>STREAM</code> constants from {@link Titanium.Android}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-STREAM_ALARM}
<li> {@link Titanium.Android#property-STREAM_DEFAULT}
<li> {@link Titanium.Android#property-STREAM_MUSIC}
<li> {@link Titanium.Android#property-STREAM_NOTIFICATION}
<li> {@link Titanium.Android#property-STREAM_RING}
<li> {@link Titanium.Android#property-STREAM_SYSTEM}
<li> {@link Titanium.Android#property-STREAM_VOICE_CALL}
</ul></p>
*/
/**
* @property category
* @type String
* <p>Sets the notification's category.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>If your notification falls into one of the predefined categories, assign it accordingly.
Aspects of the system UI such as the notification shade may use this information
to make ranking and filtering decisions. This property only works for devices running Android 5.0 (API 21)
and greater.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-CATEGORY_ALTERNATIVE}
<li> {@link Titanium.Android#property-CATEGORY_BROWSABLE}
<li> {@link Titanium.Android#property-CATEGORY_DEFAULT}
<li> {@link Titanium.Android#property-CATEGORY_DEVELOPMENT_PREFERENCE}
<li> {@link Titanium.Android#property-CATEGORY_EMBED}
<li> {@link Titanium.Android#property-CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST}
<li> {@link Titanium.Android#property-CATEGORY_HOME}
<li> {@link Titanium.Android#property-CATEGORY_INFO}
<li> {@link Titanium.Android#property-CATEGORY_LAUNCHER}
<li> {@link Titanium.Android#property-CATEGORY_MONKEY}
<li> {@link Titanium.Android#property-CATEGORY_OPENABLE}
<li> {@link Titanium.Android#property-CATEGORY_PREFERENCE}
<li> {@link Titanium.Android#property-CATEGORY_SAMPLE_CODE}
<li> {@link Titanium.Android#property-CATEGORY_SELECTED_ALTERNATIVE}
<li> {@link Titanium.Android#property-CATEGORY_TAB}
<li> {@link Titanium.Android#property-CATEGORY_TEST}
<li> {@link Titanium.Android#property-CATEGORY_UNIT_TEST}
<li> {@link Titanium.Android#property-CATEGORY_ALARM}
<li> {@link Titanium.Android#property-CATEGORY_CALL}
<li> {@link Titanium.Android#property-CATEGORY_EMAIL}
<li> {@link Titanium.Android#property-CATEGORY_ERROR}
<li> {@link Titanium.Android#property-CATEGORY_EVENT}
<li> {@link Titanium.Android#property-CATEGORY_MESSAGE}
<li> {@link Titanium.Android#property-CATEGORY_PROGRESS}
<li> {@link Titanium.Android#property-CATEGORY_PROMO}
<li> {@link Titanium.Android#property-CATEGORY_RECOMMENDATION}
<li> {@link Titanium.Android#property-CATEGORY_SERVICE}
<li> {@link Titanium.Android#property-CATEGORY_SOCIAL}
<li> {@link Titanium.Android#property-CATEGORY_STATUS}
<li> {@link Titanium.Android#property-CATEGORY_TRANSPORT}
</ul></p>
* @platform android 3.6.0
*/
/**
* @property contentIntent
* @type Titanium.Android.PendingIntent
* <p>The <code>PendingIntent</code> to execute when the expanded status entry is clicked.</p>
*/
/**
* @property contentText
* @type String
* <p>Description text of the notification.</p>
*/
/**
* @property contentTitle
* @type String
* <p>Title of the notification.</p>
*/
/**
* @property contentView
* @type Titanium.Android.RemoteViews
* @writeonly
* <p>Custom layout to display in the notification.</p>
* @description <p>Calling {@link Titanium.Android.Notification#method-setLatestEventInfo setLatestEventInfo} or
setting the <code>contentText</code> or <code>contentTitle</code> properties causes the notification to use
the default notification layout, overriding any custom layout set through
<code>contentView</code>.</p>
<p>If you use a custom layout, you can use the
{@link Titanium.Android.RemoteViews RemoteViews} methods to update the displayed
notification.</p>
*/
/**
* @property defaults
* @type Number
* <p>Specifies which values should be taken from the defaults.</p>
* @description <p>Specify the bitwise OR of the desired values:
{@link Titanium.Android#property-DEFAULT_LIGHTS}, {@link Titanium.Android#property-DEFAULT_SOUND}, and
{@link Titanium.Android#property-DEFAULT_VIBRATE}. Use {@link Titanium.Android#property-DEFAULT_ALL} to specify
that all values should be taken from the defaults.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-DEFAULT_ALL}
<li> {@link Titanium.Android#property-DEFAULT_LIGHTS}
<li> {@link Titanium.Android#property-DEFAULT_SOUND}
<li> {@link Titanium.Android#property-DEFAULT_VIBRATE}
</ul></p>
*/
/**
* @property deleteIntent
* @type Titanium.Android.PendingIntent
* <p>The <code>PendingIntent</code> to execute when the status entry is deleted by the user with the "Clear All Notifications" button.</p>
*/
/**
* @property [flags={@link Titanium.Android#property-FLAG_AUTO_CANCEL}]
* @type Number
* <p>Set of flags for the notification.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-FLAG_AUTO_CANCEL}
<li> {@link Titanium.Android#property-FLAG_INSISTENT}
<li> {@link Titanium.Android#property-FLAG_NO_CLEAR}
<li> {@link Titanium.Android#property-FLAG_ONGOING_EVENT}
<li> {@link Titanium.Android#property-FLAG_ONLY_ALERT_ONCE}
<li> {@link Titanium.Android#property-FLAG_SHOW_LIGHTS}
</ul></p>
*/
/**
* @property icon
* @type Number/String
* <p>Notification icon, specified as an Android resource ID, or a local URL to a density-specific image.</p>
* @description <p>If specified as a URL, the icon must be placed in one of the density-specific
folders under <code>Resources/android/images</code>. For example, if your icon is called
<code>my_icon.png</code>, you would create high- and medium-density versions of the icons
with the following paths:</p>
<pre><code>Resources/android/images/res-hdpi/my_icon.png
Resources/android/images/res-mdpi/my_icon.png
</code></pre>
<p>To access this icon, you'd use the URL '/images/my_icon.png'.</p>
<p>To access the same icon using an Android resource ID, place the icon in:</p>
<pre><code>platform/android/res/drawable/my_icon.png
</code></pre>
<p>This icon's resource ID can be referenced through the {@link Titanium.App.Android.R}
object:</p>
<pre><code>icon: Ti.App.Android.R.drawable.my_icon,
</code></pre>
<p>See {@link Titanium.App.Android.R} for more information on accessing
Android resources by ID.</p>
*/
/**
* @property largeIcon
* @type Number/String
* <p>Add a large icon to the notification (and the ticker on some devices) specified as an Android resource ID, or a local URL to a density-specific image.</p>
* @description <p>If specified as a URL, the icon must be placed in one of the density-specific
folders under <code>Resources/android/images</code>. For example, if your icon is called
<code>my_large_icon.png</code>, you would create high- and medium-density versions of the icons
with the following paths:</p>
<pre><code>Resources/android/images/res-hdpi/my_large_icon.png
Resources/android/images/res-mdpi/my_large_icon.png
</code></pre>
<p>To access this large icon, you'd use the URL '/images/my_large_icon.png'.</p>
<p>To access the same large icon using an Android resource ID, place the icon in:</p>
<pre><code>platform/android/res/drawable/my_large_icon.png
</code></pre>
<p>This large icon's resource ID can be referenced through the {@link Titanium.App.Android.R}
object:</p>
<pre><code>icon: Ti.App.Android.R.drawable.my_large_icon,
</code></pre>
<p>See {@link Titanium.App.Android.R} for more information on accessing
Android resources by ID.</p>
* @platform android 4.2.0
*/
/**
* @property ledARGB
* @type Number
* <p>The color for the LED to blink.</p>
*/
/**
* @property ledOffMS
* @type Number
* <p>The number of milliseconds for the LED to be off while it's flashing.</p>
*/
/**
* @property ledOnMS
* @type Number
* <p>The number of milliseconds for the LED to be on while it's flashing.</p>
*/
/**
* @property number
* @type Number
* <p>The number of events that this notification represents.</p>
*/
/**
* @property [priority=undefined but behaves as Titanium.Android.PRIORITY_DEFAULT]
* @type Number
* <p>Sets the priority of the notification.</p>
* <p> <b>Requires:</b>
Android 4.1 and later
</p>
* @description <p>This property only works for devices running Android 4.1 (API 16) and greater.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-PRIORITY_MAX}
<li> {@link Titanium.Android#property-PRIORITY_HIGH}
<li> {@link Titanium.Android#property-PRIORITY_DEFAULT}
<li> {@link Titanium.Android#property-PRIORITY_LOW}
<li> {@link Titanium.Android#property-PRIORITY_MIN}
</ul></p>
* @platform android 3.6.0
*/
/**
* @property sound
* @type String
* <p>A URL to the sound to play.</p>
* @description <p>The URL cannot refer to a file in the Resources directory, but it can refer to
a file in the raw resources directory
({@link Titanium.Filesystem#property-resRawDirectory Filesystem.resRawDirectory}) or the
external storage directory
({@link Titanium.Filesystem#property-externalStorageDirectory Filesystem.externalStorageDirectory}).</p>
<p>To create a raw resource, place the audio file in the <code>platform/android/res/raw</code>
folder and reference it as:</p>
<pre><code>notification.sound = Ti.Filesystem.getResRawDirectory() + audioFileName;
</code></pre>
<p>To play a file from the Resources directory, first copy it to external storage. For example, you
could define the following function:</p>
<pre><code>// Copy resource file to SD card, and return a native path.
// Return undefined if we can't copy the file.
function getOrCopyAudioFile(resourceFilename) {
var outFile = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory, 'sound', 'cricket.wav');
var outPath = outFile.nativePath;
if (! outFile.exists()) {
var outDir = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory, 'sound');
if (! outDir.isDirectory()) {
if (! outDir.createDirectory()) {
Ti.API.debug("Failed to create directory.");
outDir = null;
return undefined;
}
}
outDir = null;
var inFile = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'cricket.wav');
try {
inFile.copy(outPath);
} catch (ex) {
Ti.API.debug("Failed to copy file.");
inFile = null;
return undefined;
}
inFile = null;
}
outFile = null;
return outPath;
}
</code></pre>
<p>Then when creating a notification, specify the sound like this:</p>
<pre><code>var sound = getOrCopyAudioFile();
if (sound) {
notification.sound = sound;
}
</code></pre>
*/
/**
* @property style
* @type Titanium.Android.BigTextStyle/Titanium.Android.BigPictureStyle
* <p>Style object that can apply a rich notification style.</p>
* @description <p>Notifications in the notification drawer appear in two main visual styles, normal view and big view.
The big view of a notification only appears when the notification is expanded.
This happens when the notification is at the top of the drawer, or the user clicks the notification.
On platform versions that don't offer expanded notifications, styles that depend on expanded notifications have no effect.</p>
* @platform android 5.4.0
*/
/**
* @property tickerText
* @type String
* <p>Text to scroll across the screen when this item is added to the status bar.</p>
* @description <p>For devices running Android 5.0 (API 21) and greater, the ticket text is no longer displayed
in the status bar. However, this property is used as an audible notification if accessibility
services are enabled.</p>
*/
/**
* @property [visibility=undefined but behaves as Titanium.Android.VISIBILITY_PUBLIC]
* @type Number
* <p>Allows user to conceal private information of the notification on the lockscreen.</p>
* <p> <b>Requires:</b>
Android 5.0 and later
</p>
* @description <p>This property only works on devices running Android 5.0 (API 21) and greater.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-VISIBILITY_PRIVATE}
<li> {@link Titanium.Android#property-VISIBILITY_PUBLIC}
<li> {@link Titanium.Android#property-VISIBILITY_SECRET}
</ul></p>
* @platform android 3.6.0
*/
/**
* @property when
* @type Date/Number
* <p>The timestamp for the notification (defaults to the current time).</p>
* @description <p>If the timestamp is set to 0, no time is displayed in the notification
window for this notification.</p>
*/
/**
* @class Titanium.Android.NotificationManager
* @platform android 1.5
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/NotificationManager/NotificationManager.yml
* <p>Module for managing notifications.</p>
* @description <p>This module provides methods for sending and canceling notifications,
which are represented by the {@link Titanium.Android.Notification} object.</p>
<p>Further Reading:</p>
<ul>
<li><a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Notifications">Android Notifications guide</a></li>
<li><a href="http://developer.android.com/guide/topics/ui/notifiers/notifications.html">Android Developer: Notifications</a></li>
</ul>
*/
/**
* @method cancel
* <p>Cancels a previously displayed notification.</p>
* @param {Number} id
<p>The ID passed to {@link Titanium.Android.NotificationManager#method-notify notify}.</p>
*/
/**
* @method cancelAll
* <p>Cancels all previously displayed notifications.</p>
*/
/**
* @method notify
* <p>Adds a persistent notification to the status bar.</p>
* @description <p>The new notification <em>replaces</em> any previous notification with the same <code>id</code>.</p>
* @param {Number} id
<p>An ID that may be used to cancel a shown notification.</p>
* @param {Titanium.Android.Notification} notification
<p>Notification to display.</p>
*/
/**
* @property DEFAULT_ALL
* @type Number
* @readonly
* <p>Use {@link Titanium.Android#property-DEFAULT_ALL} instead.</p>
*/
/**
* @property DEFAULT_LIGHTS
* @type Number
* @readonly
* <p>Use {@link Titanium.Android#property-DEFAULT_LIGHTS} instead.</p>
*/
/**
* @property DEFAULT_SOUND
* @type Number
* @readonly
* <p>Use {@link Titanium.Android#property-DEFAULT_SOUND} instead.</p>
*/
/**
* @property DEFAULT_VIBRATE
* @type Number
* @readonly
* <p>Use {@link Titanium.Android#property-DEFAULT_VIBRATE} instead.</p>
*/
/**
* @property FLAG_AUTO_CANCEL
* @type Number
* @readonly
* <p>Use {@link Titanium.Android#property-FLAG_AUTO_CANCEL} instead.</p>
*/
/**
* @property FLAG_INSISTENT
* @type Number
* @readonly
* <p>Use {@link Titanium.Android#property-FLAG_INSISTENT} instead.</p>
*/
/**
* @property FLAG_NO_CLEAR
* @type Number
* @readonly
* <p>Use {@link Titanium.Android#property-FLAG_NO_CLEAR} instead.</p>
*/
/**
* @property FLAG_ONGOING_EVENT
* @type Number
* @readonly
* <p>Use {@link Titanium.Android#property-FLAG_ONGOING_EVENT} instead.</p>
*/
/**
* @property FLAG_ONLY_ALERT_ONCE
* @type Number
* @readonly
* <p>Use {@link Titanium.Android#property-FLAG_ONLY_ALERT_ONCE} instead.</p>
*/
/**
* @property FLAG_SHOW_LIGHTS
* @type Number
* @readonly
* <p>Use {@link Titanium.Android#property-FLAG_SHOW_LIGHTS} instead.</p>
*/
/**
* @property STREAM_DEFAULT
* @type Number
* @readonly
* <p>Use {@link Titanium.Android#property-STREAM_DEFAULT} instead.</p>
*/
/**
* @class Titanium.Android.PendingIntent
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/PendingIntent.yml
* <p>The Titanium binding of an Android <code>PendingIntent</code>.</p>
* @description <p>Use the {@link Titanium.Android#method-createPendingIntent} method to create a pending intent.</p>
<p>The type of <code>Intent</code> you pass to <code>createPendingIntent</code> determines what kind of
<code>PendingIntent</code> is created. Each type corresponds directly with a get method on
Android's PendingIntent:</p>
<ul>
<li><p>To create a <code>PendingIntent</code> that starts an activity, pass in an activity intent,
created with {@link Titanium.Android#method-createIntent createIntent}. This is equivalent to
calling the native Android <code>PendingIntent.getActivity</code> method. See
<a href="http://developer.android.com/reference/android/app/PendingIntent.html#getActivity%28android.content.Context, int, android.content.Intent, int%29">PendingIntent.getActivity in the Android API Reference</a></p></li>
<li><p>To create a <code>PendingIntent</code> that starts a service, pass in a service intent,
created with {@link Titanium.Android#method-createServiceIntent createServiceIntent}. This is
equivalent to calling the native Android <code>PendingIntent.getService</code> method. See
<a href="http://developer.android.com/reference/android/app/PendingIntent.html#getService%28android.content.Context, int, android.content.Intent, int%29">PendingIntent.getService in the Android API Reference</a>.</p></li>
</ul>
<p>The <code>PendingIntent</code> is always associated with the activity that was the current activity
when the intent was created.</p>
<p>Note that this <code>PendingIntent</code> is designed primarily to be used with the
{@link Titanium.Android.Notification Notification} object. It does not support all features
of the native Android <code>PendingIntent</code> -- in particular,
broadcast pending intents are not supported.</p>
<p>See also: </p>
<ul>
<li><a href="http://developer.android.com/reference/android/app/PendingIntent.html">PendingIntent in the Android API Reference</a></li>
</ul>
*/
/**
* @method getFlags
* <p>Gets the value of the {@link Titanium.Android.PendingIntent#property-flags} property.</p>
* @returns {Number}
*/
/**
* @method setFlags
* <p>Sets the value of the {@link Titanium.Android.PendingIntent#property-flags} property.</p>
* @param {Number} flags
<p>New value for the property.</p>
*/
/**
* @method getIntent
* <p>Gets the value of the {@link Titanium.Android.PendingIntent#property-intent} property.</p>
* @returns {Titanium.Android.Intent}
*/
/**
* @method setIntent
* <p>Sets the value of the {@link Titanium.Android.PendingIntent#property-intent} property.</p>
* @param {Titanium.Android.Intent} intent
<p>New value for the property.</p>
*/
/**
* @method getUpdateCurrentIntent
* <p>Gets the value of the {@link Titanium.Android.PendingIntent#property-updateCurrentIntent} property.</p>
* @returns {Boolean}
*/
/**
* @method setUpdateCurrentIntent
* <p>Sets the value of the {@link Titanium.Android.PendingIntent#property-updateCurrentIntent} property.</p>
* @param {Boolean} updateCurrentIntent
<p>New value for the property.</p>
*/
/**
* @property flags
* @type Number
* @creationOnly
* <p>Flags used for creating the Pending Intent.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Android#property-FLAG_CANCEL_CURRENT}
<li> {@link Titanium.Android#property-FLAG_NO_CREATE}
<li> {@link Titanium.Android#property-FLAG_ONE_SHOT}
<li> {@link Titanium.Android#property-FLAG_UPDATE_CURRENT}
</ul></p>
*/
/**
* @property intent
* @type Titanium.Android.Intent
* @creationOnly
* <p>The intent data to pass to the {@link Titanium.Android.Activity Activity} launched by this <code>PendingIntent</code>.</p>
*/
/**
* @property updateCurrentIntent
* @type Boolean
* @creationOnly
* <p>If this property is true, flag {@link Titanium.Android#property-FLAG_UPDATE_CURRENT} will be
appended to <code>flags</code> automatically. Default value is true.</p>
*/
/**
* @class Titanium.Android.R
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/R.yml
* <p>The Titanium binding of the Android system-wide resources class.</p>
* @description <p>To access your application's resources, use {@link Titanium.App.Android.R}.</p>
<p>These properties and sub-properties correspond directly to the properties of the the <code>android.R</code>
class, and should have the same syntax. For example, to retrieve the "OK" string in Android:</p>
<pre><code>Ti.Android.currentActivity.getString(Ti.Android.R.string.ok);
</code></pre>
<p>See also: <a href="http://developer.android.com/reference/android/R.html">android.R</a> in the
Android Developer Reference.</p>
<p>Accessing drawables using Ti.Android.R.drawable is deprecated and not a recommended practice since the system provided drawables can be
removed across Android versions. Prefer to copy the images to application res folder. </p>
*/
/**
* @property anim
* @type Object
* @readonly
* <p>Animation resources. See
<a href="http://developer.android.com/reference/android/R.anim.html">R.anim</a>
in the Android Developer Reference.</p>
*/
/**
* @property array
* @type Object
* @readonly
* <p>Array resources. See <a href="http://developer.android.com/reference/android/R.array.html">R.array</a>
in the Android Developer Reference.</p>
*/
/**
* @property attr
* @type Object
* @readonly
* <p>Attribute resources. See
<a href="http://developer.android.com/reference/android/R.attr.html">R.attr</a>
in the Android Developer Reference.</p>
*/
/**
* @property color
* @type Object
* @readonly
* <p>Color resources. See
<a href="http://developer.android.com/reference/android/R.color.html">R.color</a>
in the Android Developer Reference.</p>
*/
/**
* @property dimen
* @type Object
* @readonly
* <p>Dimension resources. See
<a href="http://developer.android.com/reference/android/R.dimen.html">http://developer.android.com/reference/android/R.dimen.html</a>
in the Android Developer Reference.</p>
*/
/**
* @property drawable
* @type Object
* @readonly
* <p>Drawable resources. See
<a href="http://developer.android.com/reference/android/R.drawable.html">R.drawable</a>
in the Android Developer Reference.
Accessing drawables using Ti.Android.R.drawable is deprecated and not a recommended practice since the system provided
drawables can be removed across Android versions. Prefer to copy the images to application res folder. </p>
*/
/**
* @property id
* @type Object
* @readonly
* <p>ID resources. See
<a href="http://developer.android.com/reference/android/R.id.html">R.id</a>
in the Android Developer Reference.</p>
*/
/**
* @property integer
* @type Object
* @readonly
* <p>Integer resources. See
<a href="http://developer.android.com/reference/android/R.integer.html">R.integer</a>
in the Android Developer Reference.</p>
*/
/**
* @property layout
* @type Object
* @readonly
* <p>Layout resources. See
<a href="http://developer.android.com/reference/android/R.layout.html">R.layout</a>
in the Android Developer Reference.</p>
*/
/**
* @property string
* @type Object
* @readonly
* <p>String resources. See
<a href="http://developer.android.com/reference/android/R.string.html">R.string</a>
in the Android Developer Reference.</p>
*/
/**
* @property style
* @type Object
* @readonly
* <p>Style resources. See
<a href="http://developer.android.com/reference/android/R.style.html">R.style</a>
in the Android Developer Reference.</p>
*/
/**
* @property styleable
* @type Object
* @readonly
* <p>Styleable reosurces. See
<a href="http://developer.android.com/reference/android/R.styleable.html">R.styleable</a>
in the Android Developer Reference.</p>
*/
/**
* @class Titanium.Android.RemoteViews
* @platform android 1.6
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/RemoteViews.yml
* <p>The Titanium binding of <a href="http://developer.android.com/reference/android/widget/RemoteViews.html">Android RemoteViews</a>. </p>
* @description <p><code>RemoteViews</code> is an API for referencing and updating a remote view hierarchy that
lives in another process, for example, in a {@link Titanium.Android.Notification Notification}.</p>
<p>To create a remote view hierarchy, you must define an Android XML layout for the views
you want to display, and place the XML file in the <code>platform/android/res/layout</code> inside your
project folder. See the examples for a sample XML layout and sample code for creating a
remote view.</p>
<p>To use a remote view hierarchy in a notification, see
{@link Titanium.Android.Notification#property-contentView Notification.contentView}.</p>
<p>Because the remote view hierarchy belongs to another process, you cannot call methods on it
directly, but you can call methods on the <code>RemoteViews</code> object to update views in the
heirarchy by ID. To reference a view inside the layout, use the
{@link Titanium.App.Android.R} object to reference the view's ID. For example, if you have a
view with the ID <code>notify_imageview</code>, you can refer to it using:</p>
<pre><code>Ti.App.Android.R.id.notify_imageview
</code></pre>
<p>See also: </p>
<ul>
<li><p><a href="http://developer.android.com/reference/android/widget/RemoteViews.html">RemoteViews</a>
in the Android Developer Reference.</p></li>
<li><p><a href="http://developer.android.com/guide/topics/ui/declaring-layout.html">XML Layouts</a>
in the Android Developer Guide.</p></li>
</ul>
* <h3>Examples</h3>
<h4>Create a Remote View</h4>
<p>The following code excerpt creates a <code>RemoteViews</code> object based on a custom layout
called <code>custom_layout.xml</code>, and set a label's text.</p>
<pre><code>var AppR = Ti.App.Android.R;
var customLayout = Ti.Android.createRemoteViews({ layoutId: AppR.layout.custom_layout });
customLayout.setTextViewText(AppR.id.custom_text, "Click Me!");
</code></pre>
<p>This example uses a simple custom layout:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView android:id="@+id/custom_text"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff"
android:textColor="#aaff0000"
android:textStyle="italic"
android:gravity="center"
android:text="Hello, I am a TextView" />
</LinearLayout>
</code></pre>
<p>The layout file for this example must be placed in
<code>platform/android/res/layout/custom_layout.xml</code>. </p>
*/
/**
* @method setBoolean
* <p>Calls a method taking a single <code>boolean</code> argument on a view in the remote view
hierarchy. See Android's documentation for
<a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setBoolean%28int, java.lang.String, boolean%29">setBoolean</a>.</p>
* @param {Number} viewId
<p>Resource ID of the view to invoke the method on.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {String} methodName
<p>Name of the method to call.</p>
* @param {Boolean} value
<p>Value to pass to the method.</p>
*/
/**
* @method setChronometer
* <p>Sets the base time, format string, and started flag for a chronometer
in the remote view hierarchy.</p>
* @description <p>See Android's documentation for
<a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setChronometer%28int, long, java.lang.String, boolean%29">setChronometer</a>.</p>
* @param {Number} viewId
<p>Resource ID of the Chronometer to update.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {Date} base
<p>Time at which the timer would have read 0:00.</p>
* @param {String} format
<p>Chronometer format string, or <code>null</code> to simply display the timer value.</p>
* @param {Boolean} started
<p>True if you want the clock to be started, false if not.</p>
*/
/**
* @method setDouble
* <p>Calls a method taking a single <code>double</code> argument on a view in the remote view
hierarchy.</p>
* @description <p>See Android's documentation for
<a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setDouble%28int, java.lang.String, double%29">setDouble</a>.</p>
* @param {Number} viewId
<p>Resource ID of the view to update.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {String} methodName
<p>Name of the method to call.</p>
* @param {Number} value
<p>Value to pass to the method.</p>
*/
/**
* @method setImageViewResource
* <p>Sets the image for an image view in the remote view hierarchy using an Android drawable resource.</p>
* @description <p>See Android's documentation for
<a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setImageViewResource%28int, int%29">setImageViewResource</a>.</p>
* @param {Number} viewId
<p>Resource ID of the <code>ImageView</code> to update.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {Number} srcId
<p>Resource ID of the new image.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
*/
/**
* @method setImageViewUri
* <p>Sets the image for an image view in the remote view hierarchy using a URI.</p>
* @description <p>This method supports supports both Android and Titanium URLs. </p>
<p>See Android's documentation for
<a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setImageViewUri%28int, android.net.Uri%29">setImageViewUri</a>.</p>
* @param {Number} viewId
<p>Resource ID of the <code>ImageView</code> to update.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {String} uri
<p>URI of the image (both Android and Titanium URLs are supported).</p>
*/
/**
* @method setInt
* <p>Calls a method taking a single <code>int</code> argument on a view in the remote view hierarchy.</p>
* @description <p>See Android's documentation for <a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setInt%28int, java.lang.String, int%29">setInt</a></p>
* @param {Number} viewId
<p>Resource ID of the view to update.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {String} methodName
<p>Name of the method to call.</p>
* @param {Number} value
<p>Value to pass to the method.</p>
*/
/**
* @method setOnClickPendingIntent
* <p>Launches a {@link Titanium.Android.PendingIntent} when the specified view is clicked.</p>
* @description <p>See Android's documentation for
<a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setOnClickPendingIntent%28int, android.app.PendingIntent%29">setOnClickPendingIntent</a>.</p>
* @param {Number} viewId
<p>Resource ID of the view to add a click listener to.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {Titanium.Android.PendingIntent} pendingIntent
<p>The <code>PendingIntent</code> to execute when this view is clicked.</p>
*/
/**
* @method setProgressBar
* <p>Sets the progress, max value, and indeterminate flag of a progress bar in the
remote view hierarchy.</p>
* @description <p>See Android's documentation for
<a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setProgressBar%28int, int, int, boolean%29">setProgressBar</a>.</p>
* @param {Number} viewId
<p>Resource ID of the progress bar to update.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {Number} max
<p>The new maximum value of the progress bar.</p>
* @param {Number} progress
<p>The new progress value of the progress bar (from 0..<code>max</code>).</p>
* @param {Boolean} indeterminate
<p>Determines whether the progress bar is indeterminate.
If <code>true</code>, the progress bar displays an infinite looping animation.</p>
*/
/**
* @method setString
* <p>Calls a method taking a single String argument on a view in the remote view
hierarchy.</p>
* @description <p>See Android's documentation for
<a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setString%28int, java.lang.String, java.lang.String%29">setString</a>.</p>
* @param {Number} viewId
<p>Resource ID of the view to update.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {String} methodName
<p>Name of the method to call.</p>
* @param {String} value
<p>String to pass to the method.</p>
*/
/**
* @method setTextColor
* <p>Sets the text color of a view in the remote view hierarchy.</p>
* @description <p>See Android's documentation for
<a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setTextColor%28int, int%29">setTextColor</a>.</p>
* @param {Number} viewId
<p>Resource ID of the view to update.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {Number} color
<p>Color as an integer.</p>
*/
/**
* @method setTextViewText
* <p>Sets the text of a text view in the remote view hierarchy.</p>
* @description <p>See Android's documentation for
<a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setTextViewText%28int, java.lang.CharSequence%29">setTextViewText</a>.</p>
* @param {Number} viewId
<p>Resource ID of the text view to update.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {String} text
<p>New text for the text view.</p>
*/
/**
* @method setUri
* <p>Calls a method taking one URI on a view in the remote view hierarchy.</p>
* @description <p>See Android's documentation for
<a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setUri%28int, java.lang.String, android.net.Uri%29">setUri</a>.</p>
* @param {Number} viewId
<p>Resource ID of the view to update.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {String} methodName
<p>Name of the method to call.</p>
* @param {String} value
<p>URI (as a string) to pass to the method.</p>
*/
/**
* @method setViewVisibility
* <p>Sets the visibility of a view in the remote view hierarchy.</p>
* @description <p>See Android's documentation for <a href="http://developer.android.com/reference/android/widget/RemoteViews.html#setViewVisibility%28int, int%29">setViewVisibility</a></p>
* @param {Number} viewId
<p>Resource ID of the view to show or hide.
Application-specific resource IDs can be specified using {@link Titanium.App.Android.R}.</p>
* @param {Number} visibility
<p>The visibility. Either <code>0</code> (VISIBLE), <code>4</code> (INVISIBLE) or <code>8</code> (GONE).</p>
*/
/**
* @method getLayoutId
* <p>Gets the value of the {@link Titanium.Android.RemoteViews#property-layoutId} property.</p>
* @returns {Number}
*/
/**
* @method setLayoutId
* <p>Sets the value of the {@link Titanium.Android.RemoteViews#property-layoutId} property.</p>
* @param {Number} layoutId
<p>New value for the property.</p>
*/
/**
* @method getPackageName
* <p>Gets the value of the {@link Titanium.Android.RemoteViews#property-packageName} property.</p>
* @returns {String}
*/
/**
* @method setPackageName
* <p>Sets the value of the {@link Titanium.Android.RemoteViews#property-packageName} property.</p>
* @param {String} packageName
<p>New value for the property.</p>
*/
/**
* @property layoutId
* @type Number
* @creationOnly
* <p>Android layout resource ID for the view to display. Required.</p>
* @description <p>To define a custom layout resource in your application, the XML layout file
should be placed in <code>platform/android/res/layout</code> folder inside your project folder.</p>
<p>Use {@link Titanium.App.Android.R} to reference the ID of the layout.</p>
*/
/**
* @property packageName
* @type String
* @creationOnly
* <p>Package name that the resource ID lives in. Optional.</p>
*/
/**
* @class Titanium.Android.Service
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Service.yml
* <p>Android application component that executes in the background.</p>
* @description <p>A service is a component started by an application that runs in the background. The service
does not have any application UI associated with it, so the user does not directly interact
with it, only your application.</p>
<p>The Titanium SDK gives you the ability to write your own Android Services using JavaScript.
The service executes your JavaScript code at intervals you specify. Note that the service
may stop running if the application is killed.</p>
<p>To create a service:</p>
<ol>
<li>Write the JavaScript code you want the service to execute in a separate file.
The service can execute any Titanium APIs but you should only use non-UI APIs.</li>
<li>Register the service in your <code>tiapp.xml</code> file. Refer to the example below.</li>
<li>Create a service intent by passing the JavaScript file to
the {@link Titanium.Android#method-createServiceIntent} method and set the interval to run the
code using the intent's <code>putExtra()</code> method.</li>
<li>Pass the Intent object to either the {@link Titanium.Android#method-createService} method
to create a <code>Service</code> object (<em>bound service</em>), where the application can
manage the service by invoking methods and binding callbacks on the object,
or to the {@link Titanium.Android#method-startService} method to start the service (<em>started service</em>)
and the service manages itself.</li>
</ol>
<p>Use the <code>Titanium.Android.Service</code> API to manage the service.</p>
<p>To get a reference to the <code>Service</code> inside the JavaScript service code, use the
{@link Titanium.Android#property-currentService} property to retrieve a reference to the service,
then invoke the <code>Titanium.Android.Service</code> APIs on the <code>Service</code> object.</p>
<p>Further Reading:</p>
<ul>
<li><a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Services">Android Services guide</a></li>
<li><a href="http://developer.android.com/reference/android/app/Service.html">Android Developer: Service</a></li>
</ul>
* <h3>Examples</h3>
<h4>Hello World Service</h4>
<p>This example shows how to create a service in JavaScript.
Your service code is included in its own JavaScript file.</p>
<p>In this example, the service reads data from the {@link Titanium.Android.Intent} which created it,
to see what it should say besides "Hello World".</p>
<p>File: myservice.js:</p>
<pre><code>var service = Titanium.Android.currentService;
var intent = service.intent;
var message = intent.getStringExtra("message_to_echo");
Titanium.API.info("Hello World! I am a Service. I have this to say: " + message);
</code></pre>
<p>Register the service in tiapp.xml:</p>
<pre><code><ti:app>
<android xmlns:android="http://schemas.android.com/apk/res/android">
<services>
<service url="myservice.js" type="interval"/>
</services>
</android>
</ti:app>
</code></pre>
<p>Code in "regular" Titanium file to launch the service and listen for pause/resume events.
Code also stops the service after its code runs 3 times.</p>
<pre><code>var intent = Titanium.Android.createServiceIntent( { url: 'myservice.js' } );
// Service should run its code every 2 seconds.
intent.putExtra('interval', 2000);
// A message that the service should 'echo'
intent.putExtra('message_to_echo', 'Titanium rocks!');
var service = Titanium.Android.createService(intent);
service.addEventListener('resume', function(e) {
Titanium.API.info('Service code resumes, iteration ' + e.iteration);
});
service.addEventListener('pause', function(e) {
Titanium.API.info('Service code pauses, iteration ' + e.iteration);
if (e.iteration === 3) {
Titanium.API.info('Service code has run 3 times, will now stop it.');
service.stop();
}
});
service.start();
</code></pre>
<p>Console Output:</p>
<pre><code>[INFO] [29,1942] Service code resumes, iteration 1
[INFO] [70,2029] Hello World! I am a Service. I have this to say: Titanium rocks!
[INFO] [3,2070] Service code pauses, iteration 1
[INFO] [2,3915] Service code resumes, iteration 2
[INFO] [31,3961] Hello World! I am a Service. I have this to say: Titanium rocks!
[INFO] [5,3968] Service code pauses, iteration 2
[INFO] [2,5917] Service code resumes, iteration 3
[INFO] [27,5961] Hello World! I am a Service. I have this to say: Titanium rocks!
[INFO] [16,5980] Service code pauses, iteration 3
[INFO] [1,5981] Service code has run 3 times, will now stop it.
</code></pre>
*/
/**
* @event pause
* <p>For Javascript-based services that you create, <code>pause</code> fires after each time the JavaScript
code executes.</p>
* @description <p>The <code>resume</code> and <code>pause</code> events occur in pairs, with <code>resume</code> firing just before your
JavaScript service code executes, and <code>pause</code> just after.</p>
* @param {String} iteration
<p>Incrementing integer indicating which iteration of an interval-based Service is pausing.
For example, if you have an interval-based Service running every 10 seconds, iteration
3 would occur at about 30 seconds after you start the instance (assuming your service
code runs quickly).</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event resume
* <p>For JavaScript-based Services which you create, <code>resume</code> fires each time the JavaScript
code executes.</p>
* @description <p>For example, if your Service runs on an interval of 10000 (10 seconds), you would expect
to see <code>resume</code> fired every 10 seconds, just as the JavaScript service code you wrote is
about to execute.</p>
* @param {String} iteration
<p>Incrementing integer indicating which iteration of an interval-based Service is pausing.
For example, if you have an interval-based Service running every 10 seconds, iteration
3 would occur at about 30 seconds after you start the instance (assuming your service
code runs quickly).</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event start
* <p>Fired when the bound service instance starts.</p>
* @description <p>Bound service instances are created via {@link Titanium.Android#method-createService}.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event stop
* <p>Fired when the bound service instance stops.</p>
* @description <p>The service stops when {@link Titanium.Android.Service#method-stop} or
{@link Titanium.Android#method-stopService} is called and there are no more bound,
un-stopped clients.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event taskremoved
* <p>Fired when the task that comes from the service's application has been removed.</p>
* @description <p>This event is fired if the service is currently running and the user has removed a task
that comes from the service's application, eg. the user swipes the application away from
the recent applications list. It only works for unbound service which is
started using {@link Titanium.Android#method-startService}.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method start
* <p>Starts the Service.</p>
* @description <p>Effective only if this instance of {@link Titanium.Android.Service} was created
with {@link Titanium.Android#method-createService}.</p>
*/
/**
* @method stop
* <p>Stops this running instance of the Service.</p>
*/
/**
* @method getIntent
* <p>Gets the value of the {@link Titanium.Android.Service#property-intent} property.</p>
* @returns {Titanium.Android.Intent}
*/
/**
* @method getServiceInstanceId
* <p>Gets the value of the {@link Titanium.Android.Service#property-serviceInstanceId} property.</p>
* @returns {Number}
*/
/**
* @property intent
* @type Titanium.Android.Intent
* @readonly
* <p>The intent used to start or bind to the Service.</p>
*/
/**
* @property serviceInstanceId
* @type Number
* @readonly
* <p>A service can be started more than once -- this number (based on an incrementing integer)
indicates which "start number" in the sequence the current service instance is.</p>
*/
/**
* @class Titanium.App.Android
* @platform android 1.5
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/Android/Android.yml
* <p>A module used to access Android application resources.</p>
* @description <p>For more information, refer to the official documentation on the Android Developer website about
<a href="http://developer.android.com/guide/topics/resources/index.html">application resources</a>.</p>
* <h3>Examples</h3>
<h4>Custom String Resource</h4>
<p>Custom Android resources may be placed in <code>platform/android</code> in the project root. <br>
For example, to utilize a custom localization file, create and populate
<code>platform/android/res/values/mystrings.xml</code> with the following data.</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="mystring">testing 1 2 3</string>
</resources>
</code></pre>
<p>In Javascript, this can be accessed as follows.</p>
<pre><code>var activity = Ti.Android.currentActivity;
var R = Ti.App.Android.R;
var mystring = activity.getString(R.string.mystring);
Ti.API.debug("mystring = " + mystring);
</code></pre>
*/
/**
* @method getAppVersionCode
* <p>Gets the value of the {@link Titanium.App.Android#property-appVersionCode} property.</p>
* @returns {Number}
* @platform android 3.3.0
*/
/**
* @method getAppVersionName
* <p>Gets the value of the {@link Titanium.App.Android#property-appVersionName} property.</p>
* @returns {String}
* @platform android 3.3.0
*/
/**
* @method getLaunchIntent
* <p>Gets the value of the {@link Titanium.App.Android#property-launchIntent} property.</p>
* @returns {Titanium.Android.Intent}
* @platform android 3.3.0
*/
/**
* @property R
* @type Titanium.App.Android.R
* @readonly
* <p>The <code>R</code> namespace for application resources.</p>
*/
/**
* @property appVersionCode
* @type Number
* @readonly
* <p>The version number of the application. </p>
* @platform android 3.3.0
*/
/**
* @property appVersionName
* @type String
* @readonly
* <p>The version name of the application. </p>
* @platform android 3.3.0
*/
/**
* @property launchIntent
* @type Titanium.Android.Intent
* @readonly
* <p>Return the intent that was used to launch the application. </p>
* @platform android 3.3.0
*/
/**
* @class Titanium.App.Android.R
* @platform android 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/Android/R.yml
* <p>The Titanium binding of the native Android <code>R</code> class, giving access to application resources.</p>
* @description <p>The properties and sub-properties of this object relate directly to the native application
resources <code>R</code> class, and thus have the same syntax. For more information, refer to the
official documentation on the Android Developer website about
<a href="http://developer.android.com/guide/topics/resources/accessing-resources.html">accessing application resources</a>. </p>
<p>For example, if the file
<code>platform/android/res/drawable/icon.png</code> exists in the project, it can be accessed using its
integer id, as follows.</p>
<pre><code>var resid = Titanium.App.Android.R.drawable.icon;
</code></pre>
<p>To access system-wide resources, rather than application resources, use {@link Titanium.Android.R}
instead.</p>
*/
/**
* @class Titanium.App
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/App.yml
* <p>The top-level App module is mainly used for accessing information about the
application at runtime, and for sending or listening for system events.</p>
* @description <p>The <code>App</code> module exposes a number of properties set in the <code>tiapp.xml</code> file. </p>
<p>Three of these properties, the application name, ID, and URL, must be specified when the
application is created. </p>
<p>While most values may be changed by editing the <code>tiapp.xml</code> file after creating the project,
the GUID is automatically generated and should not be changed.</p>
<p>To access other application properties set in the <code>tiapp.xml</code> file not exposed by the
<code>Titanium.App</code> module, see {@link Titanium.App.Properties}.</p>
<h4>iOS Application Life Cycle</h4>
<p>At any given moment, you applications can be in one of the following possible states:</p>
<ul>
<li><p>Not running: The app has not been launched or was running but was terminated by the system.</p></li>
<li><p>Inactive: The app is running in the foreground but is currently not receiving events.
An app usually stays in this state only briefly as it transitions to a different state.
The <code>pause</code> event is fired during this state.</p></li>
<li><p>Active: The app is running in the foreground and is receiving events. This is the normal
mode for foreground apps. </p></li>
<li><p>Background: The app is in the background and executing code. Most apps enter this state
briefly on their way to being suspended. </p></li>
<li><p>Suspended: The app is in the background but is not executing code. The system moves
apps to this state automatically and does not notify them before doing so. While suspended,
an app remains in memory but does not execute any code. The <code>paused</code> event is fired
during this state. The system tries to keep as many apps in memory at the same time as it
can, but when memory runs low it terminates suspended apps to reclaim that memory. Apps
that consume large amounts of memory while in the background are the first apps to be terminated.</p></li>
</ul>
<p><strong>Responding To Interruptions</strong></p>
<p><em><strong>System Alerts</em></strong></p>
<p>When an <strong>alert-based</strong> interruption occurs, such as an incoming phone call, the app moves
temporarily to the inactive state, and fires the <code>pause</code> event. The system then displays
an alert to the user. The app remains in this state until the user dismisses the alert.
At this point, the app either returns to the active state and fires the <code>resumed</code> event;
or moves to the background state and fires the <code>paused</code> event. In iOS 5, notifications that
display a banner do not deactivate your app in the way that alert-based notifications do.
However, if the user pulls down the banner to reveal the notification center, your app
moves to the inactive state just as if an alert-based interruption had occurred.</p>
<p>Alert-based interruptions result in temporary loss of control by your app and results in <code>pause</code>
event being fired. Your app continues to run in the foreground, but it does not recieve
touch events from the system. (It does continue to receive notifications and other types
of events, such as accelerometer events.) When your app is moved back to the
active state, the <code>resumed</code> event is fired. </p>
<p>The same set of events takes place when user <strong>double taps on the home button</strong>.</p>
<p><em><strong>Sleep/Wake Button</em></strong></p>
<p>Pressing the <strong>Sleep/Wake</strong> button is another type of interruption that causes your app to
move to an inactive state. When the app is in the foreground, if the <strong>Sleep/Wake button</strong>
is pressed the following events take place:</p>
<ul>
<li><p>In iOS 4.X the system fires the <code>pause</code> event and becomes inactive and on waking up the app fires
the <code>resumed</code> event.</p></li>
<li><p>In iOS 5.0 and greater the system fires the <code>pause</code> event followed by the <code>paused</code> event and
becomes inactive. This is an intentionally behavioral change by Apple to conserve battery when
the Sleep/Wake button is pressed. On waking up the app fires the <code>resume</code> event followed by the
<code>resumed</code> event and returns the app to normal state. </p></li>
</ul>
<p><em><strong>Home Button</em></strong></p>
<p>Pressing the <strong>home button</strong> is another kind of interruption. The app fires <code>pause</code> and
<code>paused</code>events before going into background. When app is reopened it fires the <code>resume</code>
event followed by the <code>resumed</code> event, returning the app to the normal state.</p>
<table class="doc-table" summary="This table gives the order of events fired when the app is in normal state.">
<caption><b>Lifecycle events fired during different interruptions</b></caption>
<tr><th colspan="2">Type of Interruption<th colspan="2">Going into Background<th colspan="2">Coming into Foreground</tr>
<tr><th colspan="2" align = "left">Alert-Based/Fast App Switching<td align="center">pause</td><td align="center"></td><td align="center"> </td><td align="center">resumed</td></tr>
<tr><th rowspan="2" align="left">Sleep/Wake Button</th><td> iOS 4.X</td><td align="center">pause</td><td align="center"><td align="center"><td align="center"> resumed</tr >
<tr><td>iOS 5.0 +</td><td align="center">pause</td><td align="center">paused</td><td align="center">resume<td align="center">resumed</td></tr>
<tr><th colspan="2" align="left">Home Button (backgrounding)<td align="center">pause<td align="center">paused<td align="center"> resume<td align="center">resumed</tr></table>
<p><em><strong>Blur and Focus Events</em></strong></p>
<p>When using the iOS pause/resume feature, the <code>blur</code> and <code>focus</code> events do not fire
before the application enters the background or after it returns to the foreground,
respectively. Instead, the application needs to monitor the <code>pause</code> and <code>resumed</code> events,
which relies on the underlying iOS events to determine the application state rather than the
UI events.</p>
<h4>Application Level Events</h4>
<p>Application-level events are custom events that are defined globally for your
application. By convention, application-level events are set on the <code>Titanium.App</code>
module, like this:</p>
<pre><code>Ti.App.addEventListener('app:myCustomEvent', myHandlerFunction);
</code></pre>
<p>Adding a prefix (like 'app:' in this example) is optional, but can help ensure that
your custom event names don't conflict with any future Titanium events.</p>
<p>Application-level event listeners can be added and fired from any context, including from inside
a web view, so they are ideal for communicating between separate parts of your
application.</p>
<p>When you add an event listener on a Titanium module (such as <code>Ti.App</code> or
{@link Titanium.Geolocation Ti.Geolocation}), the event listener function is referenced from
the global context. This means the event listener function and any objecst it references
can't be garbage collected until the event listener is removed.</p>
<p>This can lead to memory leaks if application-level event listeners are added and not
removed.</p>
<p>See also: <a href="http://docs.appcelerator.com/platform/latest/#!/guide/Event_Handling">Event Handling</a>
in the Titanium Mobile Guides.</p>
<h4>System Level Accessibility Events</h4>
<p>System-level Accessibility events include:</p>
<ul>
<li>Events your application fires to alert the device's accessibility system of some condition
or to ask it to do something.</li>
<li>Events fired by the device's accessibility system and listened for in your application.</li>
</ul>
<p>Currently there are four system-level accessibility events. Three of them are available for
your application to fire, and one of them is for your application to listen for.</p>
<h5>Firing Accessibility Events.</h5>
<p>The following accessibility events can be fired by your application to alert the accessibility
system of a particular condition or to ask it to perform an action.</p>
<p>These events are fired using {@link Titanium.App#method-fireSystemEvent}, which is available in Titanium Mobile 3.0.0.</p>
<ul>
<li><p>{@link Titanium.App#property-EVENT_ACCESSIBILITY_ANNOUNCEMENT}, available in iOS and Android, asks the device's
accessibility system to make an announcement. The announcement itself is a string passed as the second
argument to {@link Titanium.App#method-fireSystemEvent}. <em>How</em> the device's accessibility actually makes that announcement
depends on what accessibility services are activated on the device. The most common are VoiceOver on
iOS and TalkBack on Android. Each of those would read the announcement aloud.</p>
<pre><code>Ti.App.fireSystemEvent(Ti.App.EVENT_ACCESSIBILITY_ANNOUNCEMENT, "Welcome to my App");
</code></pre></li>
<li><p>{@link Titanium.App.iOS#property-EVENT_ACCESSIBILITY_LAYOUT_CHANGED}, available only on iOS, can be used to alert
the accessibility system that the layout of the screen has changed, such as when an element
appears or disappears. When your application fires this event, Titanium calls <code>UIAccessibilityLayoutChangedNotification</code>
in the iOS <a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
No second parameter is required when firing this event with {@link Titanium.App#method-fireSystemEvent}.</p></li>
<li><p>{@link Titanium.App.iOS#property-EVENT_ACCESSIBILITY_SCREEN_CHANGED}, available only on iOS, can be used to alert
the accessibility system when a new view appears that comprises a major portion of the screen.
When your application fires this event, Titanium calls <code>UIAccessibilityScreenChangedNotification</code>
in the iOS <a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
No second parameter is required when firing this event with {@link Titanium.App#method-fireSystemEvent}.</p></li>
</ul>
<h5>Listening for Accessibility Events</h5>
<p>Currently there is only one system accessibility event which your application can listen for using
{@link Titanium.App#method-addEventListener}, namely {@link Titanium.App#event-accessibilitychanged}. This event, available on iOS and on Android
(for devices running Ice Cream Sandwich or greater), is fired when the device's accessibility service is turned
on or off. The object passed as a parameter to the listener function contains an <code>enabled</code> property which is
<code>true</code> if the accessibility service is now turned on, or <code>false</code> otherwise.</p>
*/
/**
* @event accessibilitychanged
* <p>Fired by the system when the device's accessibility service is turned on or off.</p>
* <p> <b>Requires:</b>
Android 4.0 and later
</p>
* @param {Boolean} enabled
<p>Whether accessibility is now enabled or disabled.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @event close
* <p>Fired by the system when the application is about to be terminated.</p>
* @description <p>It is the last event that can be received before the application gets closed.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.5.0
* @platform ipad 1.5.0
*/
/**
* @event memorywarning
* <p>Fired when the app receives a warning from the operating system about low memory availability.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.2.3
* @platform ipad 3.2.3
*/
/**
* @event pause
* <p>Fired when the application transitions from active to inactive state on a multitasked system.</p>
* @description <p>Available on iOS 4.0 and later.</p>
<p>This event fires when the user leaves the application or for certain types of temporary interruptions
such as a notification or incoming phone call. On an iPad application with split view enabled,
the event will be called once the application is put in the background and a different split view
application is focused.</p>
<p>See the <code>applicationWillResignActive</code> section of the official Apple documentation about
<a href="https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40006786-CH3-SW5">Monitoring Application State Changes</a>
for the exact behavior that triggers this event.</p>
<p>Note that calls to functions that modify the UI during this event may be partially executed,
<strong>up to</strong> the UI call before the suspension. See {@link Titanium.App#event-paused paused} event. If this happens, the remainder of the code will
be executed after the application is resumed, but before the <code>resume</code> event is triggered.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event paused
* <p>Fired when the application transitions to the background on a multitasked system.</p>
* @description <p>On iOS 4.0 and later, this event only fires when putting the application in the background
using the home button.</p>
<p>On iOS 5.0 and later, this event also fires when using the sleep/wake or power button.</p>
<p>This event fires when the user leaves the application.</p>
<p>See the <code>applicationDidEnterBackground</code> section of the official Apple documentation about
<a href="https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40006786-CH3-SW5">Monitoring Application State Changes</a>
for the exact behavior that triggers this event.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @event proximity
* <p>Fired when the proximity sensor changes state.</p>
* @description <p>The proximity sensor detects whether the device is being held up to the user's ear,
and shuts down the display.</p>
<p>Proximity events are only fired when {@link Titanium.App#property-proximityDetection proximityDetection}
is <code>true</code>.</p>
* @param {String} state
<p>Proximity state value.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.3.0
* @platform iphone 0.8
*/
/**
* @event uncaughtException
* <p>Fired when an uncaught JavaScript exception occurs.</p>
* @description <p>This event will occur in both production and development builds, allowing you to warn the
user that an error has occured, and log more information to help you fix any bugs.</p>
* @param {String} message
<p>The error message.</p>
* @param {String} line
<p>The line where the error occurred.</p>
* @param {String} (iphone ipad) sourceId
<p>A unique identification for the source file.</p>
* @param {String} (iphone ipad) type
<p>The type of error.</p>
* @param {String} (iphone ipad) sourceURL
<p>The URL to the source file.</p>
* @param {String} (iphone ipad) backtrace
<p>The backtrace of function calls when the error occurred.</p>
* @param {String} (android) title
<p>The title for the error.</p>
* @param {String} (android) sourceName
<p>The name of the source file.</p>
* @param {String} (android) lineSource
<p>The line source reference.</p>
* @param {String} (android) lineOffset
<p>The offset on the line where the error occurred.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @event resume
* <p>Fired when the application returns to the foreground on a multitasked system.</p>
* @description <p>On iOS 4.0 and later, this event only fires when putting the application in the background
using the home button.</p>
<p>On iOS 5.0 and later, this event also fires when using the sleep/wake or power button.</p>
<p>Note that this event does not fire for pauses resulting from notifications or incoming phone
calls.</p>
<p>See the <code>applicationWillEnterForeground</code> section of the official Apple documentation about
<a href="https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40006786-CH3-SW5">Monitoring Application State Changes</a>
for the exact behavior that triggers this event.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event resumed
* <p>Fired when the application returns to the foreground.</p>
* @description <p>This event fires when the application enters the foreground with the <code>resume</code> event or
returns to focus after a notification or incoming phone call. On an iPad with split view enabled,
this event will be called every time the application resized.</p>
<p>See the <code>applicationDidBecomeActive</code> section of the official Apple documentation about
<a href="https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40006786-CH3-SW5">Monitoring Application State Changes</a>
for the exact behavior that triggers this event.</p>
<p>Note: This event will not be fired for URL's in iOS 10+ that are handled by the <Modules.SafariDialog>
or {@link Titanium.UI.WebView}, because Apple does not call the <code>applicationDidBecomeActive</code> for
URL-handling anymore. Instead, use the <code>handleurl</code> event in {@link Titanium.App.iOS}.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event keyboardFrameChanged
* <p>Fired when the soft keyboard is presented, on and off the screen.</p>
* @removed 4.0.0 Use <Titanium.App.keyboardframechanged> instead.
* @description <p>This event fires when the application presents the soft keyboard on/off the screen . The
event returns the dictionary containing <code>keyboardFrame.x</code>, <code>keyboardFrame.y</code>,
<code>keyboardFrame.height</code> and <code>keyboardFrame.width</code> variables, corresponding to the frame of
the keyboard with respect to the screen coordinates.</p>
<p>Note that the keyboard <code>height</code> and <code>width</code> properties will not be accurate when the keyboard
is being dissmissed.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @event keyboardframechanged
* <p>Fired when the soft keyboard is presented, on and off the screen.</p>
* @description <p>This event fires when the application presents the soft keyboard on/off the screen . The
event returns the dictionary <code>keyboardFrame</code> containing <code>x</code>, <code>y</code>, <code>height</code> and <code>width</code> keys,
corresponding to the frame of the keyboard with respect to the screen coordinates. </p>
<p>On Titanium SDK 4.0.0 and later the event also contains a second parameter <code>animationDuration</code> representing
the duration of the animation for the presentation and dismissal of the soft keyboard.</p>
<p>Note that the keyboard <code>height</code> and <code>width</code> properties will not be accurate when the keyboard
is being dissmissed.</p>
* @param {Dictionary} keyboardFrame
<p>A dictionary with keys x, y, width and height representing the frame of keyboard on screen.</p>
* @param {Number} animationDuration
<p>The duration of the keyboard animation. This parameter is only available on Titanium SDK 4.0.0 and later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @event significanttimechange
* <p>Fired when there is a significant change in the time.</p>
* @description <p>Examples of significant time changes include the arrival of midnight, an update to the time by a carrier,
and the change to daylight savings time. If your application is currently in <code>paused</code> state, this message
will be is queued until your application returns to the foreground, at which point it is delievered. If multiple
changes occur, only the most recent one is delievered.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method fireSystemEvent
* <p>Fire a system-level event such as {@link Titanium.App#property-EVENT_ACCESSIBILITY_ANNOUNCEMENT}.</p>
* @param {String} eventName
<p>The name of the event to fire.</p>
* @param {Object} param (optional)
<p>A parameter to be passed to the system event.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getArguments
* <p>Returns the arguments passed to the application on startup.</p>
* @description <p>On Android, use the {@link Titanium.Android.Activity#property-intent intent} property of the activity to
retrieve the parameters passed to launch the application activity.</p>
* @returns {launchOptions}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getAccessibilityEnabled
* <p>Gets the value of the {@link Titanium.App#property-accessibilityEnabled} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getForceSplashAsSnapshot
* <p>Gets the value of the {@link Titanium.App#property-forceSplashAsSnapshot} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setForceSplashAsSnapshot
* <p>Sets the value of the {@link Titanium.App#property-forceSplashAsSnapshot} property.</p>
* @param {Boolean} forceSplashAsSnapshot
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getIdleTimerDisabled
* <p>Gets the value of the {@link Titanium.App#property-idleTimerDisabled} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setIdleTimerDisabled
* <p>Sets the value of the {@link Titanium.App#property-idleTimerDisabled} property.</p>
* @param {Boolean} idleTimerDisabled
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getDisableNetworkActivityIndicator
* <p>Gets the value of the {@link Titanium.App#property-disableNetworkActivityIndicator} property.</p>
* @returns {Boolean}
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setDisableNetworkActivityIndicator
* <p>Sets the value of the {@link Titanium.App#property-disableNetworkActivityIndicator} property.</p>
* @param {Boolean} disableNetworkActivityIndicator
<p>New value for the property.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAnalytics
* <p>Gets the value of the {@link Titanium.App#property-analytics} property.</p>
* @returns {Boolean}
*/
/**
* @method getCopyright
* <p>Gets the value of the {@link Titanium.App#property-copyright} property.</p>
* @returns {String}
*/
/**
* @method getDeployType
* <p>Gets the value of the {@link Titanium.App#property-deployType} property.</p>
* @returns {String}
*/
/**
* @method getDescription
* <p>Gets the value of the {@link Titanium.App#property-description} property.</p>
* @returns {String}
*/
/**
* @method getGuid
* <p>Gets the value of the {@link Titanium.App#property-guid} property.</p>
* @returns {String}
*/
/**
* @method getId
* <p>Gets the value of the {@link Titanium.App#property-id} property.</p>
* @returns {String}
*/
/**
* @method getInstallId
* <p>Gets the value of the {@link Titanium.App#property-installId} property.</p>
* @returns {String}
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getKeyboardVisible
* <p>Gets the value of the {@link Titanium.App#property-keyboardVisible} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.App#property-name} property.</p>
* @returns {String}
*/
/**
* @method getProximityDetection
* <p>Gets the value of the {@link Titanium.App#property-proximityDetection} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setProximityDetection
* <p>Sets the value of the {@link Titanium.App#property-proximityDetection} property.</p>
* @param {Boolean} proximityDetection
<p>New value for the property.</p>
* @platform android 3.3.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getProximityState
* <p>Gets the value of the {@link Titanium.App#property-proximityState} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
* @platform iphone 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getPublisher
* <p>Gets the value of the {@link Titanium.App#property-publisher} property.</p>
* @returns {String}
*/
/**
* @method getSessionId
* <p>Gets the value of the {@link Titanium.App#property-sessionId} property.</p>
* @returns {String}
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.App#property-url} property.</p>
* @returns {String}
*/
/**
* @method getVersion
* <p>Gets the value of the {@link Titanium.App#property-version} property.</p>
* @returns {String}
*/
/**
* @property EVENT_ACCESSIBILITY_ANNOUNCEMENT
* @type String
* @readonly
* <p>Convenience constant for system event "accessibilityannouncement".</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property EVENT_ACCESSIBILITY_CHANGED
* @type String
* @readonly
* <p>Convenience constant for system event "accessibilitychanged".</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property accessibilityEnabled
* @type Boolean
* @readonly
* <p>Indicates whether Accessibility is enabled by the system.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property forceSplashAsSnapshot
* @type Boolean
* <p>Shows the application's splash screen on app resume.</p>
* @description <p>Note: This only works on device.
When the app goes to the background a screenshot of the current app state is taken. When
the app resumes that screenshot is shown for brief moment. To disable this behavior, set
this property to <code>true</code> and the default splash screen will show on app resume instead.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property idleTimerDisabled
* @type Boolean
* <p>Determines whether the screen is locked when the device is idle.</p>
* @description <p>Set to <code>true</code> to disable the timer.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [disableNetworkActivityIndicator=false]
* @type Boolean
* <p>Prevents network activity indicator from being displayed.</p>
* @description <p>Setting this property to true disables display of the network activity indicator when network activity is in progress.
If the network activity indicator is currently visible, it is hidden immediately.</p>
<p><strong>NOTE: In general, the user should always be made aware of network activity. The network activity indicator should only be disabled for very brief network activity (a few seconds).</strong> </p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property analytics
* @type Boolean
* @readonly
* <p>Indicates whether Analytics is enabled, determined by <code>tiapp.xml</code>.</p>
*/
/**
* @property copyright
* @type String
* @readonly
* <p>Application copyright statement, determined by <code>tiapp.xml</code>.</p>
*/
/**
* @property deployType
* @type String
* @readonly
* <p>Build type that reflects how the application was packaged; either <code>test</code>, <code>development</code> or
<code>production</code>.</p>
*/
/**
* @property description
* @type String
* @readonly
* <p>Application description, determined by <code>tiapp.xml</code>.</p>
*/
/**
* @property guid
* @type String
* @readonly
* <p>Application globally-unique ID, determined by <code>tiapp.xml</code>.</p>
* @description <p>This value is system-generated and consistent through all versions.</p>
*/
/**
* @property id
* @type String
* @readonly
* <p>Application ID, from <code>tiapp.xml</code>.</p>
* @description <p>The application ID is a required property that must be specified when creating a new project.</p>
*/
/**
* @property installId
* @type String
* @readonly
* <p>The install ID for this application.</p>
* @description <p>The application install ID is a unique identifier (UUID) for this
install of the application. It is not modified by application updates;
only when an application is initially installed, or removed and
re-installed.</p>
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property keyboardVisible
* @type Boolean
* @readonly
* <p>Indicates whether or not the soft keyboard is visible.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property name
* @type String
* @readonly
* <p>Application name, determined by <code>tiapp.xml</code>.</p>
*/
/**
* @property [proximityDetection=false]
* @type Boolean
* <p>Determines whether proximity detection is enabled.</p>
* @description <p>Set to <code>true</code> to receive {@link Titanium.App#event-proximity} events.</p>
* @platform android 3.3.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property proximityState
* @type Boolean
* @readonly
* <p>Indicates the state of the device's proximity sensor, according to the
{@link Titanium.App#event-proximity} event.</p>
* @description <p>This property is <code>true</code> when the proximity sensor is close to the user. </p>
<p>When {@link Titanium.App#property-proximityDetection} is disabled, the value of this property is undefined.</p>
* @platform android 3.3.0
* @platform iphone 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property publisher
* @type String
* @readonly
* <p>Application publisher, from <code>tiapp.xml</code>.</p>
*/
/**
* @property sessionId
* @type String
* @readonly
* <p>Unique session identifier for the current continuous run of the application.</p>
*/
/**
* @property url
* @type String
* @readonly
* <p>Application URL, from <code>tiapp.xml</code>.</p>
*/
/**
* @property version
* @type String
* @readonly
* <p>Application version, from <code>tiapp.xml</code>.</p>
*/
/**
* @class launchOptions
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/App.yml
* <p>Dictionary describing the arguments passed to the application on startup.
Use the {@link Titanium.App#method-getArguments getArguments} method to retrieve the launch options.</p>
*/
/**
* @property url
* @type String
* <p>This key indicates that the application was launched in order to open
the specified URL.</p>
*/
/**
* @property source
* @type String
* <p>This key indicates that the application was launched by another
application with the specified bundle ID.</p>
*/
/**
* @property [launchOptionsLocationKey=false]
* @type Boolean
* <p>If set to <code>true</code>, this key indicates that the application was launched in response to an
incoming location event.</p>
*/
/**
* @class Titanium.App.Properties
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/Properties/Properties.yml
* <p>The App Properties module is used for storing application-related data in property/value pairs
that persist beyond application sessions and device power cycles.</p>
* @description <h4>App Properties in the tiapp.xml file</h4>
<p>App properties defined in the <code>tiapp.xml</code> file may be accessed using these APIs. An app
property is defined inside the root-level <code><ti:app></code> element with the <code><property></code> element.
Use the <code>name</code> attribute to define your property name and place the value inline with the
<code><property></code> element. For example, to define an app property called <code>foo</code> with the value <code>42</code>:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
<property name="foo" type="string">42</property>
</ti:app>
</code></pre>
<p>Then, you can retrieve the property during runtime with the following API call:</p>
<pre><code>var foo = Ti.App.Properties.getString('foo');
</code></pre>
<p>As of Release 3.2.0, any application properties defined in the <code>tiapp.xml</code> file are stored in the
device's secure storage, making them read-only. Additionally, external access to these
properties is now restricted. Other iOS applications cannot access these properties and
native Android modules must use the Titanium module API
<a href="http://docs.appcelerator.com/module-apidoc/latest/android/org/appcelerator/platform/TiApplication.html#getAppProperties%28%29">TiApplication.getAppProperties</a>
method to access these properties.</p>
<p>If you need to change the values during runtime, initially create the property with these APIs
rather than defining them in the <code>tiapp.xml</code> file.</p>
<p>Prior to Release 3.2.0, application properties defined in the <code>tiapp.xml</code> file could be
overwritten by these APIs and accessed externally by other applications and modules.</p>
* <h3>Examples</h3>
<h4>Store a property</h4>
<p>Store a string property.</p>
<pre><code>Ti.App.Properties.setString('givenName', 'Paul');
Ti.API.info('The value of the givenName property is: ' + Ti.App.Properties.getString('givenName'));
</code></pre><h4>Enumerate over saved properties</h4>
<p>Output all saved properties to the console.</p>
<pre><code>var props = Ti.App.Properties.listProperties();
for (var i=0, ilen=props.length; i<ilen; i++){
var value = Ti.App.Properties.getString(props[i]);
Ti.API.info(props[i] + ' = ' + value);
}
</code></pre>
*/
/**
* @event change
* <p>Fired when a property is changed.</p>
* @description <p>On iOS, the event is fired when the user re-enters the application after
making a change using the Settings application.</p>
<p>The event is also fired when the application changes a property directly using one of the
<code>Ti.App.iOS.UserDefaults</code> or <code>Ti.App.Properties</code> methods.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method removeAllProperties
* <p>Removes all properties that have been set by the user on runtime, or does nothing otherwise.</p>
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
* @platform mobileweb 6.0.0
*/
/**
* @method getBool
* <p>Returns the value of a property as a boolean data type.</p>
* @param {String} property
<p>Name of property.</p>
* @param {Boolean} default (optional)
<p>Default value to return if property does not exist.</p>
* @returns {Boolean}
*/
/**
* @method getDouble
* <p>Returns the value of a property as a double (double-precision, floating point) data type.</p>
* @description <p>This method must only be used to retrieve properties created with
{@link Titanium.App.Properties#method-setDouble setDouble}. </p>
* @param {String} property
<p>Name of property.</p>
* @param {Number} default (optional)
<p>Default value to return if property does not exist.</p>
* @returns {Number}
*/
/**
* @method getInt
* <p>Returns the value of a property as an integer data type.</p>
* @description <p>This method must only be used to retrieve properties created with
{@link Titanium.App.Properties#method-setInt setInt}. </p>
<p>Use {@link Titanium.App.Properties#method-getDouble getDouble} and {@link Titanium.App.Properties#method-setDouble setDouble}
to store values outside the integer data type range of <code>-2,147,483,648</code> to <code>2,147,483,647</code>.</p>
* @param {String} property
<p>Name of property.</p>
* @param {Number} default (optional)
<p>Default value to return if property does not exist.</p>
* @returns {Number}
*/
/**
* @method getList
* <p>Returns the value of a property as an array data type.</p>
* @param {String} property
<p>Name of property.</p>
* @param {Array<Object>} default (optional)
<p>Default value to return if property does not exist.</p>
* @returns {Object[]}
*/
/**
* @method getObject
* <p>Returns the value of a property as an object.</p>
* @param {String} property
<p>Name of property.</p>
* @param {Object} default (optional)
<p>Default value to return if property does not exist.</p>
* @returns {Object}
*/
/**
* @method getString
* <p>Returns the value of a property as a string data type.</p>
* @param {String} property
<p>Name of property.</p>
* @param {String} default (optional)
<p>Default value to return if property does not exist.</p>
* @returns {String}
*/
/**
* @method hasProperty
* <p>Indicates whether a property exists.</p>
* @param {String} property
<p>Name of property.</p>
* @returns {Boolean}
*/
/**
* @method listProperties
* <p>Returns an array of property names.</p>
* @returns {Object[]}
*/
/**
* @method removeProperty
* <p>Removes a property if it exists, or does nothing otherwise.</p>
* @param {String} property
<p>Name of property.</p>
*/
/**
* @method setBool
* <p>Sets the value of a property as a boolean data type. The property will be created if it
does not exist.</p>
* @param {String} property
<p>Name of property.</p>
* @param {Boolean} value
<p>Property value.</p>
*/
/**
* @method setDouble
* <p>Sets the value of a property as a double (double-precision, floating point) data type. The
property will be created if it does not exist.</p>
* @param {String} property
<p>Name of property.</p>
* @param {Number} value
<p>Property value.</p>
*/
/**
* @method setInt
* <p>Sets the value of a property as an integer data type. The property will be created if it
does not exist.</p>
* @description <p>Use {@link Titanium.App.Properties#method-getDouble getDouble} and {@link Titanium.App.Properties#method-setDouble setDouble}
to store values outside the integer data type range of <code>-2,147,483,648</code> to <code>2,147,483,647</code>.</p>
* @param {String} property
<p>Name of property.</p>
* @param {Number} value
<p>Property value, within the range <code>-2,147,483,648</code> to <code>2,147,483,647</code>.</p>
*/
/**
* @method setList
* <p>Sets the value of a property as an array data type. The property will be created if it
does not exist.</p>
* @param {String} property
<p>Name of property.</p>
* @param {Array<Object>} value
<p>Property value.</p>
*/
/**
* @method setObject
* <p>Sets the value of a property as an object data type. The property will be created if it
does not exist.</p>
* @param {String} property
<p>Name of property.</p>
* @param {Object} value
<p>Property value.</p>
*/
/**
* @method setString
* <p>Sets the value of a property as a string data type. The property will be created if it
does not exist.</p>
* @param {String} property
<p>Name of property.</p>
* @param {String} value
<p>Property value.</p>
*/
/**
* @class Titanium.App.iOS.BackgroundService
* @platform iphone 1.5
* @platform ipad 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/BackgroundService.yml
* <p>A service that runs when the application is placed in the background.</p>
* @description <p>A background service is created by {@link Titanium.App.iOS#method-registerBackgroundService}. </p>
<p>At creation, a local URL to a JavaScript file must be defined. The code it contains is executed
each time the application is no longer in the foreground, along with all other services that have
been registered in the same way. When this happens, all background services continue to run until
one of the following occurs:</p>
<ul>
<li>A service is stopped with the <code>stop</code> method.</li>
<li>The application resumes, at which points all background services are stopped.</li>
<li>The OS terminates the service for one of the reasons discussed in
"Background Service Limitations", below.</li>
</ul>
<p>A background service can invoke a {@link Titanium.App.iOS.LocalNotification}, which prompts users via
a dialog to return to the application and provides a button that brings it back into the
foreground.</p>
<h4>Background Service Limitations</h4>
<p>A background service is subject to limitations imposed by the operating system, such as</p>
<ul>
<li>The OS limits the total amount of time a background service can run for after the application
is paused, typically to no more than 10 minutes.</li>
<li>The OS may terminate the background service at any point to reclaim resources.</li>
</ul>
* <h3>Examples</h3>
<h4>Background Services Example</h4>
<p>Two background services are registered in the following application.</p>
<p>The first service logs a message every time the application is paused and then is stopped to
release the service from memory. The service is not unregistered, and so will continue to be
invoked.</p>
<p>The second creates an application property where it stores a run count value. For the first 4
times the application is paused, a local notification is invoked that gives the user the
opportunity to bring the application back to the foreground. Once the run count reaches 5,
the service is unregistered and is not invoked again until the application is relaunched.</p>
<h4>app.js</h4>
<pre><code>var win1 = Ti.UI.createWindow({
title:'Background Services Example',
backgroundColor:'#4186cd',
modal:true
});
Ti.API.info('Registering background services');
var service = Ti.App.iOS.registerBackgroundService({url:'bg-service1.js'});
var service2 = Ti.App.iOS.registerBackgroundService({url:'bg-service2.js'});
Ti.API.info('*** Press home button to pause application ***');
win1.open();
</code></pre>
<h4>bg-service1.js</h4>
<pre><code>Ti.API.info('bg-service1: service has been invoked once, and will now be stopped to release it from memory. ');
Ti.App.currentService.stop();
var listener = Ti.App.currentService.addEventListener('stop',function(){
Ti.API.info('bg-service1: Although the service has been stopped, it is still registered and will be executed again on next pause');
Ti.API.info('bg-service1: As all background services are automatically stopped on resume, it is not always necessary to explicitly stop a service');
});
</code></pre>
<h4>bg-service2.js</h4>
<pre><code>var count = Ti.App.Properties.getInt('bg-svc2-count', 0);
if (count > 4){
// reset count after 4 invocations
count = 0;
}
count++;
Ti.App.Properties.setInt('bg-svc2-count', count);
Ti.API.info('bg-service2 has been run ' + count + ' times');
if (count > 4){
Ti.App.currentService.unregister();
var finalNotif = Ti.App.iOS.scheduleLocalNotification({
alertBody:'bg-service2: As service has been invoked more than 4 times, it has been unregistered and will NOT run again. Relaunch the app to re-register it',
date:new Date(new Date().getTime() + 1000) // 1 second after unregister
});
} else {
var curNotif = Ti.App.iOS.scheduleLocalNotification({
alertBody:'bg-service2: has been invoked ' + count + ' times. It is still registered and will run again when the app is transitioned to the background',
date:new Date(new Date().getTime() + 1000) // 1 second after pause
});
}
</code></pre>
*/
/**
* @method stop
* <p>Stops the service from running during the current background session to conserve resources.</p>
*/
/**
* @method unregister
* <p>Unregisters the background service.</p>
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.App.iOS.BackgroundService#property-url} property.</p>
* @returns {String}
*/
/**
* @method setUrl
* <p>Sets the value of the {@link Titanium.App.iOS.BackgroundService#property-url} property.</p>
* @param {String} url
<p>New value for the property.</p>
*/
/**
* @property [url=none]
* @type String
* @creationOnly
* <p>A local URL to a JavaScript file containing the code to run in the background.</p>
*/
/**
* @class Titanium.App.iOS.LocalNotification
* @platform iphone 1.5
* @platform ipad 1.5
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/LocalNotification.yml
* <p>A local notification to alert the user of new or pending application information.</p>
* @description <p>A LocalNotification is created by {@link Titanium.App.iOS#method-scheduleLocalNotification}. </p>
<p>Local notifications are a way for an application that is not running in the foreground to let
users know that it has information for them. When invoked, the application either displays a
banner message or an alert dialog with a <strong>Close</strong> button to dismiss and an <strong>Open</strong> button to bring the application
into the foreground. The application can also modify the icon badge, to show the
number of pending notifications, and generate a sound.</p>
*/
/**
* @method cancel
* <p>Cancels the pending notification.</p>
*/
/**
* @class Titanium.App.iOS.SearchQuery
* @platform iphone 5.5.0
* @platform ipad 5.5.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/SearchQuery.yml
* <p>A search query object manages the criteria to apply when searching app content that you have previously
indexed by using the Core Spotlight APIs.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @description <p>You can use this API to search multiple {@link Titanium.App.iOS.SearchableItem} objects at the same time. You can do that
by using the <code>queryString</code> parameter that has a special syntax to filter and index several items. Please refer
to the official <a href="https://developer.apple.com/reference/corespotlight/cssearchquery">Apple documentation</a> for detailed information on how to structure your search-query to get the
best possible results.</p>
<p>To use this feature make sure you have a compatible device running iOS 10 or later.</p>
<p>To create a SearchableItem object, use the Titanium.App.iOS.createSearchableItem method.
Pass a dictionary of properties to the method that will help identify the item.
At minimum, you must set the {@link Titanium.App.iOS.SearchableItem#property-attributeSet attributeSet} property, which associates
the metadata with the SearchableItem object.</p>
* <h3>Examples</h3>
<h4>Perform a simple search-query for all items that start with "Searchable" in it.</h4>
<p>The following example demonstrates how to search a Ti.App.iOS.SearchableItem using the iOS 10
Ti.App.iOS.SearchQuery API.</p>
<h4>app.js</h4>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: "#fff"
});
var btn = Ti.UI.createButton({
title: "Start search-query"
});
var searchItems = [];
var itemAttr = Ti.App.iOS.createSearchableItemAttributeSet({
itemContentType: Ti.App.iOS.UTTYPE_IMAGE,
title: "Titanium Core Spotlight Tutorial"
});
itemAttr.contentDescription = "Tech Example \nOn: " + String.formatDate(new Date(), "short");
itemAttr.keywords = ["Mobile", "Appcelerator", "Titanium"];
itemAttr.displayName = "Hello world";
var item = Ti.App.iOS.createSearchableItem({
uniqueIdentifier: "my-id",
domainIdentifier: "com.mydomain",
attributeSet: itemAttr
});
searchItems.push(item);
var indexer = Ti.App.iOS.createSearchableIndex();
indexer.addToDefaultSearchableIndex(searchItems, function(e) {
if (e.success) {
Ti.API.info("Press the home button and now search for your keywords");
} else {
alert("Searchable index could not be created: " + JSON.stringify(e.error));
}
});
btn.addEventListener("click", function() {
// An array of found Ti.App.iOS.SearchableItem's
var allItems = [];
// The search-query
var searchQuery = Ti.App.iOS.createSearchQuery({
queryString: 'title == "Titanium*"',
attributes: ["title", "displayName", "keywords", "contentType"]
});
// The event to be called when a new batch of items is found
searchQuery.addEventListener("founditems", function(e) {
for (var i = 0; i < e.items.length; i++) {
allItems.push(e.items[i]);
}
});
// The event to be called when the search-query completes
searchQuery.addEventListener("completed", function(e) {
if (!e.success) {
alert(e.error);
}
for (var i = 0; i < allItems.length; i++) {
var attributeSet = allItems[i].attributeSet
var foundTitle = attributeSet.title
var foundDisplayName = attributeSet.displayName
Ti.API.info("title: " + foundTitle + ", displayName: " + foundDisplayName);
}
});
// Start the search-query (or use searchQuery.cancel()) to abort it
searchQuery.start();
});
win.add(btn);
win.open();
</code></pre>
*/
/**
* @event founditems
* <p>Fired when the query finds a new batch of matching items.</p>
* @param {Array<Titanium.App.iOS.SearchableItem>} items
<p>An array of indexed items that match the specified query.</p>
* @param {Number} foundItemsCount
<p>The number of items that are currently fetched.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event completed
* <p>Fired when the query completes to inform you about it's success.
To receive items, use the <code>founditems</code> event.</p>
* @param {Boolean} success
<p>Indicates if the operation succeeded. Returns true if download succeeded, false otherwise.</p>
* @param {String} error
<p>Error message, if any returned. Undefined otherwise.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method start
* <p>Asynchronously queries the index for items that match the query object's specifications.</p>
*/
/**
* @method cancel
* <p>Cancels a query operation.</p>
*/
/**
* @method isCancelled
* <p>A Boolean value that indicates if the query has been cancelled (<code>true</code>) or not (<code>false</code>).</p>
* @returns {Boolean}Returns `true` if the query was cancelled.
*/
/**
* @property queryString
* @type String
* @creationOnly
* <p>A formatted string that defines the matching criteria to apply to indexed items.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @description <p>This parameter cannot be null.</p>
*/
/**
* @property attributes
* @type String[]
* <p>An array of strings that represent the attributes of indexed items.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @description <p>Each string corresponds to a property name that can be set for an item. For a list of possible properties, see
the {@link Titanium.App.iOS.SearchableItemAttributeSet} API. Passing null for this parameter means that the query does not use
attributes to find matching items.</p>
*/
/**
* @class Titanium.App.iOS.SearchableIndex
* @platform iphone 5.0.0
* @platform ipad 5.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/SearchableIndex.yml
* <p>The SearchableIndex module is used to add or remove Ti.App.iOS.SearchableItem objects from the device search index.</p>
* @description <p>To effectively add and remove information from the iOS search index you will need to use the following modules:</p>
<ul>
<li>{@link Titanium.App.iOS.SearchableItemAttributeSet} - Used to create metadata related to the <code>Ti.App.iOS.SearchableItem</code></li>
<li>{@link Titanium.App.iOS.SearchableItem} - Used to assemble metadata into a unique object package to be used by <code>Ti.App.iOS.SearchableIndex</code></li>
<li>{@link Titanium.App.iOS.SearchableIndex} - Used to add and remove <code>Ti.App.iOS.SearchableItem</code> objects to the device search index</li>
</ul>
<p>To use this feature make sure you have a compatible device running iOS 9 or later.</p>
* <h3>Examples</h3>
<h4>Add Searchable Content to the On-Device Index</h4>
<p>The following example demonstrates how to create a new Ti.App.iOS.SearchableItem and
add a Ti.App.iOS.SearchableItemAttributeSet. The Ti.App.iOS.SearchableItem is then passed to the
Ti.App.iOS.SearchableIndex object to add it to the on-device search index.</p>
<h4>app.js</h4>
<pre><code>var searchItems = [];
var itemAttr = Ti.App.iOS.createSearchableItemAttributeSet({
itemContentType: Ti.App.iOS.UTTYPE_IMAGE,
title:"Titanium Core Spotlight Tutorial",
contentDescription:"Tech Example \nOn: " + String.formatDate(new Date(),"short"),
keywords:["Mobile","Appcelerator","Titanium"]
});
var item = Ti.App.iOS.createSearchableItem({
identifier:"my-id",
domainIdentifier:"com.mydomain",
attributeSet:itemAttr
});
searchItems.push(item);
var indexer = Ti.App.iOS.createSearchableIndex();
indexer.addToDefaultSearchableIndex([searchItems],function(e){
if(e.success){
alert("Press the home button and now search for your keywords");
}else{
alert("Errored: " + JSON.stringify(e.error));
}
});
</code></pre>
*/
/**
* @method isSupported
* <p>Indicates whether indexing is supported by the device.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @returns {Boolean}
*/
/**
* @method addToDefaultSearchableIndex
* <p>Adds an array of Titanium.App.iOS.SearchableItem objects to the default search index.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @param {Array<Titanium.App.iOS.SearchableItem>} Array
<p>Array of Titanium.App.iOS.SearchableItem objects to be added to the default search index.</p>
* @param {Callback<Dictionary>} callback
<p>Function to invoke on success or failure of adding the array Titanium.App.iOS.SearchableItem object to the default search index.</p>
*/
/**
* @method deleteAllSearchableItems
* <p>Removes all search items added by the application.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @param {Callback<Dictionary>} callback
<p>Function to invoke on success or failure of deleting all search items.</p>
*/
/**
* @method deleteAllSearchableItemByDomainIdenifiers
* <p>Removes search items based on an array of domain identifiers.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @param {Array<String>} Array
<p>Array of domain identifiers to be removed from the default search index.</p>
* @param {Callback<Dictionary>} callback
<p>Function to invoke on success or failure of removing search items from the default search index.</p>
*/
/**
* @method deleteSearchableItemsByIdentifiers
* <p>Removes search items based on an array of identifiers.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @param {Array<String>} Array
<p>Array of identifiers to be removed from the default search index.</p>
* @param {Callback<Dictionary>} callback
<p>Function to invoke on success or failure of removing search items from the default search index.</p>
*/
/**
* @class Titanium.App.iOS.SearchableItem
* @platform iphone 5.0.0
* @platform ipad 5.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/SearchableItem.yml
* <p>Used to create a unique object containing all of the search information that will appear in the device search index.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>To effectively add and remove information from the iOS search index you will need to use the below listed modules:</p>
<ul>
<li>{@link Titanium.App.iOS.SearchableItemAttributeSet} - Used to create metadata related to the <code>Ti.App.iOS.SearchableItem</code></li>
<li>{@link Titanium.App.iOS.SearchableItem} - Used to assemble metadata into a unique object package to be used by <code>Ti.App.iOS.SearchableIndex</code></li>
<li>{@link Titanium.App.iOS.SearchableIndex} - Used to add and remove <code>Ti.App.iOS.SearchableItem</code> objects to the device search index</li>
</ul>
<p>To use this feature make sure you have a compatible device running iOS 9 or later.</p>
<p>To create a SearchableItem object, use the Titanium.App.iOS.createSearchableItem method.
Pass a dictionary of properties to the method that will help identify the item.
At minimum, you must set the {@link Titanium.App.iOS.SearchableItem#property-attributeSet attributeSet} property, which associates
the metadata with the SearchableItem object.</p>
<p>Then, pass the SearchableItem object to a SearchableIndex object's
{@link Titanium.App.iOS.SearchableIndex#method-addToDefaultSearchableIndex addToDefaultSearchableIndex()} method to add the item
to the device's search index.</p>
* <h3>Examples</h3>
<h4>Add Searchable Content to the On-Device Index</h4>
<p>The following example demonstrates how to create a new Ti.App.iOS.SearchableItem and
add a Ti.App.iOS.SearchableItemAttributeSet. The Ti.App.iOS.SearchableItem is then passed to the
Ti.App.iOS.SearchableIndex object to add it to the on-device search index.</p>
<h4>app.js</h4>
<pre><code>var searchItems = [];
var itemAttr = Ti.App.iOS.createSearchableItemAttributeSet({
itemContentType: Ti.App.iOS.UTTYPE_IMAGE,
title:"Titanium Core Spotlight Tutorial",
contentDescription:"Tech Example \nOn: " + String.formatDate(new Date(),"short"),
keywords:["Mobile","Appcelerator","Titanium"]
});
var item = Ti.App.iOS.createSearchableItem({
uniqueIndentifier:"my-id",
domainIdentifier:"com.mydomain",
attributeSet:itemAttr
});
searchItems.push(item);
var indexer = Ti.App.iOS.createSearchableIndex();
indexer.addToDefaultSearchableIndex(searchItems,function(e){
if(e.success){
alert("Press the home button and now search for your keywords");
}else{
alert("Errored: " + JSON.stringify(e.error));
}
});
</code></pre>
*/
/**
* @method getDomainIdentifier
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItem#property-domainIdentifier} property.</p>
* @returns {String}
*/
/**
* @method setDomainIdentifier
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItem#property-domainIdentifier} property.</p>
* @param {String} domainIdentifier
<p>New value for the property.</p>
*/
/**
* @method getExpirationDate
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItem#property-expirationDate} property.</p>
* @returns {String}
*/
/**
* @method setExpirationDate
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItem#property-expirationDate} property.</p>
* @param {String} expirationDate
<p>New value for the property.</p>
*/
/**
* @method getUniqueIdentifier
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItem#property-uniqueIdentifier} property.</p>
* @returns {String}
*/
/**
* @method setUniqueIdentifier
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItem#property-uniqueIdentifier} property.</p>
* @param {String} uniqueIdentifier
<p>New value for the property.</p>
*/
/**
* @property attributeSet
* @type Titanium.App.iOS.SearchableItemAttributeSet
* @creationOnly
* <p>Set of metadata properties to display for the item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Must be set to create a SearchableItem object.</p>
*/
/**
* @property domainIdentifier
* @type String
* <p>Identifier that represents the "domain" or owner of this item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property expirationDate
* @type String
* <p>Searchable items have an expiration date or time to live. By default it is set to one month.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Absolute date after which the activity is no longer eligible to be indexed or handed off.</p>
<p>The date will be a string in the following format: "yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'"
For example, <code>2015-12-25T23:30:55.978+0000</code></p>
*/
/**
* @property uniqueIdentifier
* @type String
* <p>Unique identifier to your application group.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @class Titanium.App.iOS.SearchableItemAttributeSet
* @platform iphone 5.0.0
* @platform ipad 5.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/SearchableItemAttributeSet.yml
* <p>The SearchableItemAttributeSet module defines metadata properties for SearchItem and UserActivity objects.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The SearchableItemAttributeSet object provides a large number of properties covering most common scenarios such
as files, music, video, and document searches. To effectively add and remove information from the iOS search index
you will need to use the below listed modules:</p>
<ul>
<li>{@link Titanium.App.iOS.SearchableItemAttributeSet} - Used to create metadata related to the <code>Ti.App.iOS.SearchableItem</code></li>
<li>{@link Titanium.App.iOS.SearchableItem} - Used to assemble metadata into a unique object package to be used by <code>Ti.App.iOS.SearchableIndex</code></li>
<li>{@link Titanium.App.iOS.SearchableIndex} - Used to add and remove <code>Ti.App.iOS.SearchableItem</code> objects to the device search index</li>
</ul>
<p>To use this feature make sure you have a compatible device running iOS 9 or later.</p>
<p>To create a SearchableItemAttributeSet object, use the Titanium.App.iOS.createSearchableItemAttributeSet method.
Pass a dictionary of metadata properties to the method to associate with a SearchableItem object or UserActivity.
At minimum, you must set the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-itemContentType itemContentType} property.</p>
<p>Pass the SearchableItemAttributeSet object to either the Titanium.App.iOS.createSearchableItem method to the <code>attributeSet</code> key
or to a UserActivity object's {@link Titanium.App.iOS.UserActivity#method-addContentAttributeSet addContentAttributeSet()} method.</p>
* <h3>Examples</h3>
<h4>Add Searchable Content to the On-Device Index</h4>
<p>The following example demonstrates how to create a new Ti.App.iOS.SearchableItem and
add a Ti.App.iOS.SearchableItemAttributeSet. The Ti.App.iOS.SearchableItem is then passed to the
Ti.App.iOS.SearchableIndex object to add it to the on-device search index.</p>
<h4>app.js</h4>
<pre><code>var searchItems = [];
var itemAttr = Ti.App.iOS.createSearchableItemAttributeSet({
itemContentType: Ti.App.iOS.UTTYPE_IMAGE,
title:"Titanium Core Spotlight Tutorial"
});
itemAttr.contentDescription ="Tech Example \nOn: " + String.formatDate(new Date(),"short");
itemAttr.keywords =["Mobile","Appcelerator","Titanium"];
var item = Ti.App.iOS.createSearchableItem({
uniqueIdentifier:"my-id",
domainIdentifier:"com.mydomain",
attributeSet:itemAttr
});
searchItems.push(item);
var indexer = Ti.App.iOS.createSearchableIndex();
indexer.addToDefaultSearchableIndex(searchItems,function(e){
if(e.success){
alert("Press the home button and now search for your keywords");
}else{
alert("Errored: " + JSON.stringify(e.error));
}
});
</code></pre>
*/
/**
* @method getDisplayName
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-displayName} property.</p>
* @returns {String}
*/
/**
* @method setDisplayName
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-displayName} property.</p>
* @param {String} displayName
<p>New value for the property.</p>
*/
/**
* @method getAlternateNames
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-alternateNames} property.</p>
* @returns {String[]}
*/
/**
* @method setAlternateNames
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-alternateNames} property.</p>
* @param {Array<String>} alternateNames
<p>New value for the property.</p>
*/
/**
* @method getPath
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-path} property.</p>
* @returns {String}
*/
/**
* @method setPath
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-path} property.</p>
* @param {String} path
<p>New value for the property.</p>
*/
/**
* @method getContentURL
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentURL} property.</p>
* @returns {String}
*/
/**
* @method setContentURL
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentURL} property.</p>
* @param {String} contentURL
<p>New value for the property.</p>
*/
/**
* @method getThumbnailURL
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-thumbnailURL} property.</p>
* @returns {String}
*/
/**
* @method setThumbnailURL
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-thumbnailURL} property.</p>
* @param {String} thumbnailURL
<p>New value for the property.</p>
*/
/**
* @method getThumbnailData
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-thumbnailData} property.</p>
* @returns {String/Titanium.Blob}
*/
/**
* @method setThumbnailData
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-thumbnailData} property.</p>
* @param {String/Titanium.Blob} thumbnailData
<p>New value for the property.</p>
*/
/**
* @method getRelatedUniqueIdentifier
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-relatedUniqueIdentifier} property.</p>
* @returns {String}
*/
/**
* @method setRelatedUniqueIdentifier
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-relatedUniqueIdentifier} property.</p>
* @param {String} relatedUniqueIdentifier
<p>New value for the property.</p>
*/
/**
* @method getMetadataModificationDate
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-metadataModificationDate} property.</p>
* @returns {String}
*/
/**
* @method setMetadataModificationDate
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-metadataModificationDate} property.</p>
* @param {String} metadataModificationDate
<p>New value for the property.</p>
*/
/**
* @method getContentType
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentType} property.</p>
* @returns {String}
*/
/**
* @method setContentType
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentType} property.</p>
* @param {String} contentType
<p>New value for the property.</p>
*/
/**
* @method getContentTypeTree
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentTypeTree} property.</p>
* @returns {String[]}
*/
/**
* @method setContentTypeTree
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentTypeTree} property.</p>
* @param {Array<String>} contentTypeTree
<p>New value for the property.</p>
*/
/**
* @method getKeywords
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-keywords} property.</p>
* @returns {String[]}
*/
/**
* @method setKeywords
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-keywords} property.</p>
* @param {Array<String>} keywords
<p>New value for the property.</p>
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getSubject
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-subject} property.</p>
* @returns {String}
*/
/**
* @method setSubject
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-subject} property.</p>
* @param {String} subject
<p>New value for the property.</p>
*/
/**
* @method getTheme
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-theme} property.</p>
* @returns {String}
*/
/**
* @method setTheme
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-theme} property.</p>
* @param {String} theme
<p>New value for the property.</p>
*/
/**
* @method getContentDescription
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentDescription} property.</p>
* @returns {String}
*/
/**
* @method setContentDescription
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentDescription} property.</p>
* @param {String} contentDescription
<p>New value for the property.</p>
*/
/**
* @method getIdentifier
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-identifier} property.</p>
* @returns {String}
*/
/**
* @method setIdentifier
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-identifier} property.</p>
* @param {String} identifier
<p>New value for the property.</p>
*/
/**
* @method getAudiences
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-audiences} property.</p>
* @returns {String[]}
*/
/**
* @method setAudiences
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-audiences} property.</p>
* @param {Array<String>} audiences
<p>New value for the property.</p>
*/
/**
* @method getFileSize
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-fileSize} property.</p>
* @returns {Number}
*/
/**
* @method setFileSize
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-fileSize} property.</p>
* @param {Number} fileSize
<p>New value for the property.</p>
*/
/**
* @method getPageCount
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-pageCount} property.</p>
* @returns {Number}
*/
/**
* @method setPageCount
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-pageCount} property.</p>
* @param {Number} pageCount
<p>New value for the property.</p>
*/
/**
* @method getPageWidth
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-pageWidth} property.</p>
* @returns {Number}
*/
/**
* @method setPageWidth
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-pageWidth} property.</p>
* @param {Number} pageWidth
<p>New value for the property.</p>
*/
/**
* @method getPageHeight
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-pageHeight} property.</p>
* @returns {Number}
*/
/**
* @method setPageHeight
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-pageHeight} property.</p>
* @param {Number} pageHeight
<p>New value for the property.</p>
*/
/**
* @method getSecurityMethod
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-securityMethod} property.</p>
* @returns {String}
*/
/**
* @method setSecurityMethod
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-securityMethod} property.</p>
* @param {String} securityMethod
<p>New value for the property.</p>
*/
/**
* @method getCreator
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-creator} property.</p>
* @returns {String}
*/
/**
* @method setCreator
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-creator} property.</p>
* @param {String} creator
<p>New value for the property.</p>
*/
/**
* @method getEncodingApplications
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-encodingApplications} property.</p>
* @returns {String[]}
*/
/**
* @method setEncodingApplications
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-encodingApplications} property.</p>
* @param {Array<String>} encodingApplications
<p>New value for the property.</p>
*/
/**
* @method getKind
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-kind} property.</p>
* @returns {String}
*/
/**
* @method setKind
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-kind} property.</p>
* @param {String} kind
<p>New value for the property.</p>
*/
/**
* @method getFontNames
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-fontNames} property.</p>
* @returns {String[]}
*/
/**
* @method setFontNames
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-fontNames} property.</p>
* @param {Array<String>} fontNames
<p>New value for the property.</p>
*/
/**
* @method getAudioSampleRate
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-audioSampleRate} property.</p>
* @returns {Number}
*/
/**
* @method setAudioSampleRate
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-audioSampleRate} property.</p>
* @param {Number} audioSampleRate
<p>New value for the property.</p>
*/
/**
* @method getAudioChannelCount
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-audioChannelCount} property.</p>
* @returns {Number}
*/
/**
* @method setAudioChannelCount
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-audioChannelCount} property.</p>
* @param {Number} audioChannelCount
<p>New value for the property.</p>
*/
/**
* @method getTempo
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-tempo} property.</p>
* @returns {Number}
*/
/**
* @method setTempo
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-tempo} property.</p>
* @param {Number} tempo
<p>New value for the property.</p>
*/
/**
* @method getKeySignature
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-keySignature} property.</p>
* @returns {String}
*/
/**
* @method setKeySignature
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-keySignature} property.</p>
* @param {String} keySignature
<p>New value for the property.</p>
*/
/**
* @method getTimeSignature
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-timeSignature} property.</p>
* @returns {String}
*/
/**
* @method setTimeSignature
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-timeSignature} property.</p>
* @param {String} timeSignature
<p>New value for the property.</p>
*/
/**
* @method getAudioEncodingApplication
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-audioEncodingApplication} property.</p>
* @returns {String}
*/
/**
* @method setAudioEncodingApplication
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-audioEncodingApplication} property.</p>
* @param {String} audioEncodingApplication
<p>New value for the property.</p>
*/
/**
* @method getComposer
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-composer} property.</p>
* @returns {String}
*/
/**
* @method setComposer
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-composer} property.</p>
* @param {String} composer
<p>New value for the property.</p>
*/
/**
* @method getLyricist
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-lyricist} property.</p>
* @returns {String}
*/
/**
* @method setLyricist
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-lyricist} property.</p>
* @param {String} lyricist
<p>New value for the property.</p>
*/
/**
* @method getAlbum
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-album} property.</p>
* @returns {String}
*/
/**
* @method setAlbum
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-album} property.</p>
* @param {String} album
<p>New value for the property.</p>
*/
/**
* @method getArtist
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-artist} property.</p>
* @returns {String}
*/
/**
* @method setArtist
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-artist} property.</p>
* @param {String} artist
<p>New value for the property.</p>
*/
/**
* @method getAudioTrackNumber
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-audioTrackNumber} property.</p>
* @returns {Number}
*/
/**
* @method setAudioTrackNumber
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-audioTrackNumber} property.</p>
* @param {Number} audioTrackNumber
<p>New value for the property.</p>
*/
/**
* @method getRecordingDate
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-recordingDate} property.</p>
* @returns {String}
*/
/**
* @method setRecordingDate
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-recordingDate} property.</p>
* @param {String} recordingDate
<p>New value for the property.</p>
*/
/**
* @method getMusicalGenre
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-musicalGenre} property.</p>
* @returns {String}
*/
/**
* @method setMusicalGenre
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-musicalGenre} property.</p>
* @param {String} musicalGenre
<p>New value for the property.</p>
*/
/**
* @method getGeneralMIDISequence
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-generalMIDISequence} property.</p>
* @returns {Number}
*/
/**
* @method setGeneralMIDISequence
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-generalMIDISequence} property.</p>
* @param {Number} generalMIDISequence
<p>New value for the property.</p>
*/
/**
* @method getMusicalInstrumentCategory
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-musicalInstrumentCategory} property.</p>
* @returns {String}
*/
/**
* @method setMusicalInstrumentCategory
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-musicalInstrumentCategory} property.</p>
* @param {String} musicalInstrumentCategory
<p>New value for the property.</p>
*/
/**
* @method getMusicalInstrumentName
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-musicalInstrumentName} property.</p>
* @returns {String}
*/
/**
* @method setMusicalInstrumentName
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-musicalInstrumentName} property.</p>
* @param {String} musicalInstrumentName
<p>New value for the property.</p>
*/
/**
* @method getSupportsPhoneCall
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-supportsPhoneCall} property.</p>
* @returns {Number}
*/
/**
* @method setSupportsPhoneCall
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-supportsPhoneCall} property.</p>
* @param {Number} supportsPhoneCall
<p>New value for the property.</p>
*/
/**
* @method getSupportsNavigation
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-supportsNavigation} property.</p>
* @returns {Number}
*/
/**
* @method setSupportsNavigation
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-supportsNavigation} property.</p>
* @param {Number} supportsNavigation
<p>New value for the property.</p>
*/
/**
* @method getContainerTitle
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-containerTitle} property.</p>
* @returns {String}
*/
/**
* @method setContainerTitle
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-containerTitle} property.</p>
* @param {String} containerTitle
<p>New value for the property.</p>
*/
/**
* @method getContainerDisplayName
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-containerDisplayName} property.</p>
* @returns {String}
*/
/**
* @method setContainerDisplayName
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-containerDisplayName} property.</p>
* @param {String} containerDisplayName
<p>New value for the property.</p>
*/
/**
* @method getContainerIdentifier
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-containerIdentifier} property.</p>
* @returns {String}
*/
/**
* @method setContainerIdentifier
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-containerIdentifier} property.</p>
* @param {String} containerIdentifier
<p>New value for the property.</p>
*/
/**
* @method getContainerOrder
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-containerOrder} property.</p>
* @returns {Number}
*/
/**
* @method setContainerOrder
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-containerOrder} property.</p>
* @param {Number} containerOrder
<p>New value for the property.</p>
*/
/**
* @method getEditors
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-editors} property.</p>
* @returns {String[]}
*/
/**
* @method setEditors
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-editors} property.</p>
* @param {Array<String>} editors
<p>New value for the property.</p>
*/
/**
* @method getParticipants
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-participants} property.</p>
* @returns {String[]}
*/
/**
* @method setParticipants
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-participants} property.</p>
* @param {Array<String>} participants
<p>New value for the property.</p>
*/
/**
* @method getProjects
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-projects} property.</p>
* @returns {String[]}
*/
/**
* @method setProjects
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-projects} property.</p>
* @param {Array<String>} projects
<p>New value for the property.</p>
*/
/**
* @method getDownloadedDate
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-downloadedDate} property.</p>
* @returns {String}
*/
/**
* @method setDownloadedDate
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-downloadedDate} property.</p>
* @param {String} downloadedDate
<p>New value for the property.</p>
*/
/**
* @method getLastUsedDate
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-lastUsedDate} property.</p>
* @returns {String}
*/
/**
* @method setLastUsedDate
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-lastUsedDate} property.</p>
* @param {String} lastUsedDate
<p>New value for the property.</p>
*/
/**
* @method getContentCreationDate
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentCreationDate} property.</p>
* @returns {String}
*/
/**
* @method setContentCreationDate
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentCreationDate} property.</p>
* @param {String} contentCreationDate
<p>New value for the property.</p>
*/
/**
* @method getContentModificationDate
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentModificationDate} property.</p>
* @returns {String}
*/
/**
* @method setContentModificationDate
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentModificationDate} property.</p>
* @param {String} contentModificationDate
<p>New value for the property.</p>
*/
/**
* @method getAddedDate
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-addedDate} property.</p>
* @returns {String}
*/
/**
* @method setAddedDate
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-addedDate} property.</p>
* @param {String} addedDate
<p>New value for the property.</p>
*/
/**
* @method getContentSources
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentSources} property.</p>
* @returns {String[]}
*/
/**
* @method setContentSources
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentSources} property.</p>
* @param {Array<String>} contentSources
<p>New value for the property.</p>
*/
* @method getComment
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-comment} property.</p>
* @returns {String}
*/
* @method setComment
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-comment} property.</p>
* @param {String} comment
<p>New value for the property.</p>
*/
/**
* @method getCopyright
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-copyright} property.</p>
* @returns {String}
*/
/**
* @method setCopyright
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-copyright} property.</p>
* @param {String} copyright
<p>New value for the property.</p>
*/
/**
* @method getDuration
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-duration} property.</p>
* @returns {Number}
*/
/**
* @method setDuration
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-duration} property.</p>
* @param {Number} duration
<p>New value for the property.</p>
*/
/**
* @method getContactKeywords
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contactKeywords} property.</p>
* @returns {String[]}
*/
/**
* @method setContactKeywords
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contactKeywords} property.</p>
* @param {Array<String>} contactKeywords
<p>New value for the property.</p>
*/
/**
* @method getCodecs
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-codecs} property.</p>
* @returns {String[]}
*/
/**
* @method setCodecs
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-codecs} property.</p>
* @param {Array<String>} codecs
<p>New value for the property.</p>
*/
/**
* @method getOrganizations
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-organizations} property.</p>
* @returns {String[]}
*/
/**
* @method setOrganizations
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-organizations} property.</p>
* @param {Array<String>} organizations
<p>New value for the property.</p>
*/
/**
* @method getMediaTypes
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-mediaTypes} property.</p>
* @returns {String[]}
*/
/**
* @method setMediaTypes
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-mediaTypes} property.</p>
* @param {Array<String>} mediaTypes
<p>New value for the property.</p>
*/
/**
* @method getVersion
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-version} property.</p>
* @returns {String}
*/
/**
* @method setVersion
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-version} property.</p>
* @param {String} version
<p>New value for the property.</p>
*/
/**
* @method getRole
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-role} property.</p>
* @returns {String}
*/
/**
* @method setRole
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-role} property.</p>
* @param {String} role
<p>New value for the property.</p>
*/
/**
* @method getStreamable
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-streamable} property.</p>
* @returns {Number}
*/
/**
* @method setStreamable
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-streamable} property.</p>
* @param {Number} streamable
<p>New value for the property.</p>
*/
/**
* @method getTotalBitRate
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-totalBitRate} property.</p>
* @returns {Number}
*/
/**
* @method setTotalBitRate
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-totalBitRate} property.</p>
* @param {Number} totalBitRate
<p>New value for the property.</p>
*/
/**
* @method getVideoBitRate
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-videoBitRate} property.</p>
* @returns {Number}
*/
/**
* @method setVideoBitRate
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-videoBitRate} property.</p>
* @param {Number} videoBitRate
<p>New value for the property.</p>
*/
/**
* @method getAudioBitRate
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-audioBitRate} property.</p>
* @returns {Number}
*/
/**
* @method setAudioBitRate
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-audioBitRate} property.</p>
* @param {Number} audioBitRate
<p>New value for the property.</p>
*/
/**
* @method getDeliveryType
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-deliveryType} property.</p>
* @returns {Number}
*/
/**
* @method setDeliveryType
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-deliveryType} property.</p>
* @param {Number} deliveryType
<p>New value for the property.</p>
*/
/**
* @method getLanguages
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-languages} property.</p>
* @returns {String[]}
*/
/**
* @method setLanguages
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-languages} property.</p>
* @param {Array<String>} languages
<p>New value for the property.</p>
*/
/**
* @method getRights
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-rights} property.</p>
* @returns {String[]}
*/
/**
* @method setRights
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-rights} property.</p>
* @param {Array<String>} rights
<p>New value for the property.</p>
*/
/**
* @method getPublishers
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-publishers} property.</p>
* @returns {String[]}
*/
/**
* @method setPublishers
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-publishers} property.</p>
* @param {Array<String>} publishers
<p>New value for the property.</p>
*/
/**
* @method getContributors
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contributors} property.</p>
* @returns {String[]}
*/
/**
* @method setContributors
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contributors} property.</p>
* @param {Array<String>} contributors
<p>New value for the property.</p>
*/
/**
* @method getCoverage
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-coverage} property.</p>
* @returns {String[]}
*/
/**
* @method setCoverage
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-coverage} property.</p>
* @param {Array<String>} coverage
<p>New value for the property.</p>
*/
/**
* @method getRating
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-rating} property.</p>
* @returns {Number}
*/
/**
* @method setRating
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-rating} property.</p>
* @param {Number} rating
<p>New value for the property.</p>
*/
/**
* @method getRatingDescription
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-ratingDescription} property.</p>
* @returns {String}
*/
/**
* @method setRatingDescription
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-ratingDescription} property.</p>
* @param {String} ratingDescription
<p>New value for the property.</p>
*/
/**
* @method getPlayCount
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-playCount} property.</p>
* @returns {Number}
*/
/**
* @method setPlayCount
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-playCount} property.</p>
* @param {Number} playCount
<p>New value for the property.</p>
*/
/**
* @method getInformation
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-information} property.</p>
* @returns {String}
*/
/**
* @method setInformation
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-information} property.</p>
* @param {String} information
<p>New value for the property.</p>
*/
/**
* @method getDirector
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-director} property.</p>
* @returns {String}
*/
/**
* @method setDirector
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-director} property.</p>
* @param {String} director
<p>New value for the property.</p>
*/
/**
* @method getProducer
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-producer} property.</p>
* @returns {String}
*/
/**
* @method setProducer
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-producer} property.</p>
* @param {String} producer
<p>New value for the property.</p>
*/
/**
* @method getGenre
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-genre} property.</p>
* @returns {String}
*/
/**
* @method setGenre
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-genre} property.</p>
* @param {String} genre
<p>New value for the property.</p>
*/
/**
* @method getPerformers
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-performers} property.</p>
* @returns {String[]}
*/
/**
* @method setPerformers
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-performers} property.</p>
* @param {Array<String>} performers
<p>New value for the property.</p>
*/
/**
* @method getOriginalFormat
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-originalFormat} property.</p>
* @returns {String}
*/
/**
* @method setOriginalFormat
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-originalFormat} property.</p>
* @param {String} originalFormat
<p>New value for the property.</p>
*/
/**
* @method getOriginalSource
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-originalSource} property.</p>
* @returns {String}
*/
/**
* @method setOriginalSource
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-originalSource} property.</p>
* @param {String} originalSource
<p>New value for the property.</p>
*/
/**
* @method getLocal
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-local} property.</p>
* @returns {Number}
*/
/**
* @method setLocal
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-local} property.</p>
* @param {Number} local
<p>New value for the property.</p>
*/
/**
* @method getContentRating
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentRating} property.</p>
* @returns {Number}
*/
/**
* @method setContentRating
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-contentRating} property.</p>
* @param {Number} contentRating
<p>New value for the property.</p>
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-url} property.</p>
* @returns {String}
*/
/**
* @method setUrl
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-url} property.</p>
* @param {String} url
<p>New value for the property.</p>
*/
/**
* @method getFullyFormattedAddress
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-fullyFormattedAddress} property.</p>
* @returns {String}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setFullyFormattedAddress
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-fullyFormattedAddress} property.</p>
* @param {String} fullyFormattedAddress
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getSubThoroughfare
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-subThoroughfare} property.</p>
* @returns {String}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setSubThoroughfare
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-subThoroughfare} property.</p>
* @param {String} subThoroughfare
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getThoroughfare
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-thoroughfare} property.</p>
* @returns {String}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setThoroughfare
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-thoroughfare} property.</p>
* @param {String} thoroughfare
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getPostalCode
* <p>Gets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-postalCode} property.</p>
* @returns {String}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setPostalCode
* <p>Sets the value of the {@link Titanium.App.iOS.SearchableItemAttributeSet#property-postalCode} property.</p>
* @param {String} postalCode
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property itemContentType
* @type String
* @creationOnly
* <p>Content type of the attribute set.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Must be set to create a SearchableItemAttributeSet object. Set to an identifier in the
<a href="https://developer.apple.com/library/ios/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html">iOS Developer Library: System-Declared Uniform Type Identifiers</a></p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.App.iOS#property-UTTYPE_TEXT}
<li> {@link Titanium.App.iOS#property-UTTYPE_PLAIN_TEXT}
<li> {@link Titanium.App.iOS#property-UTTYPE_UTF8_PLAIN_TEXT}
<li> {@link Titanium.App.iOS#property-UTTYPE_UTF16_EXTERNAL_PLAIN_TEXT}
<li> {@link Titanium.App.iOS#property-UTTYPE_UTF16_PLAIN_TEXT}
<li> {@link Titanium.App.iOS#property-UTTYPE_RTF}
<li> {@link Titanium.App.iOS#property-UTTYPE_HTML}
<li> {@link Titanium.App.iOS#property-UTTYPE_XML}
<li> {@link Titanium.App.iOS#property-UTTYPE_PDF}
<li> {@link Titanium.App.iOS#property-UTTYPE_RTFD}
<li> {@link Titanium.App.iOS#property-UTTYPE_FLAT_RTFD}
<li> {@link Titanium.App.iOS#property-UTTYPE_TXN_TEXT_AND_MULTIMEDIA_DATA}
<li> {@link Titanium.App.iOS#property-UTTYPE_WEB_ARCHIVE}
<li> {@link Titanium.App.iOS#property-UTTYPE_IMAGE}
<li> {@link Titanium.App.iOS#property-UTTYPE_JPEG}
<li> {@link Titanium.App.iOS#property-UTTYPE_JPEG2000}
<li> {@link Titanium.App.iOS#property-UTTYPE_TIFF}
<li> {@link Titanium.App.iOS#property-UTTYPE_PICT}
<li> {@link Titanium.App.iOS#property-UTTYPE_GIF}
<li> {@link Titanium.App.iOS#property-UTTYPE_PNG}
<li> {@link Titanium.App.iOS#property-UTTYPE_QUICKTIME_IMAGE}
<li> {@link Titanium.App.iOS#property-UTTYPE_APPLE_ICNS}
<li> {@link Titanium.App.iOS#property-UTTYPE_BMP}
<li> {@link Titanium.App.iOS#property-UTTYPE_ICO}
<li> {@link Titanium.App.iOS#property-UTTYPE_MOVIE}
<li> {@link Titanium.App.iOS#property-UTTYPE_VIDEO}
<li> {@link Titanium.App.iOS#property-UTTYPE_AUDIO}
<li> {@link Titanium.App.iOS#property-UTTYPE_QUICKTIME_MOVIE}
<li> {@link Titanium.App.iOS#property-UTTYPE_MPEG}
<li> {@link Titanium.App.iOS#property-UTTYPE_MPEG4}
<li> {@link Titanium.App.iOS#property-UTTYPE_MP3}
<li> {@link Titanium.App.iOS#property-UTTYPE_MPEG4_AUDIO}
<li> {@link Titanium.App.iOS#property-UTTYPE_APPLE_PROTECTED_MPEG4_AUDIO}
</ul></p>
*/
/**
* @property displayName
* @type String
* <p>A localized string to be displayed in the UI for this item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property alternateNames
* @type String[]
* <p>An array of localized strings of alternate display names for this item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property path
* @type String
* <p>The complete path to the item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property contentURL
* @type String
* <p>File URL representing the content to be indexed.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property thumbnailURL
* @type String
* <p>File URL pointing to a thumbnail image for this item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property thumbnailData
* @type String/Titanium.Blob
* <p>Image data for thumbnail for this item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property relatedUniqueIdentifier
* @type String
* <p>For activities this is the unique identifier for the item this activity is related to.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property metadataModificationDate
* @type String
* <p>The date that the last metadata attribute was changed.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The date will be a string in the following format: "yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'"
For example, <code>2015-12-25T23:30:55.978+0000</code></p>
*/
/**
* @property contentType
* @type String
* @creationOnly
* <p>UTI Type pedigree for an item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property contentTypeTree
* @type String[]
* <p>Array of strings related to the content tree of the item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property keywords
* @type String[]
* <p>Represents keywords associated with this particular item. Example keywords might be Birthday etc.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property title
* @type String
* <p>The title of the particular item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property subject
* @type String
* <p>Subject of the the item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property theme
* @type String
* <p>Theme of the the item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property contentDescription
* @type String
* <p>An account of the content of the resource.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Description may include but is not limited to: an abstract, table of contents, reference
to a graphical representation of content or a free-text account of the content.</p>
*/
/**
* @property identifier
* @type String
* <p>Used to reference to the resource within a given context.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Recommended best practice is to identify the resource by
means of a string or number conforming to a formal identification system.</p>
*/
/**
* @property audiences
* @type String[]
* <p>A class of entity for whom the resource is intended or useful.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>A class of entity may be determined by the creator, publisher
or third party.</p>
*/
/**
* @property fileSize
* @type Number
* <p>Size of the document in MB.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property pageCount
* @type Number
* <p>Number of pages in the item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property pageWidth
* @type Number
* <p>Width in points (72 points per inch) of the document page.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>First page only for PDF's - other pages within the PDF may
not be the same width.</p>
*/
/**
* @property pageHeight
* @type Number
* <p>Height in points (72 points per inch) of the document page.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>First page only for PDF's - other pages within the PDF may
not be the same height.</p>
*/
/**
* @property securityMethod
* @type String
* <p>Security (encryption) method used in the file.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property creator
* @type String
* <p>Application used to create the document content (e.g. "Word","Framemaker", etc.).</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property encodingApplications
* @type String[]
* <p>Software used to convert the original content into a PDF stream.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property kind
* @type String
* <p>Kind that the item represents.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property fontNames
* @type String[]
* <p>Array of font names used in the item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property audioSampleRate
* @type Number
* <p>The sample rate of the audio data contained in the file.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The sample rate is a float value representing Hertz (audio_frames/second),
for example, 44100.0 or 22254.54.</p>
*/
/**
* @property audioChannelCount
* @type Number
* <p>The number of channels in the audio data contained in the file.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>This item only represents
the number of discreet channels of audio data found in the file. It does not indicate
any configuration of the data in regards to a user's speaker setup.</p>
*/
/**
* @property tempo
* @type Number
* <p>The tempo of the music contained in the audio file in Beats Per Minute.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property keySignature
* @type String
* <p>The musical key of the song/composition contained in an audio file.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property timeSignature
* @type String
* <p>The time signature of the musical composition contained in the audio/MIDI file.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property audioEncodingApplication
* @type String
* <p>The name of the application that encoded the data contained in the audio file.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property composer
* @type String
* <p>The composer of the song/composition contained in the audio file.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property lyricist
* @type String
* <p>The lyricist/text writer for song/composition contained in the audio file.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property album
* @type String
* <p>The title for a collection of media.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property artist
* @type String
* <p>The artist for the media.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property audioTrackNumber
* @type Number
* <p>The track number of a song/composition when it is part of an album.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property recordingDate
* @type String
* <p>The recording date of the song/composition.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>This information differs from
the <code>contentCreationDate</code> attribute as it indicates the date that the
'art' was created, in contrast to contentCreationDate which for example, could indicate
the creation date of an edited or 'mastered' version of the original art.</p>
<p>The date will be a string in the following format: "yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'"
For example, <code>2015-12-25T23:30:55.978+0000</code></p>
*/
/**
* @property musicalGenre
* @type String
* <p>The musical genre of the song/composition contained in the audio file.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property generalMIDISequence
* @type Number
* <p>Used to indicates whether the MIDI sequence contained in the file is setup for use with a General MIDI device.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Should be <code>1</code> if true and <code>0</code> otherwise.</p>
*/
/**
* @property musicalInstrumentCategory
* @type String
* <p>Metadata attribute that stores the category of instrument.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Files should have an instrument associated with
them ("Other Instrument" is provided as a catch-all). For some
categories, like "Keyboards" there are instrument names which
provide a more detailed instrument definition, for example, Piano, Organ, etc.</p>
*/
/**
* @property musicalInstrumentName
* @type String
* <p>Metadata attribute that stores the name of instrument.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Relative to the instrument category. Files can have an
instrument name associated with them if they have certain
instrument categories, for example, the category Percussion has
multiple instruments, including Conga and Bongo.</p>
*/
/**
* @property supportsPhoneCall
* @type Number
* <p>Used to indicate that using the phone number is appropriate.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>If <code>supportsPhoneCall</code> is <code>1</code> and the item has the <code>phoneNumbers</code> property set, then the phone number
may be used to initiate phone calls. This should be used to indicate that using the phone
number is appropriate, and a primary action for the user. For example, <code>supportsPhoneCall</code>
would be set on a business, but not an academic paper that happens to have phone numbers
for the authors or the institution.</p>
*/
/**
* @property supportsNavigation
* @type Number
* <p>Used to determine if navigation is supported.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>If <code>supportsNavigation</code> is set to <code>1</code>, and the item has the <code>latitude</code> and <code>longitude</code> properties set,
then the latitude and longitude may be used for navigation. For example, <code>supportsNavigation</code>
would be set on a restaurant review, but not on a photo.</p>
*/
/**
* @property containerTitle
* @type String
* <p>Title displayed in the search container</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property containerDisplayName
* @type String
* <p>Display of the search container</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property containerIdentifier
* @type String
* <p>Identifier for the search container</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property containerOrder
* @type Number
* <p>Order the search container is displayed.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property editors
* @type String[]
* <p>The list of editor/editors that have worked on this item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property participants
* @type String[]
* <p>The list of people who are visible in an image or movie or written about in a document.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property projects
* @type String[]
* <p>The list of projects that this item is part of.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property downloadedDate
* @type String
* <p>The date that the file was last downloaded / received.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The date will be a string in the following format: "yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'"
For example, <code>2015-12-25T23:30:55.978+0000</code></p>
*/
/**
* @property lastUsedDate
* @type String
* <p>The date that the item was last used.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The date will be a string in the following format: "yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'"
For example, <code>2015-12-25T23:30:55.978+0000</code></p>
*/
/**
* @property contentCreationDate
* @type String
* <p>The date that the contents of the item were created.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The date will be a string in the following format: "yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'"
For example, <code>2015-12-25T23:30:55.978+0000</code></p>
*/
/**
* @property contentModificationDate
* @type String
* <p>The date that the contents of the item were last modified.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The date will be a string in the following format: "yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'"
For example, <code>2015-12-25T23:30:55.978+0000</code></p>
*/
/**
* @property addedDate
* @type String
* <p>The date that the item was moved into the current location.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The date will be a string in the following format: "yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'"
For example, <code>2015-12-25T23:30:55.978+0000</code></p>
*/
/**
* @property contentSources
* @type String[]
* <p>Used to indicate where the item was obtained from.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
* @property comment
* @type String
* <p>Comment related to a file.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property copyright
* @type String
* <p>Copyright of the content.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property duration
* @type Number
* <p>Duration in seconds of the content of the item (if appropriate).</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property contactKeywords
* @type String[]
* <p>A list of contacts that are somehow associated with this document beyond what is captured as Author.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property codecs
* @type String[]
* <p>The codecs used to encode/decode the media.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property organizations
* @type String[]
* <p>Used to indicate company/Organization that created the document.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property mediaTypes
* @type String[]
* <p>Media types present in the content.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property version
* @type String
* <p>A version specifier for this item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property role
* @type String
* <p>Used to indicate the role of the document creator.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property streamable
* @type Number
* <p>Whether the content is prepared for streaming. Set to <code>0</code> for not streamable and <code>1</code> for streamable.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property totalBitRate
* @type Number
* <p>The total bit rate (audio and video combined) of the media.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property videoBitRate
* @type Number
* <p>The video bit rate.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property audioBitRate
* @type Number
* <p>The audio bit rate.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property deliveryType
* @type Number
* <p>The delivery type of the item. Set to <code>0</code> for fast start and <code>1</code> for RTSP.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property languages
* @type String[]
* <p>Used to designate the languages of the intellectual content of the resource.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property rights
* @type String[]
* <p>Used to provide a link to information about rights held in and over resource.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property publishers
* @type String[]
* <p>Used to designate the entity responsible for making the resource available.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property contributors
* @type String[]
* <p>Used to designate the entity responsible for making contributions to the content of the resource.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property coverage
* @type String[]
* <p>Used to designate the extent or scope of the content of the resource.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property rating
* @type Number
* <p>User rating of this item out of 5 stars.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property ratingDescription
* @type String
* <p>A description of the rating, for example, the number of reviewers.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property playCount
* @type Number
* <p>User play count of this item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property information
* @type String
* <p>Information about the item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property director
* @type String
* <p>Director of the item, for example, the movie director.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property producer
* @type String
* <p>Producer of the content.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property genre
* @type String
* <p>Genre of the item, for example, movie genre.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property performers
* @type String[]
* <p>Performers in the movie.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property originalFormat
* @type String
* <p>Original format of the movie.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property originalSource
* @type String
* <p>Original source of the movie.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property local
* @type Number
* <p>Whether or not the item is local. Set to <code>1</code> if true and <code>0</code> otherwise.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property contentRating
* @type Number
* <p>Whether or not the item has explicit content. Set to <code>1</code> for explicit or <code>0</code> for clean.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property url
* @type String
* <p>URL of the item.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property fullyFormattedAddress
* @type String
* <p>The fully formatted address of the item (obtained from MapKit).</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property subThoroughfare
* @type String
* <p>The sub-location (e.g., street number) for the item according to guidelines established by the provider.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property thoroughfare
* @type String
* <p>The location (e.g., street name) for the item according to guidelines established by the provider.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property postalCode
* @type String
* <p>The postal code for the item according to guidelines established by the provider.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @class Titanium.App.iOS.UserActivity
* @platform iphone 5.0.0
* @platform ipad 5.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserActivity.yml
* <p>The UserActivity module is used to enable device Handoff and to create User Activities.</p>
* @description <p>A UserActivity object requires the <code>activityType</code> property to be specified at creation time.
Additional properties can be set either at creation or set individually after creation.</p>
<p>Handoff will not work in the simulator. You must build and run on a compatible device.</p>
<p>Handoff functionality depends on a few things:</p>
<ul>
<li>You must be logged into the same iCloud account on each device you wish to use Handoff.</li>
<li>Handoff broadcasts activities via Bluetooth LE signals, so both the broadcasting and receiving devices must have Bluetooth LE 4.0 support.</li>
<li>Connect all devices to the same Wi-Fi network.</li>
</ul>
<p>Make sure you have two Handoff compatible devices running iOS 8 or later that are logged onto the same iCloud account.</p>
* <h3>Examples</h3>
<h4>Creating a new UserActivity Example</h4>
<p>The following example demonstrates how to create a new UserActivity and mark the activity as
the current activity Handoff should be using when switching between devices.</p>
<p>It is important to note that all activityTypes must be defined in your <code>tiapp.xml</code> before this
feature can be supported. It is important to check the supported property on your UserActivity
to ensure the activity created is supported on your device.</p>
<h4>app.js</h4>
<pre><code>var activity = Ti.App.iOS.createUserActivity({
activityType: 'com.setdirection.home',
title: 'activity 1',
userInfo: {
msg: 'hello world'
}
});
if(!activity.isSupported()){
alert('User Activities are not supported on this device!');
} else {
activity.becomeCurrent();
Ti.App.iOS.addEventListener('continueactivity', function(e) {
if (e.activityType === 'com.setdirection.home' && e.userInfo.msg) {
alert(e.userInfo.msg);
}
});
}
</code></pre>
<h4>tiapp.xml</h4>
<pre><code><ti:app>
<ios>
<plist>
<dict>
<key>NSUserActivityTypes</key>
<array>
<string>com.setdirection.home</string>
</array>
</dict>
</plist>
</ios>
</ti:app>
</code></pre>
*/
/**
* @event useractivitywillsave
* <p>Fired if the activity context needs to be saved before being continued on another device.</p>
<p>To fire the event, set the UserActiviy object's <code>needsSave</code> property to <code>true</code>.</p>
<p>The receiver should update the activity with current activity state.</p>
<p>After the event is fired, iOS will reset the <code>needsSave</code> property to false.</p>
* @deprecated 5.2.0 Set the property `needsSave` to true everytime you update current activity state instead.
* @param {String} (iphone ipad) activityType
<p>The activityType of the User Activity triggering the event.</p>
* @param {String} (iphone ipad) title
<p>The title of the User Activity if defined.</p>
* @param {String} (iphone ipad) webpageURL
<p>The webpageURL of the User Activity if defined.</p>
* @param {Dictionary} (iphone ipad) userInfo
<p>Dictionary object containing the userInfo data of the User Activity.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event useractivitywascontinued
* <p>Fired when the user activity was continued on another device.</p>
* @param {String} (iphone ipad) activityType
<p>The activityType of the User Activity triggering the event.</p>
* @param {String} (iphone ipad) title
<p>The title of the User Activity if defined.</p>
* @param {String} (iphone ipad) webpageURL
<p>The webpageURL of the User Activity if defined.</p>
* @param {Dictionary} (iphone ipad) userInfo
<p>Dictionary object containing the userInfo data of the User Activity.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method addContentAttributeSet
* <p>Adds a Titanium.App.iOS.SearchableItemAttributeSet to the user activity.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @param {Titanium.App.iOS.SearchableItemAttributeSet} contentAttributeSet
<p>SearchableItemAttributeSet object that contains the set of properties you want to display for a searchable activity.</p>
*/
/**
* @method becomeCurrent
* <p>Marks the activity as currently in use by the user.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>For example, you should mark the activity associated with the active window as current.
A newly created activity is eligible for continuation on another device after the first time it becomes current.</p>
*/
/**
* @method invalidate
* <p>Invalidates an activity when it is no longer eligible for continuation.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>For example, when the window associated with an activity is closed, you should invalidate the activity.
An invalid activity cannot become current.</p>
*/
/**
* @method resignCurrent
* <p>Marks the activity as currently <strong>not</strong> in use and ineligible to be continued.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @method isSupported
* <p>Determines if user activities are supported (<code>true</code>) or not (<code>false</code>) by the device.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @returns {Boolean}Returns `true` if the device supports user activity.
*/
/**
* @method getActivityType
* <p>Gets the value of the {@link Titanium.App.iOS.UserActivity#property-activityType} property.</p>
* @returns {String}
*/
/**
* @method setActivityType
* <p>Sets the value of the {@link Titanium.App.iOS.UserActivity#property-activityType} property.</p>
* @param {String} activityType
<p>New value for the property.</p>
*/
/**
* @method getEligibleForPublicIndexing
* <p>Gets the value of the {@link Titanium.App.iOS.UserActivity#property-eligibleForPublicIndexing} property.</p>
* @returns {Boolean}
*/
/**
* @method setEligibleForPublicIndexing
* <p>Sets the value of the {@link Titanium.App.iOS.UserActivity#property-eligibleForPublicIndexing} property.</p>
* @param {Boolean} eligibleForPublicIndexing
<p>New value for the property.</p>
*/
/**
* @method getEligibleForSearch
* <p>Gets the value of the {@link Titanium.App.iOS.UserActivity#property-eligibleForSearch} property.</p>
* @returns {Boolean}
*/
/**
* @method setEligibleForSearch
* <p>Sets the value of the {@link Titanium.App.iOS.UserActivity#property-eligibleForSearch} property.</p>
* @param {Boolean} eligibleForSearch
<p>New value for the property.</p>
*/
/**
* @method getEligibleForHandoff
* <p>Gets the value of the {@link Titanium.App.iOS.UserActivity#property-eligibleForHandoff} property.</p>
* @returns {Boolean}
*/
/**
* @method setEligibleForHandoff
* <p>Sets the value of the {@link Titanium.App.iOS.UserActivity#property-eligibleForHandoff} property.</p>
* @param {Boolean} eligibleForHandoff
<p>New value for the property.</p>
*/
/**
* @method getExpirationDate
* <p>Gets the value of the {@link Titanium.App.iOS.UserActivity#property-expirationDate} property.</p>
* @returns {String}
*/
/**
* @method setExpirationDate
* <p>Sets the value of the {@link Titanium.App.iOS.UserActivity#property-expirationDate} property.</p>
* @param {String} expirationDate
<p>New value for the property.</p>
*/
/**
* @method getKeywords
* <p>Gets the value of the {@link Titanium.App.iOS.UserActivity#property-keywords} property.</p>
* @returns {String[]}
*/
/**
* @method setKeywords
* <p>Sets the value of the {@link Titanium.App.iOS.UserActivity#property-keywords} property.</p>
* @param {Array<String>} keywords
<p>New value for the property.</p>
*/
/**
* @method getNeedsSave
* <p>Gets the value of the {@link Titanium.App.iOS.UserActivity#property-needsSave} property.</p>
* @returns {Boolean}
*/
/**
* @method setNeedsSave
* <p>Sets the value of the {@link Titanium.App.iOS.UserActivity#property-needsSave} property.</p>
* @param {Boolean} needsSave
<p>New value for the property.</p>
*/
/**
* @method getRequiredUserInfoKeys
* <p>Gets the value of the {@link Titanium.App.iOS.UserActivity#property-requiredUserInfoKeys} property.</p>
* @returns {String[]}
*/
/**
* @method setRequiredUserInfoKeys
* <p>Sets the value of the {@link Titanium.App.iOS.UserActivity#property-requiredUserInfoKeys} property.</p>
* @param {Array<String>} requiredUserInfoKeys
<p>New value for the property.</p>
*/
/**
* @method getSupported
* <p>Gets the value of the {@link Titanium.App.iOS.UserActivity#property-supported} property.</p>
* @deprecated 5.1.0 Use <Titanium.App.iOS.UserActivity.isSupported> instead.
* @returns {Boolean}
*/
/**
* @method setSupported
* <p>Sets the value of the {@link Titanium.App.iOS.UserActivity#property-supported} property.</p>
* @deprecated 5.1.0 Use <Titanium.App.iOS.UserActivity.isSupported> instead.
* @param {Boolean} supported
<p>New value for the property.</p>
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.App.iOS.UserActivity#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.App.iOS.UserActivity#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getUserInfo
* <p>Gets the value of the {@link Titanium.App.iOS.UserActivity#property-userInfo} property.</p>
* @returns {Dictionary}
*/
/**
* @method setUserInfo
* <p>Sets the value of the {@link Titanium.App.iOS.UserActivity#property-userInfo} property.</p>
* @param {Dictionary} userInfo
<p>New value for the property.</p>
*/
/**
* @method getWebpageURL
* <p>Gets the value of the {@link Titanium.App.iOS.UserActivity#property-webpageURL} property.</p>
* @returns {String}
*/
/**
* @method setWebpageURL
* <p>Sets the value of the {@link Titanium.App.iOS.UserActivity#property-webpageURL} property.</p>
* @param {String} webpageURL
<p>New value for the property.</p>
*/
/**
* @property activityType
* @type String
* <p>Name of the activity type.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Apple recommends using a reverse DNS scheme to name activities in the format: com.<company>.<application>.<activity_type>.</p>
<p>The activity type must also be registered in the <code>ios plist</code> section of the <code>tiapp.xml</code> file. Add the <code>NSUserActivityTypes</code>
key and set its value to an array of activity type strings.</p>
<h4>tiapp.xml</h4>
<pre><code><ti:app>
<ios>
<plist>
<dict>
<key>NSUserActivityTypes</key>
<array>
<string>com.fooinc.musicalpedia.playtrack</string>
</array>
</dict>
</plist>
</ios>
</ti:app>
</code></pre>
*/
/**
* @property [eligibleForPublicIndexing=false]
* @type Boolean
* @creationOnly
* <p>Set to <code>true</code> if the user activity can be publicly accessed by all iOS users.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Set to <code>true</code> if this user activity should be eligible for indexing for any user of the application,
on any device, or <code>false</code> if the activity contains private or sensitive information or which would not be useful to other
users if indexed. You must also set either the <code>requiredUserActivityKeys</code> or <code>webpageURL</code> property.</p>
*/
/**
* @property [eligibleForSearch=false]
* @type Boolean
* @creationOnly
* <p>Set to true if the user activity should be added to the on-device index.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property [eligibleForHandoff=true]
* @type Boolean
* @creationOnly
* <p>Set to true if this user activity should be eligible to be handed off to another device</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property [expirationDate=Determined by iOS]
* @type String
* <p>Absolute date after which the activity is no longer eligible to be indexed or handed off.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The date will be a string in the following format: "yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'"
For example, <code>2015-12-25T23:30:55.978+0000</code></p>
*/
/**
* @property keywords
* @type String[]
* <p>An array of string keywords representing words or phrases that might help the user to find the activity in the application history.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property needsSave
* @type Boolean
* <p>Set to true everytime you have updated the user activity and need the changes to be saved before handing it off to another device.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
*/
/**
* @property requiredUserInfoKeys
* @type String[]
* <p>An array of String keys from the userInfo property which represent the minimal information about the user activity that should be stored for later restoration.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property supported
* @type Boolean
* <p>Determines if user activities are supported (<code>true</code>) or not (<code>false</code>) by the device.</p>
* @deprecated 5.1.0 Use <Titanium.App.iOS.UserActivity.isSupported> instead.
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
*/
/**
* @property title
* @type String
* <p>An optional, user-visible title for this activity such as a document name or web page title.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
*/
/**
* @property userInfo
* @type Dictionary
* <p>The userInfo dictionary contains application-specific state needed to continue an activity on another device.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
*/
/**
* @property webpageURL
* @type String
* <p>When no suitable application is installed on a resuming device and the <code>webpageURL</code> property is set,
the user activity will instead be continued in a web browser by loading the specified URL.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Only supports the <code>http://</code> and <code>https://</code> protocols. Any other protocol will throw an error.</p>
*/
/**
* @class Titanium.App.iOS.UserDefaults
* @platform iphone 4.0.0
* @platform ipad 4.0.0
* @extends Titanium.App.Properties
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserDefaults.yml
* <p>The UserDefaults module is used for storing application-related data in property/value pairs
that persist beyond application sessions and device power cycles. UserDefaults allows the suiteName
of the UserDefaults to be specified at creation time.</p>
* @description <p>Unlike Titanium.App.Properties, Titanium.App.iOS.UserDefaults does not pull properties defined in the <code>tiapp.xml</code> file.</p>
<p>To create a notification action, use the {@link Titanium.App.iOS#method-createUserDefaults} method.</p>
* <h3>Examples</h3>
<h4>Create a UserDefaults object</h4>
<p>Creating a UserDefaults object</p>
<pre><code>var props = Ti.App.iOS.createUserDefaults({
suiteName: 'group.mySuite'
});
</code></pre>
*/
/**
* @method getSuiteName
* <p>Gets the value of the {@link Titanium.App.iOS.UserDefaults#property-suiteName} property.</p>
* @returns {String}
*/
/**
* @method setSuiteName
* <p>Sets the value of the {@link Titanium.App.iOS.UserDefaults#property-suiteName} property.</p>
* @param {String} suiteName
<p>New value for the property.</p>
*/
/**
* @property suiteName
* @type String
* @creationOnly
* <p>Sets the name of the suite to be used to access UserDefaults.</p>
*/
/**
* @class Titanium.App.iOS.UserNotificationAction
* @platform iphone 3.4.0
* @platform ipad 3.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserNotificationAction.yml
* <p>An action the user selects in response to an interactive notification.</p>
* @description <p>To create a notification action, use the {@link Titanium.App.iOS#method-createUserNotificationAction} method.</p>
<p>An notification action represents an option a user selects in response to an interactive
notification. The notification action is represented as a button in the application UI.</p>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Titanium.App.iOS.UserNotificationAction#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Titanium.App.iOS.UserNotificationAction#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
/**
* @method getActivationMode
* <p>Gets the value of the {@link Titanium.App.iOS.UserNotificationAction#property-activationMode} property.</p>
* @returns {Number}
*/
/**
* @method setActivationMode
* <p>Sets the value of the {@link Titanium.App.iOS.UserNotificationAction#property-activationMode} property.</p>
* @param {Number} activationMode
<p>New value for the property.</p>
*/
/**
* @method getBehavior
* <p>Gets the value of the {@link Titanium.App.iOS.UserNotificationAction#property-behavior} property.</p>
* @returns {Number}
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method setBehavior
* <p>Sets the value of the {@link Titanium.App.iOS.UserNotificationAction#property-behavior} property.</p>
* @param {Number} behavior
<p>New value for the property.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
/**
* @property activationMode
* @type Number
* @creationOnly
* <p>Selects how to activate the application.</p>
* @description <p>Set to <code>Titanium.App.iOS.USER_NOTIFICATION_ACTIVATION_MODE_BACKGROUND</code> to activate the application in the
background to respond to the action unless the application is already in the foreground.</p>
<p>Set to <code>Titanium.App.iOS.USER_NOTIFICATION_ACTIVATION_MODE_FOREGROUND</code> to launch the application in the
foreground to respond to the action. These actions won't be displayed on Apple Watch.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.App.iOS#property-USER_NOTIFICATION_ACTIVATION_MODE_BACKGROUND}
<li> {@link Titanium.App.iOS#property-USER_NOTIFICATION_ACTIVATION_MODE_FOREGROUND}
</ul></p>
*/
/**
* @property [behavior={@link Titanium.App.iOS#property-USER_NOTIFICATION_BEHAVIOR_DEFAULT}]
* @type Number
* @creationOnly
* <p>Custom behavior the user notification supports.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.App.iOS#property-USER_NOTIFICATION_BEHAVIOR_DEFAULT}
<li> {@link Titanium.App.iOS#property-USER_NOTIFICATION_BEHAVIOR_TEXTINPUT}
</ul></p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property authenticationRequired
* @type Boolean
* @creationOnly
* <p>Set to true if the action requires the device to be unlocked. On the Apple Watch actions never require authentication.</p>
*/
/**
* @property destructive
* @type Boolean
* @creationOnly
* <p>Set to true if the action causes destructive behavior to the user's data or the application.</p>
* @description <p>The action appears red in the locked screen and notification center instead of the
default color.</p>
*/
/**
* @property identifier
* @type String
* @creationOnly
* <p>Identifier for this action. Used to identify the action the user pressed.</p>
*/
/**
* @property title
* @type String
* @creationOnly
* <p>Title of the button displayed in the notification.</p>
*/
/**
* @class Titanium.App.iOS.UserNotificationCategory
* @platform iphone 3.4.0
* @platform ipad 3.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserNotificationCategory.yml
* <p>A set of notification actions to associate with a notification.</p>
* @description <p>To create a notification category, use the {@link Titanium.App.iOS#method-createUserNotificationCategory} method.</p>
<p>A notification category represents a collection of {@link Titanium.App.iOS.UserNotificationAction}
to associate with a specific notification. The notification category allows the application to
customize the notification options based on which notification style is used. For alert dialogs,
only four notification actions can be displayed, while all other notifications can only display two
actions.</p>
<p>To use a local interactive notification, you need to register the notification category using
the {@link Titanium.App.iOS#method-registerUserNotificationSettings} method and send a notification using the
{@link Titanium.App.iOS#method-scheduleLocalNotification} and pass the category identifier to the <code>category</code>
property.</p>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Titanium.App.iOS.UserNotificationCategory#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Titanium.App.iOS.UserNotificationCategory#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
/**
* @property actionsForDefaultContext
* @type Titanium.App.iOS.UserNotificationAction[]
* @creationOnly
* <p>Array of notification actions to associate with the group.</p>
* @description <p>Note that only the first four actions can be displayed for an alert dialog and on the Apple Watch.
The first two actions can be displayed for all other notifications.</p>
*/
/**
* @property actionsForMinimalContext
* @type Titanium.App.iOS.UserNotificationAction[]
* @creationOnly
* <p>Array of notification actions to display for non-dialog-style notification.</p>
* @description <p>If not specified, the first two actions from <code>actionsForDefaultContent</code> are displayed.</p>
*/
/**
* @property identifier
* @type String
* @creationOnly
* <p>Identifier for this category.</p>
* @description <p>When scheduling a notification, pass this value to the <code>category</code> property.</p>
*/
/**
* @class Titanium.App.iOS
* @platform iphone 1.5
* @platform ipad 1.5
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/iOS.yml
* <p>The top-level App iOS module, available only to iOS devices, that includes the facilities to
create and manage local notifications and background services.</p>
* @description <h3>Local Notifications</h3>
<p>Local notifications are a way for an application that is not running in the foreground to let
users know that it has information for them. When invoked, the application either displays a
banner message or an alert dialog with a <strong>Close</strong> button to dismiss and an <strong>Open</strong> button to bring the application
into the foreground. The application can also modify the icon badge, to show the
number of pending notifications, and generate a sound.</p>
<p>To send a local notification, the application needs to:</p>
<ol>
<li>Enroll the application to send local notifications with the
{@link Titanium.App.iOS#method-registerUserNotificationSettings} method only if the device is running iOS 8
or later.</li>
<li>Schedule a local notification with the {@link Titanium.App.iOS#method-scheduleLocalNotification} method.</li>
<li>Monitor the {@link Titanium.App.iOS#event-notification notification} event to respond to the
notification.</li>
</ol>
<p>For instructions on sending local interactive notifications, see the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Local_Notifications">iOS Local Notifications guide</a>.</p>
<h3>Local Interactive Notifications</h3>
<p>Starting with Release 3.4.0, you can create interactive notifications, where users can respond to
application notifications without launching the application to the foreground. The user needs to
reveal notification actions in the notification, then press a notification action to respond to the
notification. This feature is available on devices running iOS 8 or later.</p>
<p>To create an interactive notification, the application needs to:</p>
<ol>
<li>Create and configure notification actions with the
{@link Titanium.App.iOS#method-createUserNotificationAction} method.</li>
<li>Create notification categories and assign notification actions to them
with the {@link Titanium.App.iOS#method-createUserNotificationCategory} method.</li>
<li>Register the notification categories with the
{@link Titanium.App.iOS#method-registerUserNotificationSettings} method.</li>
<li>Monitor the {@link Titanium.App.iOS#event-localnotificationaction localnotificationaction} event.</li>
</ol>
<p>For instructions on sending local interactive notifications, see the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Local_Notifications">iOS Local Notifications guide</a>.</p>
<h3>Background Downloads</h3>
<p>In iOS 7, Apple introduced new background execution modes which allow the application to download
content in the background. These background modes are supported in Titanium SDK 3.2.0 and later.</p>
<p>For more information on getting started, refer to the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Background_Services">iOS Background Services guide</a>.</p>
<h3>Handoff User Activities</h3>
<p>In iOS 8, Apple introduced Handoff, which allows you to create and transfer user activies from one device to another.
For example, you can start editing a document on your phone, then transfer the activity to your iPad to continue
editing the document.</p>
<p>To make an activity shareable, use the {@link Titanium.App.iOS.UserActivity} API to create the activity.
To continue the activity on another device, listen for the
{@link Titanium.App.iOS#event-continueactivity continueactivity} event.</p>
<h3>Index Application Content</h3>
<p>In iOS 9, Apple lets you index application content, such as music, videos, images and documents, to allow it
to be searched in iOS Spotlight. To effectively add and remove information from the iOS search index
you will need to use the following APIs:</p>
<ul>
<li>{@link Titanium.App.iOS.SearchableItemAttributeSet} - Used to create metadata related to the <code>Ti.App.iOS.SearchableItem</code></li>
<li>{@link Titanium.App.iOS.SearchableItem} - Used to assemble metadata into a unique object package to be used by <code>Ti.App.iOS.SearchableIndex</code></li>
<li>{@link Titanium.App.iOS.SearchableIndex} - Used to add and remove <code>Ti.App.iOS.SearchableItem</code> objects to the device search index</li>
</ul>
*/
/**
* @event notification
* <p>Fired when a local notification is received by the application.</p>
* @param {String} alertAction
<p>Alert button text ('View', by default) or slider text ('slide to unlock...', by default).</p>
* @param {String} alertBody
<p>Alert message.</p>
* @param {String} alertLaunchImage
<p>Image displayed instead of <code>Default.png</code> when launching the application.</p>
* @param {Number} badge
<p>Application badge value.</p>
* @param {Date} date
<p>Date and time when the notification was configured to fire.</p>
* @param {String} sound
<p>Path to the sound file configured to play when the notification was fired.</p>
* @param {String} timezone
<p>Timezone of the date when the notification was configured to fire.</p>
* @param {Dictionary} userInfo
<p>Custom data object.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event localnotificationaction
* <p>Fired when a user selects an action for an interactive local notification.</p>
* @param {String} alertAction
<p>Alert button text ('Open', by default) or slider text ('slide to unlock...', by default).</p>
* @param {String} alertBody
<p>Alert message.</p>
* @param {String} alertLaunchImage
<p>Image displayed instead of <code>Default.png</code> when launching the application.</p>
* @param {Number} badge
<p>Application badge value.</p>
* @param {String} category
<p>Identifier of the category of the interactive notification.</p>
* @param {Date} date
<p>Date and time when the notification was configured to fire.</p>
* @param {String} identifier
<p>Identifier of the action that was selected of the interactive notification.</p>
* @param {String} sound
<p>Path to the sound file configured to play when the notification was fired.</p>
* @param {String} timezone
<p>Timezone of the date when the notification was configured to fire.</p>
* @param {String} typedText
<p>User input if the notification used the <code>USER_NOTIFICATION_BEHAVIOR_TEXTINPUT</code> behavior.</p>
* @param {Dictionary} userInfo
<p>Custom data object.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event remotenotificationaction
* <p>Fired when a user selects an action for an interactive remote notification.</p>
* @param {Dictionary} data
<p>The payload passed to the Apple Push Notification Service.</p>
* @param {String} category
<p>Identifier of the category of the interactive notification.</p>
* @param {String} identifier
<p>Identifier of the action that was selected of the interactive notification.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event backgroundfetch
* <p>Fired when the application is woken up for a fetch operation. Available only on iOS 7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Add this event if your app supports the <code>fetch</code> UIBackground mode. When an opportunity arises to
download data, the system fires this event to give your app a chance to download any data it needs.
Your callback of this event should download the data, prepare that data for use, and call the
{@link Titanium.App.iOS#method-endBackgroundHandler endBackgroundHandler} method with the <code>handlerID</code> parameter from this event.</p>
<p>When this event is fired, your app has up to 30 seconds of wall-clock time to perform the download
operation and call the <code>endBackgroundHandler</code> method. In practice,
your app should call the <code>endBackgroundHandler</code> method as soon as possible
after initiating the download. If you do not call the <code>endBackgroundHandler</code> method in time, your app is suspended.
More importantly, the system uses the elapsed time to calculate power usage and data costs for your
app's background downloads. If your app takes a long time to call <code>endBackgroundHandler</code> method, it may be given fewer
future opportunities to fetch data in the future.</p>
<p>If you are downloading large content, initiate the download using a
{@link Modules.URLSession urlSession} background download task, then call the <code>endBackgroundHandler</code> method.
Listen for the {@link Titanium.App.iOS#event-downloadcompleted downloadcompleted} event to prepare the data for use.</p>
<p>The event returns the dictionary containing the <code>handlerID</code> property, which is a unique handler ID for the
current event. This identifier should be passed as the argument to the
{@link Titanium.App.iOS#method-endBackgroundHandler endBackgroundHandler} method.</p>
* @param {String} handlerId
<p>Unique string identifier for the <code>backgroundfetch</code> event. This identifier should be passed as the argument
to the {@link Titanium.App.iOS#method-endBackgroundHandler endBackgroundHandler} method.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @event silentpush
* <p>Fired when the application is woken up by a silent remote notification. Available only on iOS 7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Add this event if your app supports the <code>remote-notification</code> UIBackground mode.
This event is intended as a means for apps to minimize the time that elapses between
the user seeing a push notification and the app displaying the associated data.
When a push notification arrives, the system displays the notification to the user and
launches the app in the background (if needed) so that it can call this event.
Use this event to download any data related to the push notification. When your method
is done, call the {@link Titanium.App.iOS#method-endBackgroundHandler endBackgroundHandler} method with
<code>handlerID</code> parameter from this event.</p>
<p>The system fires this event regardless of the state of your app. If your app is suspended
or not running, the system wakes up or launches your app and puts it into the background
running state before firing the event.</p>
<p>When this event is fired, your app has up to 30 seconds of wall-clock time to perform the download
operation and call the <code>endBackgroundHandler</code> method. In practice,
your app should call the <code>endBackgroundHandler</code> method as soon as possible
after initiating the download. If you do not call the <code>endBackgroundHandler</code> method in time, your app is suspended.
More importantly, the system uses the elapsed time to calculate power usage and data costs for your
app's background downloads. If your app takes a long time to call <code>endBackgroundHandler</code> method, it may be given fewer
future opportunities to fetch data in the future.</p>
<p>If you are downloading large content, initiate the download using a
{@link Modules.URLSession urlSession} background download task, then call the <code>endBackgroundHandler</code> method.
Listen for the {@link Titanium.App.iOS#event-downloadcompleted downloadcompleted} event to prepare the data for use.</p>
<p>The event returns the dictionary containing the <code>handlerID</code> property, which is a unique handler ID for the
current event. This identifier should be passed as the argument to the
{@link Titanium.App.iOS#method-endBackgroundHandler endBackgroundHandler} method.</p>
<p>You can send extra information with a silent push using extra:</p>
<pre><code>{
aps: {
'content-available': 1
},
extra: {
foo: 'bar'
}
}
</code></pre>
<p>In the event handler for <code>silentpush</code>, your code may look something like this:</p>
<pre><code>{
"handlerId": "SilentPush-1415976886.375816",
"aps": {
"content-available": 1,
},
"extra": {
"foo": "bar"
},
"bubbles": true,
"type": "silentpush",
"source": {},
"cancelBubble": false
}
</code></pre>
* @param {String} handlerId
<p>Unique string identifier for the <code>silentpush</code> event. This identifier should be passed as the argument
to the {@link Titanium.App.iOS#method-endBackgroundHandler endBackgroundHandler} method.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @event backgroundtransfer
* <p>Fired when the events related to a {@link Modules.URLSession urlSession} are waiting to be processed.
Available only on iOS 7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>The app fires this events when all background transfers associated with a <code>urlSession</code> object
have finished or failed. Use this method to reconnect any <code>urlSession</code>s and to update your
app's user interface. For example, you might use this method to update progress indicators
or to incorporate new content into your views. After processing the events, call the
{@link Titanium.App.iOS#method-endBackgroundHandler endBackgroundHandler} method with the <code>handlerID</code>
parameter. If a <code>urlSession</code> finishes its work when your app is not running, the system
launches your app in the background so that it can process the event. In that situation,
use the provided identifier to create a new <code>urlSessionConfiguration</code> and <code>urlSession</code> objects.
Upon creating urlSession object, that object calls the appropriate delegate methods to
process the events.</p>
<p>If your app already has a session object with the specified identifier and is running or suspended,
you do not need to create a new session object using this method. Suspended apps are moved into the
background. As soon as the app is running again, the <code>urlSession</code> object with the identifier receives
the events and processes them normally.</p>
<p>At launch time, the app does not call this method if there are uploads or downloads in progress.
If you want to display the current progress of those transfers in your app's user
interface, you must recreate the session object yourself. In that situation, cache the session
identifier value persistently and use it to recreate your session object.</p>
* @param {String} handlerId
<p>Unique string identifier for the <code>backgroundtransfer</code> event. This identifier should be passed as the argument
to the {@link Titanium.App.iOS#method-endBackgroundHandler endBackgroundHandler} method.</p>
* @param {String} sessionId
<p>The identifier of the URL session requiring attention. If your app was just launched,
you can use this identifier to create a new <code>urlSession</code> object that can receive the events.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @event downloadprogress
* <p>Fired periodically to inform the app about the download's progress of a {@link Modules.URLSession urlSession}.
Available only on iOS 7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This event only needs to be used if your app is using the <code>urlSession</code> module to download data.</p>
* @param {Number} taskIdentifier
<p>The <code>urlSession</code> download task's identifier.</p>
* @param {String} sessionIdentifier
<p>The <code>urlSession</code> session identifier. If it does not exist, this property is not provided.
This property is available since Titanium Mobile 5.4.0.GA.</p>
* @param {Number} bytesWritten
<p>The number of bytes transferred since the last time this event was fired.</p>
* @param {Number} totalBytesWritten
<p>The total number of bytes transferred so far.</p>
* @param {Number} totalBytesExpectedToWrite
<p>The expected length of the file, as provided by the Content-Length header. If this
header was not provided, the value is zero.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @event uploadprogress
* <p>Fired periodically to inform the app about the upload's progress of a {@link Modules.URLSession urlSession}.
Available only on iOS 7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This event only needs to be used if your app is using the <code>urlSession</code> module to upload data.</p>
* @param {Number} taskIdentifier
<p>The <code>urlSession</code> upload task's identifier.</p>
* @param {String} sessionIdentifier
<p>The <code>urlSession</code> session identifier. If it does not exist, this property is not provided.
This property is available since Titanium Mobile 5.4.0.GA.</p>
* @param {Number} bytesSent
<p>The number of bytes transferred since the last time this event was fired.</p>
* @param {Number} totalBytesSent
<p>The total number of bytes transferred so far.</p>
* @param {Number} totalBytesExpectedToSend
<p>The expected length of the file, as provided by the Content-Length header. If this
header was not provided, the value is zero.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @event downloadcompleted
* <p>Fired to indicate that a {@link Modules.URLSession urlSession's} download task has finished downloading.
Available only on iOS 7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This event only needs to be used if your app is using the <code>urlSession</code> module to download data.</p>
* @param {Number} taskIdentifier
<p>The <code>urlSession</code> download task's identifier.</p>
* @param {String} sessionIdentifier
<p>The <code>urlSession</code> session identifier. If it does not exist, this property is not provided.
This property is available since Titanium Mobile 5.4.0.GA.</p>
* @param {Titanium.Blob} data
<p>The downloaded data as a Titanium.Blob object.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @event sessioncompleted
* <p>Fired to indicate that a {@link Modules.URLSession urlSession} task finished transferring data.
Available only on iOS 7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This event only needs to be used if your app is using the <code>urlSession</code> module to download data.</p>
<p>Server errors are not reported through the error parameter. The only error events sent
through the error parameter are client-side errors, such as being unable to resolve
the hostname or connect to the host.</p>
* @param {Number} taskIdentifier
<p>The <code>urlSession</code> download task's identifier.</p>
* @param {String} sessionIdentifier
<p>The <code>urlSession</code> session identifier. If it does not exist, this property is not provided.
This property is available since Titanium Mobile 5.4.0.GA.</p>
* @param {Boolean} success
<p>Indicates if the operation succeeded. Returns true if download succeeded, false otherwise.</p>
* @param {Number} errorCode
<p>The error code of the error, if any (potentially system-dependent).</p>
* @param {String} message
<p>A string containing the localized description of the error.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @event sessioneventscompleted
* <p>Fired to indicate that all messages enqueued for a {@link Modules.URLSession urlSession} have been delivered.
Available only on iOS 7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This event only needs to be used if your app is using the <code>urlSession</code> module to download data.</p>
<p>In iOS, when a background transfer completes and if your app is no longer running, your app
is automatically relaunched in the background, and the app fires the {@link Titanium.App.iOS#event-backgroundtransfer backgroundtransfer} event.
This event should contain the identifier of the session that caused your app to be launched.
Your app should then store that <code>handlerID</code> before creating a background session configuration object
with the same identifier, and creating a url session object with that configuration.
The newly created session is automatically reassociated with ongoing background activity.</p>
<p>When your app later receives a <code>sessioneventscompleted</code> event, this indicates that
all messages previously enqueued for this session have been delivered, and that it
is now safe to invoke {@link Titanium.App.iOS#method-endBackgroundHandler endBackgroundHandler}
method with the <code>handlerID</code> or to begin any internal updates that may result in invoking
this method.</p>
* @param {String} sessionIdentifier
<p>The <code>urlSession</code> session identifier. If it does not exist, this property is not provided.
This property is available since Titanium Mobile 5.4.0.GA.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @event usernotificationsettings
* <p>Fired when the user notification settings are registered (available for iOS 8 and later).</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @param {Array<Number>} types
<p>Notification types the application is registered to use.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.App.iOS#property-USER_NOTIFICATION_TYPE_NONE}
<li> {@link Titanium.App.iOS#property-USER_NOTIFICATION_TYPE_BADGE}
<li> {@link Titanium.App.iOS#property-USER_NOTIFICATION_TYPE_SOUND}
<li> {@link Titanium.App.iOS#property-USER_NOTIFICATION_TYPE_ALERT}
</ul></p>
* @param {Array<Titanium.App.iOS.UserNotificationCategory>} categories
<p>Set of categories of user notification actions the application is registered to use.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @event watchkitextensionrequest
* <p>Fired when openParentApplication:reply is called from a WatchKit extension. Available only on iOS 8.2 and later.</p>
* @deprecated 5.0.0 Use <Titanium.WatchSession> instead, which is supported on iOS9 and later.
* <p> <b>Requires:</b>
iOS 8.2 and later
</p>
* @description <p>Add this event if your Titanium application if you are using a WatchKit extension. When your WatchKit extension uses the openParentApplication:reply
method your Titanium application will be opened in the background and provides your Titanium app the information from the extension. When this
event is fired you must provide a reply by calling the {@link Titanium.App.iOS#method-sendWatchExtensionReply sendWatchExtensionReply} method with
the <code>handlerID</code> parameter from this event.</p>
<p>The event returns the dictionary containing the <code>handlerID</code> property, which is a unique handler ID for the
current event and the <code>userInfo</code> property, containing the dictionary passed from the WatchKit extension. The <code>handlerID</code> identifier
must be passed as the an argument to the {@link Titanium.App.iOS#method-sendWatchExtensionReply sendWatchExtensionReply} method.</p>
<pre><code>Ti.App.iOS.addEventListener("watchkitextensionrequest",function(e){
var replyContent = {foo:"bar"};
Ti.App.iOS.sendWatchExtensionReply(e.handlerId,replyContent);
});
</code></pre>
* @param {String} handlerId
<p>Unique string identifier for the <code>watchkitextensionrequest</code> event. This identifier should be passed an argument
to the {@link Titanium.App.iOS#method-sendWatchExtensionReply sendWatchExtensionReply} method.</p>
* @param {Dictionary} userInfo
<p>The payload passed to the <code>openParentApplication:reply</code> method from the WatchKit extension.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @event continueactivity
* <p>Fired when iOS continueactivity calls <code>continueUserActivity</code>.</p>
* <p> <b>Requires:</b>
iOS 8.2 and later
</p>
* @description <p>Add this event if your Titanium application if you are responding to an iOS Handoff or Core Spotlight <code>continueUserActivity</code> request. This event will
fire when a user taps on the handoff icon or the Core Spotlight search item. Your Titanium application will be opened in the background and provides
your Titanium app the information from the NSUserActivity. When this event is fired you should implement logic within your application to allow the
user to pick-up from where they left off on their other device.</p>
<pre><code>Ti.App.iOS.addEventListener("continueactivity", function(e) {
console.log('activityType: '' + e.activityType);
});
</code></pre>
* @param {String} activityType
<p>Unique string identifier for the handoff user activity. The identifier must be defined in your <code>tiapp.xml</code> file.</p>
* @param {String} searchableItemActivityIdentifier
<p>With field will contain the searchable Unique Identifier if the continueactivity is fired from a Core Spotlight searh result.</p>
* @param {String} title
<p>The optional title provided to the user activity or search item.</p>
* @param {String} webpageURL
<p>The optional webpageURL provided to the user activity.</p>
* @param {Dictionary} userInfo
<p>The optional userInfo provided to the user activity. The userInfo is a custom dictionary and can contain any information needed
to create your handoff or Core Spotlight session.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @event shortcutitemclick
* <p>Fired when a user taps the Application Shortcut.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @param {String} itemtype
<p>The unique identifier for the application shortcut.</p>
* @param {String} title
<p>The title of the application shortcut.</p>
* @param {String} subtitle
<p>The subtitle of the application shortcut.</p>
* @param {Dictionary} userInfo
<p>The payload passed by the application shortcut.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 5.1.0
*/
/**
* @event handleurl
* <p>Fired when a new URL is handled by the application.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Incoming URL's can either be triggered by an external application or
links inside your {@link Titanium.UI.WebView} / <Modules.SafariDialog>.</p>
* @param {LaunchOptionsType} launchOptions
<p>The launch options that are related to opening the URL.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method createUserDefaults
* <p>Creates and returns an instance of Titanium.App.iOS.UserDefaults.</p>
* @param {Dictionary<Titanium.App.iOS.UserDefaults>} parameters
<p>Properties to set on a new object, including any defined by Titanium.App.iOS.UserDefaults except those marked not-creation or read-only.</p>
* @returns {Titanium.App.iOS.UserDefaults}
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method cancelAllLocalNotifications
* <p>Cancels all scheduled local notifications.</p>
*/
/**
* @method cancelLocalNotification
* <p>Cancels a local notification.</p>
* @param {Number/String} id
<p>Application-created ID of the local notification to cancel.
To create an ID for the notification, set the <code>id</code> property in the <code>userInfo</code> dictionary
passed to the {@link Titanium.App.iOS#method-scheduleLocalNotification} method.</p>
*/
/**
* @method registerBackgroundService
* <p>Registers a service to run when the application is placed in the background.</p>
* @param {Dictionary} params
<p>Parameters used to create the service. Must include a <code>url</code> property, to specify the
local JavaScript file to execute when the application is placed in the background.</p>
* @returns {Titanium.App.iOS.BackgroundService}
*/
/**
* @method registerUserNotificationSettings
* <p>Registers the application to use the requested notification types and categories
(for devices running iOS 8 or later).</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Call this method at application start up. If the application needs to register for remote
notifications, call this method before calling
{@link Titanium.Network#method-registerForPushNotifications Titanium.Network.registerForPushNotifications}.</p>
* @param {UserNotificationSettings} params
<p>Parameters used to enroll the application in local notifications.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @method scheduleLocalNotification
* <p>Schedule a local notification.</p>
* @param {NotificationParams} params
<p>Parameters used to create a notification.</p>
* @returns {Titanium.App.iOS.LocalNotification}
*/
/**
* @method setMinimumBackgroundFetchInterval
* <p>Specifies the minimum amount of time that must elapse between background fetch operations.
Available only on iOS 7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property has no effect for apps that do not have the UIBackgroundModes key with
the fetch value in its Info.plist file. The default fetch interval for apps is
{@link Titanium.App.iOS#property-BACKGROUNDFETCHINTERVAL_NEVER}. Therefore, you must call this
method and set a fetch interval before your app is given background execution time.</p>
* @param {Number} fetchInterval
<p>The minimum number of seconds that must elapse before another background fetch can be initiated.
This value is advisory only and does not indicate the exact amount of time expected between
fetch operations.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.App.iOS#property-BACKGROUNDFETCHINTERVAL_MIN}
<li> {@link Titanium.App.iOS#property-BACKGROUNDFETCHINTERVAL_NEVER}
</ul></p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method endBackgroundHandler
* <p>Marks the end of the app execution after initiating the download operation. Available only on iOS 7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>When calling this method, pass in the <code>handlerID</code> value that initiated the background state.
You must call this handler after initiating the download operation and should do so as soon as possible.</p>
* @param {String} handlerID
<p>Unique string identifier for the event (<code>backgroundfetch</code>, <code>silentpush</code> or <code>backgroundtransfer</code>)
that initiated the background opertation mode.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method sendWatchExtensionReply
* <p>Marks the end of an <code>openParentApplication:reply</code> execution by a WatchKit extension.</p>
* @deprecated 5.0.0 Use <Titanium.WatchSession> instead, which is supported on iOS 9 and later.
* <p> <b>Requires:</b>
iOS 8.2 and later
</p>
* @description <p>This method must be called after your Titaium application has finished processing the <code>watchkitextensionrequest</code> event. Optional
information can be provided in the userInfo argument will be provided back to the WatchKit extension as part of the reply method.
If no userInfo is provide nil will be sent to the WatchKit extension to during the reply callback.</p>
<p>This method should be used as part of the <code>watchkitextensionrequest</code> event as shown below.</p>
<pre><code>Ti.App.iOS.addEventListener("watchkitextensionrequest", function(e) {
var replyContent = {foo: "bar"};
Ti.App.iOS.sendWatchExtensionReply(e.handlerId,replyContent);
});
</code></pre>
* @param {String} handlerId
<p>Unique string identifier for the event (<code>watchkitextensionrequest</code>)
that initiated from the WatchKit extension calling the openParentApplication:reply method.</p>
* @param {Dictionary} userInfo
<p>Custom data object which will be passed in the reply method to your WatchKit extension.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @method createSearchQuery
* <p>Creates and returns an instance of {@link Titanium.App.iOS.SearchQuery}.</p>
* @param {Dictionary<Titanium.App.iOS.SearchQuery>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.App.iOS.SearchQuery} except those marked not-creation or read-only.</p>
* @returns {Titanium.App.iOS.SearchQuery}
* @platform iphone 5.5.0
* @platform ipad 5.5.0
*/
/**
* @method createSearchableIndex
* <p>Creates and returns an instance of {@link Titanium.App.iOS.SearchableIndex}.</p>
* @param {Dictionary<Titanium.App.iOS.SearchableIndex>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.App.iOS.SearchableIndex} except those marked not-creation or read-only.</p>
* @returns {Titanium.App.iOS.SearchableIndex}
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @method createSearchableItem
* <p>Creates and returns an instance of {@link Titanium.App.iOS.SearchableItem}.</p>
* @param {Dictionary<Titanium.App.iOS.SearchableItem>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.App.iOS.SearchableItem} except those marked not-creation or read-only.</p>
* @returns {Titanium.App.iOS.SearchableItem}
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @method createSearchableItemAttributeSet
* <p>Creates and returns an instance of {@link Titanium.App.iOS.SearchableItemAttributeSet}.</p>
* @param {Dictionary<Titanium.App.iOS.SearchableItemAttributeSet>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.App.iOS.SearchableItemAttributeSet} except those marked not-creation or read-only.</p>
* @returns {Titanium.App.iOS.SearchableItemAttributeSet}
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @method createUserActivity
* <p>Creates and returns an instance of {@link Titanium.App.iOS.UserActivity}.</p>
* @param {Dictionary<Titanium.App.iOS.UserActivity>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.App.iOS.UserActivity} except those marked not-creation or read-only.</p>
* @returns {Titanium.App.iOS.UserActivity}
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @method createUserNotificationAction
* <p>Creates and returns an instance of {@link Titanium.App.iOS.UserNotificationAction}.</p>
* @param {Dictionary<Titanium.App.iOS.UserNotificationAction>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.App.iOS.UserNotificationAction} except those marked not-creation or read-only.</p>
* @returns {Titanium.App.iOS.UserNotificationAction}
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @method createUserNotificationCategory
* <p>Creates and returns an instance of {@link Titanium.App.iOS.UserNotificationCategory}.</p>
* @param {Dictionary<Titanium.App.iOS.UserNotificationCategory>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.App.iOS.UserNotificationCategory} except those marked not-creation or read-only.</p>
* @returns {Titanium.App.iOS.UserNotificationCategory}
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @method getCurrentUserNotificationSettings
* <p>Gets the value of the {@link Titanium.App.iOS#property-currentUserNotificationSettings} property.</p>
* @returns {UserNotificationSettings}
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @method getSupportedUserActivityTypes
* <p>Gets the value of the {@link Titanium.App.iOS#property-supportedUserActivityTypes} property.</p>
* @returns {String[]}
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @method getApplicationOpenSettingsURL
* <p>Gets the value of the {@link Titanium.App.iOS#property-applicationOpenSettingsURL} property.</p>
* @returns {String}
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property EVENT_ACCESSIBILITY_LAYOUT_CHANGED
* @type String
* @readonly
* <p>Convenience constant for system event "accessibilitylayoutchanged".</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property EVENT_ACCESSIBILITY_SCREEN_CHANGED
* @type String
* @readonly
* <p>Convenience constant for system event "accessibilityscreenchanged".</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property BACKGROUNDFETCHINTERVAL_MIN
* @type Number
* @readonly
* <p>Use with {@link Titanium.App.iOS#method-setMinimumBackgroundFetchInterval setMinimumBackgroundFetchInterval} method.
Specifies the smallest fetch interval supported by the system.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property BACKGROUNDFETCHINTERVAL_NEVER
* @type Number
* @readonly
* <p>Use with {@link Titanium.App.iOS#method-setMinimumBackgroundFetchInterval setMinimumBackgroundFetchInterval} method.
Used to specify a fetch interval large enough to prevent fetch operations from occurring.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property USER_NOTIFICATION_TYPE_NONE
* @type Number
* @readonly
* <p>The application may not present any UI upon a notification being received.
Use with the {@link UserNotificationSettings#property-types types} property.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property USER_NOTIFICATION_TYPE_BADGE
* @type Number
* @readonly
* <p>The application may badge its icon upon a notification being received.
Use with the {@link UserNotificationSettings#property-types types} property.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property USER_NOTIFICATION_TYPE_SOUND
* @type Number
* @readonly
* <p>The application may play a sound upon a notification being received.
Use with the {@link UserNotificationSettings#property-types types} property.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property USER_NOTIFICATION_TYPE_ALERT
* @type Number
* @readonly
* <p>The application may display an alert upon a notification being received.
Use with the {@link UserNotificationSettings#property-types types} property.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property USER_NOTIFICATION_ACTIVATION_MODE_BACKGROUND
* @type Number
* @readonly
* <p>The action will execute in background. Use with the
{@link Titanium.App.iOS.UserNotificationAction#property-activationMode activationMode} property.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property USER_NOTIFICATION_ACTIVATION_MODE_FOREGROUND
* @type Number
* @readonly
* <p>The action will launch the application and execute in the foreground.
Use with the {@link Titanium.App.iOS.UserNotificationAction#property-activationMode activationMode} property.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property USER_NOTIFICATION_BEHAVIOR_DEFAULT
* @type Number
* @readonly
* <p>Default action behavior with no additional action support.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Use with the {@link Titanium.App.iOS.UserNotificationAction#property-behavior behavior} property.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property USER_NOTIFICATION_BEHAVIOR_TEXTINPUT
* @type Number
* @readonly
* <p>Provides a textfield with the notification for the user to enter a text response.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The user input will be passed to the <code>typedText</code> field of the object passed to the callback
handling the <code>localnotification</code> event.</p>
<p>Use with the {@link Titanium.App.iOS.UserNotificationAction#property-behavior behavior} property.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property UTTYPE_TEXT
* @type String
* @readonly
* <p>Uniform type identifier for all text types.</p>
* <p><b>Constant value:</b>public.text</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_PLAIN_TEXT
* @type String
* @readonly
* <p>Uniform type identifier for a plain text type, equivalent to MIME type text/plain.</p>
* <p><b>Constant value:</b>public.plain-text</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_UTF8_PLAIN_TEXT
* @type String
* @readonly
* <p>Uniform type identifier for Unicode-8 plain text type.</p>
* <p><b>Constant value:</b>public.utf8-plain-text</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_UTF16_EXTERNAL_PLAIN_TEXT
* @type String
* @readonly
* <p>Uniform type identifier for Unicode-16 with byte-order mark (BOM), or if BOM is not present,
an external representation byte order (big-endian).</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_UTF16_PLAIN_TEXT
* @type String
* @readonly
* <p>Uniform type identifier for Unicode-16, native byte order, with an optional byte-order mark (BOM).</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_RTF
* @type String
* @readonly
* <p>Uniform type identifier for Rich Text.</p>
* <p><b>Constant value:</b>public.rtf</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_HTML
* @type String
* @readonly
* <p>Uniform type identifier for HTML.</p>
* <p><b>Constant value:</b>public.html</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_XML
* @type String
* @readonly
* <p>Uniform type identifier for XML.</p>
* <p><b>Constant value:</b>public.xml</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_PDF
* @type String
* @readonly
* <p>Uniform type identifier for PDF data.</p>
* <p><b>Constant value:</b>com.adobe.pdf</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_RTFD
* @type String
* @readonly
* <p>Uniform type identifier for Rich Text Format Directory, that is, Rich Text with content embedding, on-disk format.</p>
* <p><b>Constant value:</b>com.apple.rtfd</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_FLAT_RTFD
* @type String
* @readonly
* <p>Uniform type identifier for Rich Text with content embedding, pasteboard format.</p>
* <p><b>Constant value:</b>com.apple.flat-rtfd</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_TXN_TEXT_AND_MULTIMEDIA_DATA
* @type String
* @readonly
* <p>Uniform type identifier for MLTE (Textension) format for mixed text and multimedia data.</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_WEB_ARCHIVE
* @type String
* @readonly
* <p>Uniform type identifier for WebKit webarchive format.</p>
* <p><b>Constant value:</b>com.apple.webarchive</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_IMAGE
* @type String
* @readonly
* <p>Uniform type identifier for all image types.</p>
* <p><b>Constant value:</b>public.image</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_JPEG
* @type String
* @readonly
* <p>Uniform type identifier for JPEG images.</p>
* <p><b>Constant value:</b>public.jpeg</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_JPEG2000
* @type String
* @readonly
* <p>Uniform type identifier for JPEG 2000 images.</p>
* <p><b>Constant value:</b>public.jpeg-2000</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_TIFF
* @type String
* @readonly
* <p>Uniform type identifier for TIFF images.</p>
* <p><b>Constant value:</b>public.tiff</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_PICT
* @type String
* @readonly
* <p>Uniform type identifier for PICT images.</p>
* <p><b>Constant value:</b>com.apple.pict</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_GIF
* @type String
* @readonly
* <p>Uniform type identifier for GIF images.</p>
* <p><b>Constant value:</b>com.compuserve.gif</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_PNG
* @type String
* @readonly
* <p>Uniform type identifier for PNG images.</p>
* <p><b>Constant value:</b>public.png</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_QUICKTIME_IMAGE
* @type String
* @readonly
* <p>Uniform type identifier for QuickTime images.</p>
* <p><b>Constant value:</b>com.apple.quicktime-image</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_APPLE_ICNS
* @type String
* @readonly
* <p>Uniform type identifier for Mac OS icon images.</p>
* <p><b>Constant value:</b>com.apple.icns</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_BMP
* @type String
* @readonly
* <p>Uniform type identifier for Windows bitmap images.</p>
* <p><b>Constant value:</b>com.microsoft.bmp</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_ICO
* @type String
* @readonly
* <p>Uniform type identifier for Windows icon images.</p>
* <p><b>Constant value:</b>com.microsoft.ico</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_MOVIE
* @type String
* @readonly
* <p>Uniform type identifier for all audiovisual content.</p>
* <p><b>Constant value:</b>public.movie</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_VIDEO
* @type String
* @readonly
* <p>Uniform type identifier for all video content without audio.</p>
* <p><b>Constant value:</b>public.video</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_AUDIO
* @type String
* @readonly
* <p>Uniform type identifier for all audio content.</p>
* <p><b>Constant value:</b>public.audio</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_QUICKTIME_MOVIE
* @type String
* @readonly
* <p>Uniform type identifier for QuickTime movies.</p>
* <p><b>Constant value:</b>com.apple.quicktime-movie</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_MPEG
* @type String
* @readonly
* <p>Uniform type identifier for MPEG-1 and MPEG-2 content.</p>
* <p><b>Constant value:</b>public.mpeg</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_MPEG4
* @type String
* @readonly
* <p>Uniform type identifier for MPEG-4 content.</p>
* <p><b>Constant value:</b>public.mpeg-4</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_MP3
* @type String
* @readonly
* <p>Uniform type identifier for MP3 audio.</p>
* <p><b>Constant value:</b>public.mp3</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_MPEG4_AUDIO
* @type String
* @readonly
* <p>Uniform type identifier for MPEG-4 audio.</p>
* <p><b>Constant value:</b>public.mpeg-4-audio</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property UTTYPE_APPLE_PROTECTED_MPEG4_AUDIO
* @type String
* @readonly
* <p>Uniform type identifier for protected MPEG-4 audio (iTunes music store format).</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property currentUserNotificationSettings
* @type UserNotificationSettings
* @readonly
* <p>Notification types and user notification categories the application is registered to use
(available on iOS 8 and later).</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property supportedUserActivityTypes
* @type String[]
* @readonly
* <p>Provides an Array of the NSUserActivityTypes keys defined within your Titanium project.
(available on iOS 8 and later).</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Used to obtain a list of the NSUserActivityTypes keys defined in your Titanium project's tiapp.xml file.
These NSUserActivityTypes keys are the keys which you can use working with iOS Titanium User Activities.
NSUserActivityTypes must be defined at build time in your tiapp.xml file as shown below:</p>
<pre><code><ios>
<plist>
<dict>
<key>NSUserActivityTypes</key>
<array>
<string>com.setdirection.home</string>
<string>com.setdirection.shelf</string>
<string>com.setdirection.item</string>
</array>
</dict>
</plist>
</ios>
</code></pre>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property applicationOpenSettingsURL
* @type String
* @readonly
* <p>Returns a URL to open the app's settings.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Used to create a URL that you can pass to the {@link Titanium.Platform#method-openURL openURL} method.
When you open the URL built from this string, the system launches the Settings app and displays the app's custom settings, if it has any.</p>
<pre><code>var settingsURL = Ti.App.iOS.applicationOpenSettingsURL;
if (Ti.Platform.canOpenURL(settingsURL)) {
Ti.Platform.openURL(settingsURL);
}
</code></pre>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @class NotificationParams
* @platform iphone 1.7
* @platform ipad 1.7
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/iOS.yml
* <p>Dictionary object of parameters used to create a notification using
{@link Titanium.App.iOS#method-scheduleLocalNotification}.</p>
*/
/**
* @property alertAction
* @type String
* <p>Alert button text ('Open', by default) or slider text ('slide to unlock...', by default)
to display.</p>
*/
/**
* @property alertBody
* @type String
* <p>Alert message to display.</p>
*/
/**
* @property alertTitle
* @type String
* <p>Alert title to display. Available since Titanium SDK 5.4.0.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property alertLaunchImage
* @type String
* <p>Image to display instead of <code>Default.png</code> when launching the application.</p>
*/
/**
* @property badge
* @type Number
* <p>Application badge value.</p>
*/
/**
* @property category
* @type String
* <p>String identifier of category of actions to be displayed for an interactive
notification (only for iOS 8 and above).</p>
*/
/**
* @property date
* @type Date
* <p>Date and time for the notification to occur.</p>
*/
/**
* @property repeat
* @type String
* <p>Interval to repeat the notification. One of <code>weekly</code>, <code>daily</code>, <code>yearly,</code> <code>monthly</code>.</p>
*/
/**
* @property sound
* @type String
* <p>Path to the sound file to play when notification occurs, relative to the <code>Resources</code> folder.</p>
*/
/**
* @property timezone
* @type String
* <p>Timezone of the date configured for the notification. If not set, the system timezone is used.</p>
*/
/**
* @property userInfo
* @type Dictionary
* <p>Data to pass to the application with the notification event.</p>
*/
/**
* @property region
* @type Dictionary
* <p>Region the notification will be triggered in. Allowed parameter are:</p>
<ul>
<li><code>latitude</code>: Latitude of the location center, in decimal degrees (required).</li>
<li><code>longitude</code>: Longitude of the location center, in decimal degrees (required).</li>
<li><code>triggersOnce</code>: Whether or not the notification will only fire once (optional, default: true).</li>
<li><code>identifier</code>: Identifier of the region (optional).</li>
</ul>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @class LaunchOptionsType
* @platform iphone 6.0.0
* @platform ipad 6.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/iOS.yml
* <p>Dictionary object of parameters used to identify an incoming URL that is handled
by the application.</p>
*/
/**
* @property source
* @type String
* <p>The application or service that triggered the handled URL.</p>
*/
/**
* @property url
* @type String
* <p>The url that was triggered by the application or service.</p>
*/
/**
* @class UserNotificationSettings
* @platform iphone 3.4.0
* @platform ipad 3.4.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/iOS.yml
* <p>Dictionary object of parameters used to register the application with local notifications using
the {@link Titanium.App.iOS#method-registerUserNotificationSettings} method.</p>
<p>To retrieve the current notification settings, use the
{@link Titanium.App.iOS#property-currentUserNotificationSettings} property.</p>
*/
/**
* @property types
* @type Number[]
* <p>Notification types to use.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.App.iOS#property-USER_NOTIFICATION_TYPE_NONE}
<li> {@link Titanium.App.iOS#property-USER_NOTIFICATION_TYPE_BADGE}
<li> {@link Titanium.App.iOS#property-USER_NOTIFICATION_TYPE_SOUND}
<li> {@link Titanium.App.iOS#property-USER_NOTIFICATION_TYPE_ALERT}
</ul></p>
*/
/**
* @property categories
* @type Titanium.App.iOS.UserNotificationCategory[]
* <p>Set of categories of user notification actions required by the applicaiton to use.</p>
*/
/**
* @class Titanium.Blob
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Blob.yml
* <p>A container for binary data.</p>
* @description <p>A <code>Blob</code> represents a chunk of binary information, often obtained through
an {@link Titanium.Network.HTTPClient HTTPClient} or by reading a {@link Titanium.Filesystem.File File}. </p>
<p>Blobs are often used to store text or image data.
The <code>Blob</code> object includes a number of properties and methods specific to image blobs.</p>
<p>Android and Mobile Web support an {@link Titanium.Blob#method-append append} method, but
otherwise blobs are immutable. </p>
<p>The {@link Titanium.Utils} module provides several utility methods for working with
blobs, including methods for converting between blobs and Base64-encoded strings,
and methods for generating SHA-1 and SHA-256 hashes and MD5 digests from blob data.</p>
<p>The {@link Titanium.Buffer Buffer} object can also contain binary data, and is
more easily mutable. Extracting blob data to a buffer is somewhat roundabout:</p>
<pre><code>var blobStream = Ti.Stream.createStream({ source: myBlob, mode: Ti.Stream.MODE_READ });
var newBuffer = Ti.createBuffer({ length: myBlob.length });
var bytes = blobStream.read(newBuffer);
</code></pre>
<p>Creating a blob from a buffer is much easier:</p>
<pre><code>var newBlob = myBuffer.toBlob();
</code></pre>
<p>In both cases, the conversion involves copying the data from one object to another, so
you should be conscious of the amount of the data being copied.</p>
*/
/**
* @method append
* <p>Appends the data from another blob to this blob.</p>
* @param {Titanium.Blob} blob
<p>Blob to append to this blob.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method toString
* <p>Returns a string representation of this blob.</p>
* @description <p>On Mobile Web, if the blob is binary, <code>toString</code> returns a base64 encoded data URI.</p>
* @returns {String}
*/
/**
* @method imageAsCropped
* <p>Creates a new blob by cropping the underlying image to the specified dimensions.</p>
* @description <p>Returns the cropped image as a blob.</p>
<p>If this blob doesn't represent an image, returns <code>null</code>.</p>
* @param {Dictionary<ImageAsCroppedDict>} options
<p>Image cropping options.</p>
* @returns {Titanium.Blob}Cropped image as a blob.
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method imageAsResized
* <p>Creates a new blob by resizing and scaling the underlying image to the specified dimensions.</p>
* @description <p>Returns the resized image as a blob.</p>
<p>If this blob doesn't represent an image, returns <code>null</code>.</p>
* @param {Number} width
<p>Width to resize this image to.</p>
* @param {Number} height
<p>Height to resize this image to.</p>
* @returns {Titanium.Blob}Resized image as a blob.
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method imageAsThumbnail
* <p>Returns a thumbnail version of the underlying image, optionally with a border and rounded corners.</p>
* @description <p>Returns the thumbnail image as a blob.</p>
<p>If this blob doesn't represent an image, returns <code>null</code>.</p>
* @param {Number} size
<p>Size of the thumbnail, in either width or height.</p>
* @param {Number} borderSize (optional)
<p>Width of the thumbnail's border.</p>
* @param {Number} cornerRadius (optional)
<p>Radius of the thumbnail's corners.</p>
* @returns {Titanium.Blob}The image thumbnail in a blob.
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method imageWithAlpha
* <p>Returns a copy of the underlying image with an added alpha channel.</p>
* @description <p>Returns the new image as a blob, or <code>null</code> if this blob is not an image.</p>
* @returns {Titanium.Blob}The image with an alpha channel in a blob, or `null` if this blob is not an image.
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method imageWithRoundedCorner
* <p>Returns a copy of the underlying image with rounded corners added.</p>
* @description <p>Returns the new image as a blob, or <code>null</code> if this blob is not an image.</p>
* @param {Number} cornerSize
<p>Size of the rounded corners in pixels.</p>
* @param {Number} borderSize (optional)
<p>Width of the border in pixels.</p>
* @returns {Titanium.Blob}Image with a rounded corner in a blob, or `null` if this blob is not an image.
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method imageWithTransparentBorder
* <p>Returns a copy of the underlying image with an added transparent border.</p>
* @description <p>Returns the new image as a blob, or <code>null</code> if this blob is not an image.</p>
* @param {Number} size
<p>Width of the transparent border in pixels.</p>
* @returns {Titanium.Blob}The image with a transparent border in a blob, or `null` if this blob is not an image.
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getFile
* <p>Gets the value of the {@link Titanium.Blob#property-file} property.</p>
* @returns {Titanium.Filesystem.File}
*/
/**
* @method getHeight
* <p>Gets the value of the {@link Titanium.Blob#property-height} property.</p>
* @returns {Number}
*/
/**
* @method getLength
* <p>Gets the value of the {@link Titanium.Blob#property-length} property.</p>
* @returns {Number}
*/
/**
* @method getMimeType
* <p>Gets the value of the {@link Titanium.Blob#property-mimeType} property.</p>
* @returns {String}
*/
/**
* @method getNativePath
* <p>Gets the value of the {@link Titanium.Blob#property-nativePath} property.</p>
* @returns {String}
*/
/**
* @method getSize
* <p>Gets the value of the {@link Titanium.Blob#property-size} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getText
* <p>Gets the value of the {@link Titanium.Blob#property-text} property.</p>
* @returns {String}
*/
/**
* @method getWidth
* <p>Gets the value of the {@link Titanium.Blob#property-width} property.</p>
* @returns {Number}
*/
/**
* @property file
* @type Titanium.Filesystem.File
* @readonly
* <p>File object represented by this blob, or <code>null</code> if this blob is not
associated with a file.</p>
*/
/**
* @property height
* @type Number
* @readonly
* <p>If this blob represents an image, this is the height of the image in pixels.</p>
* @description <p>If this blob doesn't represent an image, <code>height</code> is 0.</p>
<p>On Mobile Web, the <code>height</code> is not available until the image loads. It is advised
to set a timeout to wait for the image to load before accessing the <code>height</code>.</p>
*/
/**
* @property length
* @type Number
* @readonly
* <p>Length of this blob in bytes.</p>
*/
/**
* @property mimeType
* @type String
* @readonly
* <p>Mime type of the data in this blob.</p>
*/
/**
* @property nativePath
* @type String
* @readonly
* <p>If this blob represents a {@link Titanium.Filesystem.File File}, this is the file URL
that represents it.</p>
* @description <p>If this blob doesn't represent a file, the value of <code>nativePath</code> is <code>null</code>. </p>
*/
/**
* @property size
* @type Number
* @readonly
* <p>Size of the blob in pixels (for image blobs) or bytes (for all other blobs).</p>
* @description <p>If this blob represents an image, this is the total number of pixels in the image.
Otherwise it returns the number of bytes in the binary data.</p>
<p>On Mobile Web, always returns the number of bytes of the blob. Note that internally,
binary data is stored base64 encoded and <code>size</code> represents the number of bytes before
base64 encoding.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property text
* @type String
* @readonly
* <p>UTF-8 string representation of the data in this blob.</p>
* @description <p>If this blob represents pure binary data, the value will be <code>null</code>.</p>
*/
/**
* @property width
* @type Number
* @readonly
* <p>If this blob represents an image, this is the width of the image in pixels.</p>
* @description <p>If this blob doesn't represent an image, <code>height</code> is 0.</p>
<p>On Mobile Web, the <code>width</code> is not available until the image loads. It is advised to set a timeout
to wait for the image to load before accessing the <code>width</code>.</p>
*/
/**
* @class ImageAsCroppedDict
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Blob.yml
* <p>Simple object used to specify options for {@link Titanium.Blob#method-imageAsCropped imageAsCropped}.</p>
*/
/**
* @property [width=Current image width.]
* @type Number
* <p>Width to crop this image to.</p>
*/
/**
* @property [height=Current image height.]
* @type Number
* <p>Height to crop this image to.</p>
*/
/**
* @property [x=Cropped rectangle is centered horizontally on the original image.]
* @type Number
* <p>Left coordinate of the cropped rectangle within the source image.</p>
*/
/**
* @property [y=Cropped rectangle is centered vertically on the original image.]
* @type Number
* <p>Top coordinate of the cropped rectangle within the source image.</p>
*/
/**
* @class Titanium.BlobStream
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.IOStream
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/BlobStream.yml
* <p>Wrapper around {@link Titanium.Blob} that implements the {@link Titanium.IOStream} interface.</p>
* @description <p>Use the {@link Titanium.Stream#method-createStream} method to create a <code>BlobStream</code> instance from a
<code>Blob</code>.</p>
*/
/**
* @class Titanium.Buffer
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Buffer.yml
* <p>Buffer is a mutable, resizable container for raw data.</p>
* @description <p>A <code>Buffer</code> works like a resizable array of byte values.</p>
<p>Use the {@link Titanium#method-createBuffer} method to create a buffer.</p>
*/
/**
* @method append
* <p>Appends <code>sourceBuffer</code> to the this buffer.</p>
* @description <p>This buffer is grown dynamically to accommodate the additional data if need be.</p>
<p>If <code>sourceOffset</code> and <code>sourceLength</code> are specified, data from <code>sourceBuffer</code> is
copied starting at position <code>sourceOffset</code>, and no more than <code>sourceLength</code> bytes
are copied.</p>
* @param {Titanium.Buffer} sourceBuffer
<p>Buffer to append to this buffer.</p>
* @param {Number} sourceOffset (optional)
<p>Offset to start reading buffer data from.
If specified, <code>sourceLength</code> must also be specified.</p>
* @param {Number} sourceLength (optional)
<p>Number of bytes to read from <code>sourceBuffer</code>.
If specified, <code>sourceOffset</code> must also be specified.</p>
* @returns {Number}The number of bytes appended.
*/
/**
* @method insert
* <p>Inserts data from <code>sourceBuffer</code> into this buffer at <code>offset</code>.</p>
* @description <p>Buffer is grown to accommodate the new data.</p>
<p>If <code>sourceOffset</code> and <code>sourceLength</code> are specified, <code>sourceLength</code> bytes
of data are copied from <code>sourceBuffer</code>, with the first byte at <code>sourceOffset</code>.</p>
* @param {Titanium.Buffer} sourceBuffer
<p>Buffer holding data to insert into this buffer.</p>
* @param {Number} offset
<p>Offset in this buffer to insert the first byte copied from
<code>sourceBuffer</code>.</p>
* @param {Number} sourceOffset (optional)
<p>Offset in <code>sourceBuffer</code> of the first byte to insert.
If specified, <code>sourceLength</code> must be specified as well.</p>
* @param {Number} sourceLength (optional)
<p>Number of bytes to insert from <code>sourceBuffer</code>.
If specified, <code>sourceOffset</code> must be specified as well.</p>
* @returns {Number}The number of bytes inserted.
*/
/**
* @method copy
* <p>Copies data from <code>sourceBuffer</code> into the current buffer at <code>offset</code>.</p>
* @description <p>Does not expand this buffer if there is not enough room to accomodate the data
from <code>sourceBuffer</code>.</p>
<p>If <code>sourceOffset</code> and <code>sourceLength</code> are specified, bytes are copied from
<code>sourceBuffer</code> starting at <code>sourceOffset</code>, and a maximum of <code>sourceLength</code> bytes
are copied.</p>
* @param {Titanium.Buffer} sourceBuffer
<p>Buffer to copy data from.</p>
* @param {Number} offset
<p>Offset in this buffer for the first byte of the copied data.</p>
* @param {Number} sourceOffset (optional)
<p>Offset in <code>sourceBuffer</code> to copy data from.
If specified, <code>sourceLength</code> must be specified as well.</p>
* @param {Number} sourceLength (optional)
<p>Number of bytes to copy from <code>sourceBuffer</code>.
If specified, <code>sourceOffset</code> must be specified as well.</p>
* @returns {Number}The number of bytes copied.
*/
/**
* @method clone
* <p>Creates a complete or partial copy of this buffer.</p>
* @description <p>If called with no arguments, retuns a complete copy of the current buffer.</p>
<p>If <code>offset</code> and <code>length</code> are specified, creates a new buffer from the original
buffer contents starting at <code>offset</code> and ending at <code>offset</code>+<code>length</code>-1.</p>
* @param {Number} offset (optional)
<p>Offset of first byte of this buffer to clone.
If specified, <code>length</code> must be specified as well.</p>
* @param {Number} length (optional)
<p>Number of bytes of data to clone.</p>
* @returns {Titanium.Buffer}
*/
/**
* @method fill
* <p>Fills this buffer with the specified byte value.</p>
* @description <p>Fills the buffer by setting byte values to <code>fillByte</code>.</p>
<p>If <code>offset</code> and <code>length</code> are specified, fills the buffer starting at
<code>offset</code> and ending at <code>offset</code>+<code>length</code>-1.</p>
<p>If <code>offset</code> and <code>length</code> are omitted, fills the entire buffer.</p>
* @param {Number} fillByte
<p>Byte to fill buffer with.</p>
* @param {Number} offset (optional)
<p>Offset of the first byte to set to <code>fillByte</code>.</p>
* @param {Number} length (optional)
<p>Number of bytes to fill.</p>
*/
/**
* @method clear
* <p>Clears this buffer's contents but does not change the size of the buffer.</p>
*/
/**
* @method release
* <p>Releases the space allocated to the buffer, and sets its length to 0.</p>
* @description <p>This is effectively the same as <code>buffer.length = 0</code>.</p>
*/
/**
* @method toString
* <p>Converts this buffer to a String.</p>
* @returns {String}
*/
/**
* @method toBlob
* <p>Converts this buffer to a {@link Titanium.Blob}.</p>
* @returns {Titanium.Blob}
*/
/**
* @method getLength
* <p>Gets the value of the {@link Titanium.Buffer#property-length} property.</p>
* @returns {Number}
*/
/**
* @method setLength
* <p>Sets the value of the {@link Titanium.Buffer#property-length} property.</p>
* @param {Number} length
<p>New value for the property.</p>
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.Buffer#property-value} property.</p>
* @returns {Number/String}
*/
/**
* @method setValue
* <p>Sets the value of the {@link Titanium.Buffer#property-value} property.</p>
* @param {Number/String} value
<p>New value for the property.</p>
*/
/**
* @method getType
* <p>Gets the value of the {@link Titanium.Buffer#property-type} property.</p>
* @returns {String}
*/
/**
* @method setType
* <p>Sets the value of the {@link Titanium.Buffer#property-type} property.</p>
* @param {String} type
<p>New value for the property.</p>
*/
/**
* @method getByteOrder
* <p>Gets the value of the {@link Titanium.Buffer#property-byteOrder} property.</p>
* @returns {Number}
*/
/**
* @method setByteOrder
* <p>Sets the value of the {@link Titanium.Buffer#property-byteOrder} property.</p>
* @param {Number} byteOrder
<p>New value for the property.</p>
*/
/**
* @property [length=0 unless `value` is specified, in which case the length of the encoded data is used.]
* @type Number
* <p>Length of the buffer in bytes.</p>
* @description <p>When <code>length</code> is modified the buffer will be re-sized while preserving existing data where
possible. If the new buffer length is smaller than the length of the existing data then the
existing data will be truncated down to the size of the new buffer. </p>
<p>Resizing a buffer by setting its length should be used sparingly due to the associated overhead.</p>
*/
/**
* @property value
* @type Number/String
* @creationOnly
* <p>Data to be encoded.</p>
* @description <p>If <code>value</code> is a Number, <code>type</code> must also be set. (This is simply a convenient way of
calling {@link Titanium.Codec#method-encodeString} or {@link Titanium.Codec#method-encodeNumber}.)</p>
*/
/**
* @property [type=For string values, defaults to {@link Titanium.Codec#property-CHARSET_UTF8}.]
* @type String
* @creationOnly
* <p>The type of data encoding to use with <code>value</code>.</p>
* @description <p>Required when <code>value</code> is a Number. For numbers, specify a <code>TYPE</code> constant
from {@link Titanium.Codec}, for example, {@link Titanium.Codec#property-TYPE_DOUBLE}.</p>
<p>When <code>value</code> is a String, specify a <code>CHARSET</code> constant from {@link Titanium.Codec}.</p>
*/
/**
* @property [byteOrder=OS native byte order.]
* @type Number
* @creationOnly
* <p>Byte order of this buffer.</p>
* @description <p>Specify either {@link Titanium.Codec#property-BIG_ENDIAN} or {@link Titanium.Codec#property-LITTLE_ENDIAN}. </p>
*/
/**
* @class Titanium.BufferStream
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.IOStream
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/BufferStream.yml
* <p>Wrapper around {@link Titanium.Buffer} that implements the {@link Titanium.IOStream} interface.</p>
* @description <p>Use the {@link Titanium.Stream#method-createStream} method to create a <code>BufferStream</code> instance from a
<code>Buffer</code>.</p>
*/
/**
* @class Titanium.Calendar.Alert
* @platform android 3.2.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/Alert.yml
* <p>An object that represents a single alert for an event in an calendar.</p>
*/
/**
* @method getAbsoluteDate
* <p>Gets the value of the {@link Titanium.Calendar.Alert#property-absoluteDate} property.</p>
* @returns {Date}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method setAbsoluteDate
* <p>Sets the value of the {@link Titanium.Calendar.Alert#property-absoluteDate} property.</p>
* @param {Date} absoluteDate
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getRelativeOffset
* <p>Gets the value of the {@link Titanium.Calendar.Alert#property-relativeOffset} property.</p>
* @returns {Number}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method setRelativeOffset
* <p>Sets the value of the {@link Titanium.Calendar.Alert#property-relativeOffset} property.</p>
* @param {Number} relativeOffset
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getAlarmTime
* <p>Gets the value of the {@link Titanium.Calendar.Alert#property-alarmTime} property.</p>
* @returns {Date}
* @platform android 3.2.0
*/
/**
* @method getBegin
* <p>Gets the value of the {@link Titanium.Calendar.Alert#property-begin} property.</p>
* @returns {Date}
* @platform android 3.2.0
*/
/**
* @method getEnd
* <p>Gets the value of the {@link Titanium.Calendar.Alert#property-end} property.</p>
* @returns {Date}
* @platform android 3.2.0
*/
/**
* @method getEventId
* <p>Gets the value of the {@link Titanium.Calendar.Alert#property-eventId} property.</p>
* @returns {Number}
*/
/**
* @method getId
* <p>Gets the value of the {@link Titanium.Calendar.Alert#property-id} property.</p>
* @returns {String}
* @platform android 3.2.0
*/
/**
* @method getMinutes
* <p>Gets the value of the {@link Titanium.Calendar.Alert#property-minutes} property.</p>
* @returns {Number}
* @platform android 3.2.0
*/
/**
* @method getState
* <p>Gets the value of the {@link Titanium.Calendar.Alert#property-state} property.</p>
* @returns {Number}
* @platform android 3.2.0
*/
/**
* @property absoluteDate
* @type Date
* <p>The absolute date for the alarm.</p>
* @description <p>If you set this property for a relative offset alarm, it loses
the relative offset and becomes an absolute alarm.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property relativeOffset
* @type Number
* <p>The offset from the start of an event, at which the alarm fires.</p>
* @description <p>If you set this value for an absolute alarm, it loses its absolute date and
becomes a relative offset alarm.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property alarmTime
* @type Date
* @readonly
* <p>Date/time at which this alert alarm is set to trigger.</p>
* @platform android 3.2.0
*/
/**
* @property begin
* @type Date
* @readonly
* <p>Start date/time for the corresponding event.</p>
* @platform android 3.2.0
*/
/**
* @property end
* @type Date
* @readonly
* <p>End date/time for the corresponding event.</p>
* @platform android 3.2.0
*/
/**
* @property eventId
* @type Number
* @readonly
* <p>Identifier of the event for which this alert is set.</p>
*/
/**
* @property id
* @type String
* @readonly
* <p>Identifier of this alert.</p>
* @platform android 3.2.0
*/
/**
* @property minutes
* @type Number
* @readonly
* <p>Reminder notice period in minutes, that determines how long prior to the event this alert
should trigger.</p>
* @platform android 3.2.0
*/
/**
* @property state
* @type Number
* @readonly
* <p>The current state of the alert.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-STATE_DISMISSED}
<li> {@link Titanium.Calendar#property-STATE_FIRED}
<li> {@link Titanium.Calendar#property-STATE_SCHEDULED}
</ul></p>
* @platform android 3.2.0
*/
/**
* @class Titanium.Calendar.Attendee
* @platform iphone 6.0.0
* @platform ipad 6.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/Attendee.yml
* <p>An object that represents a single attendee of an event.</p>
* @description <p>The API supports retrieving information about the attendee of an event. </p>
*/
/**
* @method getIsOrganizer
* <p>Gets the value of the {@link Titanium.Calendar.Attendee#property-isOrganizer} property.</p>
* @returns {Boolean}
*/
/**
* @method setIsOrganizer
* <p>Sets the value of the {@link Titanium.Calendar.Attendee#property-isOrganizer} property.</p>
* @param {Boolean} isOrganizer
<p>New value for the property.</p>
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.Calendar.Attendee#property-name} property.</p>
* @returns {String}
*/
/**
* @method setName
* <p>Sets the value of the {@link Titanium.Calendar.Attendee#property-name} property.</p>
* @param {String} name
<p>New value for the property.</p>
*/
/**
* @method getEmail
* <p>Gets the value of the {@link Titanium.Calendar.Attendee#property-email} property.</p>
* @returns {String}
*/
/**
* @method setEmail
* <p>Sets the value of the {@link Titanium.Calendar.Attendee#property-email} property.</p>
* @param {String} email
<p>New value for the property.</p>
*/
/**
* @method getRole
* <p>Gets the value of the {@link Titanium.Calendar.Attendee#property-role} property.</p>
* @returns {Number}
*/
/**
* @method setRole
* <p>Sets the value of the {@link Titanium.Calendar.Attendee#property-role} property.</p>
* @param {Number} role
<p>New value for the property.</p>
*/
/**
* @method getType
* <p>Gets the value of the {@link Titanium.Calendar.Attendee#property-type} property.</p>
* @returns {Number}
*/
/**
* @method setType
* <p>Sets the value of the {@link Titanium.Calendar.Attendee#property-type} property.</p>
* @param {Number} type
<p>New value for the property.</p>
*/
/**
* @method getStatus
* <p>Gets the value of the {@link Titanium.Calendar.Attendee#property-status} property.</p>
* @returns {Number}
*/
/**
* @method setStatus
* <p>Sets the value of the {@link Titanium.Calendar.Attendee#property-status} property.</p>
* @param {Number} status
<p>New value for the property.</p>
*/
/**
* @property isOrganizer
* @type Boolean
* <p>Indicates whether this attendee is the event organizer.</p>
*/
/**
* @property name
* @type String
* <p>The attendee name.</p>
*/
/**
* @property email
* @type String
* <p>The attendee email.</p>
* @description <p>Due to privacy concerns in iOS, this value will be empty if the attendee
is the device owner. </p>
*/
/**
* @property role
* @type Number
* <p>The role of the attendee.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-ATTENDEE_ROLE_UNKNOWN}
<li> {@link Titanium.Calendar#property-ATTENDEE_ROLE_OPTIONAL}
<li> {@link Titanium.Calendar#property-ATTENDEE_ROLE_REQUIRED}
<li> {@link Titanium.Calendar#property-ATTENDEE_ROLE_CHAIR}
<li> {@link Titanium.Calendar#property-ATTENDEE_ROLE_NON_PARTICIPANT}
</ul></p>
*/
/**
* @property type
* @type Number
* <p>The type of the attendee.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-ATTENDEE_TYPE_UNKNOWN}
<li> {@link Titanium.Calendar#property-ATTENDEE_TYPE_PERSON}
<li> {@link Titanium.Calendar#property-ATTENDEE_TYPE_ROOM}
<li> {@link Titanium.Calendar#property-ATTENDEE_TYPE_RESOURCE}
<li> {@link Titanium.Calendar#property-ATTENDEE_TYPE_GROUP}
</ul></p>
*/
/**
* @property status
* @type Number
* <p>The status of the attendee.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-ATTENDEE_STATUS_UNKNOWN}
<li> {@link Titanium.Calendar#property-ATTENDEE_STATUS_PENDING}
<li> {@link Titanium.Calendar#property-ATTENDEE_STATUS_ACCEPTED}
<li> {@link Titanium.Calendar#property-ATTENDEE_STATUS_DECLINED}
<li> {@link Titanium.Calendar#property-ATTENDEE_STATUS_TENTATIVE}
<li> {@link Titanium.Calendar#property-ATTENDEE_STATUS_DELEGATED}
<li> {@link Titanium.Calendar#property-ATTENDEE_STATUS_IN_PROCESS}
</ul></p>
*/
/**
* @class Titanium.Calendar
* @platform android 3.2.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/Calendar.yml
* <p>The Calendar module provides an API for accessing the native calendar functionality.</p>
* @description <p>This module supports retrieving information about existing events and creating new events.
Modifying or deleting existing events and creating recurring events are only supported on iOS.</p>
<p>Currently, on Android, calendar permissions must be explicitly configured in <code>tiapp.xml</code> in order to access the
calendar. See "Common Requirements" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference">tiapp.xml and timodule.xml Reference</a>.</p>
* <h3>Examples</h3>
<h4>All Calendars vs Selectable Calendars</h4>
<p>Print the names of all calendars, and the names of calendars that
have been selected in the native Android calendar application.</p>
<pre><code>function showCalendars(calendars) {
for (var i = 0; i < calendars.length; i++) {
Ti.API.info(calendars[i].name);
}
}
Ti.API.info('ALL CALENDARS:');
showCalendars(Ti.Calendar.allCalendars);
if (Ti.Platform.osname === 'android') {
Ti.API.info('SELECTABLE CALENDARS:');
showCalendars(Ti.Calendar.selectableCalendars);
}
</code></pre><h4>Create an Event and Reminder on Android</h4>
<p>Creates an event and adds an e-mail reminder for 10 minutes before the event.</p>
<pre><code>var CALENDAR_TO_USE = 3;
var calendar = Ti.Calendar.getCalendarById(CALENDAR_TO_USE);
// Create the event
var eventBegins = new Date(2010, 11, 26, 12, 0, 0);
var eventEnds = new Date(2010, 11, 26, 14, 0, 0);
var details = {
title: 'Do some stuff',
description: "I'm going to do some stuff at this time.",
begin: eventBegins,
end: eventEnds
};
var event = calendar.createEvent(details);
// Now add a reminder via e-mail for 10 minutes before the event.
var reminderDetails = {
minutes: 10,
method: Ti.Calendar.METHOD_EMAIL
};
event.createReminder(reminderDetails);
</code></pre><h4>Events in a year</h4>
<p>Create a picker to allow an existing calendar to be selected and, when a button is clicked,
generate details of all events in that calendar for the current year .</p>
<pre><code>var calendars = [];
var selectedCalendarName;
var selectedid;
var pickerData = [];
var osname = Ti.Platform.osname;
//**read events from calendar*******
function performCalendarReadFunctions(){
var scrollView = Ti.UI.createScrollView({
backgroundColor: '#eee',
height: 500,
top: 20
});
var label = Ti.UI.createLabel({
backgroundColor: 'white',
text: 'Click on the button to display the events for the selected calendar',
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,
top: 20
});
scrollView.add(label);
var selectableCalendars = Ti.Calendar.allCalendars;
for (var i = 0, ilen = selectableCalendars.length; i < ilen; i++) {
calendars.push({ name: selectableCalendars[i].name, id: selectableCalendars[i].id });
pickerData.push( Ti.UI.createPickerRow({ title: calendars[i].name }) );
if(i === 0){
selectedCalendarName = selectableCalendars[i].name;
selectedid = selectableCalendars[i].id;
}
}
if(!calendars.length){
label.text = 'No calendars available. Select at least one in the native calendar before using this app';
} else {
label.text = 'Click button to view calendar events';
var picker = Ti.UI.createPicker({
top:20
});
picker.add(pickerData);
win.add(picker);
picker.addEventListener('change', function(e){
for (var i = 0, ilen = calendars.length; i < ilen; i++) {
if(calendars[i].name === e.row.title){
selectedCalendarName = calendars[i].name;
selectedid = calendars[i].id;
Ti.API.info('Selected calendar that we are going to fetch is :: '+ selectedid + ' name:' + selectedCalendarName);
}
}
});
var button = Ti.UI.createButton({
title: 'View events',
top: 20
});
win.add(button);
button.addEventListener('click', function(e){
label.text = 'Generating...';
var currentYear = new Date().getFullYear();
var consoleString = '';
function print(s) {
if (consoleString.length) {
consoleString = consoleString + '\n';
}
consoleString = consoleString + s;
}
var calendar = Ti.Calendar.getCalendarById(selectedid);
Ti.API.info('Calendar was of type' + calendar);
Ti.API.info('calendar that we are going to fetch is :: '+ calendar.id + ' name:' + calendar.name);
function printReminder(r) {
if (osname === 'android') {
var typetext = '[method unknown]';
if (r.method == Ti.Calendar.METHOD_EMAIL) {
typetext = 'Email';
} else if (r.method == Ti.Calendar.METHOD_SMS) {
typetext = 'SMS';
} else if (r.method == Ti.Calendar.METHOD_ALERT) {
typetext = 'Alert';
} else if (r.method == Ti.Calendar.METHOD_DEFAULT) {
typetext = '[default reminder method]';
}
print(typetext + ' reminder to be sent ' + r.minutes + ' minutes before the event');
}
}
function printAlert(a) {
if (osname === 'android') {
print('Alert id ' + a.id + ' begin ' + a.begin + '; end ' + a.end + '; alarmTime ' + a.alarmTime + '; minutes ' + a.minutes);
} else if (osname === 'iphone' || osname === 'ipad') {
print('Alert absoluteDate ' + a.absoluteDate + ' relativeOffset ' + a.relativeOffset);
}
}
function printEvent(event) {
if (event.allDay) {
print('Event: ' + event.title + '; ' + event.begin + ' (all day)');
} else {
print('Event: ' + event.title + '; ' + event.begin + ' ' + event.begin+ '-' + event.end);
}
var reminders = event.reminders;
if (reminders && reminders.length) {
print('There is/are ' + reminders.length + ' reminder(s)');
for (var i = 0; i < reminders.length; i++) {
printReminder(reminders[i]);
}
}
print('hasAlarm? ' + event.hasAlarm);
var alerts = event.alerts;
if (alerts && alerts.length) {
for (var i = 0; i < alerts.length; i++) {
printAlert(alerts[i]);
}
}
var status = event.status;
if (status == Ti.Calendar.STATUS_TENTATIVE) {
print('This event is tentative');
}
if (status == Ti.Calendar.STATUS_CONFIRMED) {
print('This event is confirmed');
}
if (status == Ti.Calendar.STATUS_CANCELED) {
print('This event was canceled');
}
}
var events = calendar.getEventsInYear(currentYear);
if (events && events.length) {
print(events.length + ' event(s) in ' + currentYear);
print('');
for (var i = 0; i < events.length; i++) {
printEvent(events[i]);
print('');
}
} else {
print('No events');
}
label.text = consoleString;
});
}
win.add(scrollView);
}
var win = Ti.UI.createWindow({
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false,
layout: 'vertical',
title: 'Calendar Demo'
});
if (Ti.Calendar.hasCalendarPermissions()) {
performCalendarReadFunctions();
} else {
Ti.Calendar.requestCalendarPermissions(function(e) {
if (e.success) {
performCalendarReadFunctions();
} else {
Ti.API.error(e.error);
alert('Access to calendar is not allowed');
}
});
}
win.open();
</code></pre><h4>Create a Recurring Event with Alerts on iOS</h4>
<p>Create a recurring event with alerts.</p>
<pre><code>function printEventDetails(eventID) {
Ti.API.info('eventID:' + eventID);
var defCalendar = Ti.Calendar.defaultCalendar;
var eventFromCalendar = defCalendar.getEventById(eventID);
if (eventFromCalendar != null) {
Ti.API.info('Printing event values ::');
Ti.API.info('title : '+ eventFromCalendar.title);
Ti.API.info('notes : ' + eventFromCalendar.notes);
Ti.API.info('location:' + eventFromCalendar.location);
Ti.API.info('allDay ? :' + eventFromCalendar.allDay);
Ti.API.info('status : '+ eventFromCalendar.status);
Ti.API.info('availability : '+ eventFromCalendar.availability);
Ti.API.info('hasAlarm ? : '+ eventFromCalendar.hasAlarm);
Ti.API.info('id : '+ eventFromCalendar.id);
Ti.API.info('isDetached ? : '+ eventFromCalendar.isDetached);
Ti.API.info('begin : '+ eventFromCalendar.begin);
Ti.API.info('end : '+ eventFromCalendar.end);
var eventRule = eventFromCalendar.recurrenceRules;
Ti.API.info("recurrenceRules : " + eventRule);
for (var i = 0; i < eventRule.length; i++) {
Ti.API.info("Rule # "+ i);
Ti.API.info('frequency : ' + eventRule[i].frequency);
Ti.API.info('interval : ' + eventRule[i].interval);
Ti.API.info('daysofTheWeek : ' );
var daysofTheWeek = eventRule[i].daysOfTheWeek;
for (var j = 0; j < daysofTheWeek.length; j++) {
Ti.API.info('{ dayOfWeek : '+ daysofTheWeek[j].dayOfWeek +'weekNumber : '+daysofTheWeek[j].week +'}, ');
}
Ti.API.info('firstDayOfTheWeek : ' + eventRule[i].firstDayOfTheWeek);
Ti.API.info('daysOfTheMonth : ');
var daysOfTheMonth = eventRule[i].daysOfTheMonth;
for(var j=0;j<daysOfTheMonth.length;j++) {
Ti.API.info(' ' + daysOfTheMonth[j]);
}
Ti.API.info('daysOfTheYear : ');
var daysOfTheYear = eventRule[i].daysOfTheYear;
for(var j=0;i<daysOfTheYear.length;j++) {
Ti.API.info(' ' + daysOfTheYear[j]);
}
Ti.API.info('weeksOfTheYear : ');
var weeksOfTheYear = eventRule[i].weeksOfTheYear;
for(var j=0;j<weeksOfTheYear.length;j++) {
Ti.API.info(' ' + weeksOfTheYear[j]);
}
Ti.API.info('monthsOfTheYear : ');
var monthsOfTheYear = eventRule[i].monthsOfTheYear;
for(var j=0;j<monthsOfTheYear.length;j++) {
Ti.API.info(' ' + monthsOfTheYear[j]);
}
Ti.API.info('daysOfTheYear : ');
var setPositions = eventRule[i].setPositions;
for(var j=0;j<setPositions.length;j++) {
Ti.API.info(' ' + setPositions[j]);
}
};
Ti.API.info('alerts : '+ eventFromCalendar.alerts);
var newAlerts = eventFromCalendar.alerts;
for(var i=0 ; i < newAlerts.length ; i++) {
Ti.API.info('*****ALert '+ i);
Ti.API.info('absoluteDate :'+ newAlerts[i].absoluteDate);
Ti.API.info('relativeOffset ;' + newAlerts[i].relativeOffset);
}
}
}
function performCalendarWriteFunctions(){
var defCalendar = Ti.Calendar.defaultCalendar;
var date1 = new Date(new Date().getTime() + 3000),
date2 = new Date(new Date().getTime() + 900000);
Ti.API.info('Date1 : '+ date1 + 'Date2 : '+ date2);
var event1 = defCalendar.createEvent({
title: 'Sample Event',
notes: 'This is a test event which has some values assigned to it.',
location: 'Appcelerator Inc',
begin: date1,
end: date2,
availability: Ti.Calendar.AVAILABILITY_FREE,
allDay: false,
});
var alert1 = event1.createAlert({
absoluteDate: new Date(new Date().getTime() - (1000*60*20))
});
var alert2 = event1.createAlert({
relativeOffset:-(60*15)
})
var allAlerts = new Array(alert1,alert2);
event1.alerts = allAlerts;
var newRule = event1.createRecurrenceRule({
frequency: Ti.Calendar.RECURRENCEFREQUENCY_MONTHLY,
interval: 1,
daysOfTheWeek: [{dayOfWeek:1,week:2},{dayOfWeek:2}],
end: {occurrenceCount:10}
});
Ti.API.info('newRule : '+ newRule);
event1.recurrenceRules = [newRule];
Ti.API.info('Going to save event now');
event1.save(Ti.Calendar.SPAN_THISEVENT);
Ti.API.info('Done with saving event,\n Now trying to retreive it.');
printEventDetails(event1.id);
}
var win = Ti.UI.createWindow({
backgroundColor: 'white',
title: 'Calendar Demo'
});
var label = Ti.UI.createLabel({
text: 'Check console log',
height: Ti.UI.size,
width: Ti.UI.size
});
win.add(label);
if (Ti.Calendar.hasCalendarPermissions()) {
performCalendarReadFunctions();
} else {
Ti.Calendar.requestCalendarPermissions(function(e) {
if (e.success) {
performCalendarReadFunctions();
} else {
alert('Access to calendar is not allowed');
}
});
}
win.open();
</code></pre>
*/
/**
* @event change
* <p>Fired when the database backing the EventKit module is modified.</p>
* @description <p>This eventis fired when changes are made to the Calendar database, including adding,
removing, and changing events or reminders. Individual changes are not described.
When you receive this notification, you should refetch all Event objects you have
accessed, as they are considered stale. If you are actively editing an event and
do not wish to refetch it unless it is absolutely necessary to do so, you can call
the {@link Titanium.Calendar.Event#method-refresh refresh} method on it. If the method returns
YES, you do not need to refetch the event.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getCalendarById
* <p>Gets the calendar with the specified identifier.</p>
* @param {String} id
<p>Identifier of the calendar.</p>
* @returns {Titanium.Calendar.Calendar}
*/
/**
* @method hasCalendarPermissions
* <p>Returns <code>true</code> if the app has calendar access.</p>
* @returns {Boolean}
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method requestCalendarPermissions
* <p>Requests for calendar access.</p>
* @description <p>On Android, the request view will show if the permission is not accepted by the user, and the user did
not check the box "Never ask again" when denying the request. If the user checks the box "Never ask again,"
the user has to manually enable the permission in device settings. This method requests <code>Manifest.permission.READ_CALENDAR</code>
and <code>Manifest.permission.WRITE_CALENDAR</code> on Android. If yourequire other permissions, you can also use
{@link Titanium.Android#method-requestPermissions}.</p>
<p>In iOS 6, Apple introduced the Info.plist key <code>NSCalendarsUsageDescription</code> that is used to display an
own description while authorizing calendar permissions. In iOS 10, this key is mandatory and the application
will crash if your app does not include the key. Check the <a href="https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html">Apple docs</a> for more information.</p>
* @param {Callback<EventsAuthorizationResponse>} callback
<p>Function to call upon user decision to grant calendar access.</p>
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method requestEventsAuthorization
* <p>If authorization is unknown, will bring up a dialog requesting permission.</p>
* @deprecated 5.1.0 Use <Titanium.Calendar.requestCalendarPermissions> instead.
* @description <p>Note that the callback may be synchronous or asynchronous. That is, it may be called
during requestEventsAuthorization or much later. See the "Request access to the events"
example on how to best use this method. </p>
* @param {Callback<EventsAuthorizationResponse>} callback
<p>Callback function to execute when when authorization is no longer unknown.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getEventsAuthorization
* <p>Gets the value of the {@link Titanium.Calendar#property-eventsAuthorization} property.</p>
* @deprecated 5.2.0 Use <Titanium.Calendar.calendarAuthorization> instead.
* @returns {Number}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getCalendarAuthorization
* <p>Gets the value of the {@link Titanium.Calendar#property-calendarAuthorization} property.</p>
* @returns {Number}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getAllAlerts
* <p>Gets the value of the {@link Titanium.Calendar#property-allAlerts} property.</p>
* @returns {Titanium.Calendar.Alert[]}
* @platform android 3.2.0
*/
/**
* @method getAllCalendars
* <p>Gets the value of the {@link Titanium.Calendar#property-allCalendars} property.</p>
* @returns {Titanium.Calendar.Calendar[]}
*/
/**
* @method getAllEditableCalendars
* <p>Gets the value of the {@link Titanium.Calendar#property-allEditableCalendars} property.</p>
* @returns {Titanium.Calendar.Calendar[]}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getSelectableCalendars
* <p>Gets the value of the {@link Titanium.Calendar#property-selectableCalendars} property.</p>
* @returns {Titanium.Calendar.Calendar[]}
* @platform android 3.2.0
*/
/**
* @method getDefaultCalendar
* <p>Gets the value of the {@link Titanium.Calendar#property-defaultCalendar} property.</p>
* @returns {Titanium.Calendar.Calendar}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property METHOD_ALERT
* @type Number
* @readonly
* <p>Reminder alert delivery method.</p>
* @description <p>Used with {@link Titanium.Calendar.Reminder}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Calendar#property-METHOD_ALERT METHOD_ALERT},
{@link Titanium.Calendar#property-METHOD_DEFAULT METHOD_DEFAULT},
{@link Titanium.Calendar#property-METHOD_EMAIL METHOD_EMAIL},
and {@link Titanium.Calendar#property-METHOD_SMS METHOD_SMS}.</p>
* @platform android 3.2.0
*/
/**
* @property METHOD_DEFAULT
* @type Number
* @readonly
* <p>Reminder default delivery method.</p>
* @description <p>Used with {@link Titanium.Calendar.Reminder}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Calendar#property-METHOD_ALERT METHOD_ALERT},
{@link Titanium.Calendar#property-METHOD_DEFAULT METHOD_DEFAULT},
{@link Titanium.Calendar#property-METHOD_EMAIL METHOD_EMAIL},
and {@link Titanium.Calendar#property-METHOD_SMS METHOD_SMS}.</p>
* @platform android 3.2.0
*/
/**
* @property METHOD_EMAIL
* @type Number
* @readonly
* <p>Reminder email delivery method.</p>
* @description <p>Used with {@link Titanium.Calendar.Reminder}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Calendar#property-METHOD_ALERT METHOD_ALERT},
{@link Titanium.Calendar#property-METHOD_DEFAULT METHOD_DEFAULT},
{@link Titanium.Calendar#property-METHOD_EMAIL METHOD_EMAIL},
and {@link Titanium.Calendar#property-METHOD_SMS METHOD_SMS}.</p>
* @platform android 3.2.0
*/
/**
* @property METHOD_SMS
* @type Number
* @readonly
* <p>Reminder SMS delivery method.</p>
* @description <p>Used with {@link Titanium.Calendar.Reminder}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Calendar#property-METHOD_ALERT METHOD_ALERT},
{@link Titanium.Calendar#property-METHOD_DEFAULT METHOD_DEFAULT},
{@link Titanium.Calendar#property-METHOD_EMAIL METHOD_EMAIL},
and {@link Titanium.Calendar#property-METHOD_SMS METHOD_SMS}.</p>
* @platform android 3.2.0
*/
/**
* @property STATE_DISMISSED
* @type Number
* @readonly
* <p>Alert dismissed state.</p>
* @description <p>Used with {@link Titanium.Calendar.Alert}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Calendar#property-STATE_DISMISSED STATE_DISMISSED},
{@link Titanium.Calendar#property-STATE_FIRED STATE_FIRED},
and {@link Titanium.Calendar#property-STATE_SCHEDULED STATE_SCHEDULED}.</p>
* @platform android 3.2.0
*/
/**
* @property STATE_FIRED
* @type Number
* @readonly
* <p>Alert fired state.</p>
* @description <p>Used with {@link Titanium.Calendar.Alert}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Calendar#property-STATE_DISMISSED STATE_DISMISSED},
{@link Titanium.Calendar#property-STATE_FIRED STATE_FIRED},
and {@link Titanium.Calendar#property-STATE_SCHEDULED STATE_SCHEDULED}.</p>
* @platform android 3.2.0
*/
/**
* @property STATE_SCHEDULED
* @type Number
* @readonly
* <p>Alert scheduled status.</p>
* @description <p>Used with {@link Titanium.Calendar.Alert}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Calendar#property-STATE_DISMISSED STATE_DISMISSED},
{@link Titanium.Calendar#property-STATE_FIRED STATE_FIRED},
and {@link Titanium.Calendar#property-STATE_SCHEDULED STATE_SCHEDULED}.</p>
* @platform android 3.2.0
*/
/**
* @property STATUS_NONE
* @type Number
* @readonly
* <p>Event has no status.</p>
* @description <p>A [event status]{@link Titanium.Calendar.Event#property-status} value.</p>
<p>One of the group of event "status" constants,
{@link Titanium.Calendar#property-STATUS_CANCELED STATUS_CANCELED},
{@link Titanium.Calendar#property-STATUS_CONFIRMED STATUS_CONFIRMED},
and {@link Titanium.Calendar#property-STATUS_TENTATIVE STATUS_TENTATIVE}.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property STATUS_CANCELLED
* @type Number
* @readonly
* <p>Event canceled status.</p>
* @deprecated 5.2.0 Use <Titanium.Calendar.STATUS_CANCELED> instead.
* @description <p>A [event status]{@link Titanium.Calendar.Event#property-status} value.</p>
<p>One of the group of event "status" constants,
{@link Titanium.Calendar#property-STATUS_NONE STATUS_NONE},
{@link Titanium.Calendar#property-STATUS_CANCELED STATUS_CANCELED},
{@link Titanium.Calendar#property-STATUS_CONFIRMED STATUS_CONFIRMED},
and {@link Titanium.Calendar#property-STATUS_TENTATIVE STATUS_TENTATIVE}.</p>
*/
/**
* @property STATUS_CANCELED
* @type Number
* @readonly
* <p>Event canceled status.</p>
* @description <p>A [event status]{@link Titanium.Calendar.Event#property-status} value.</p>
<p>One of the group of event "status" constants,
{@link Titanium.Calendar#property-STATUS_NONE STATUS_NONE},
{@link Titanium.Calendar#property-STATUS_CANCELED STATUS_CANCELED},
{@link Titanium.Calendar#property-STATUS_CONFIRMED STATUS_CONFIRMED},
and {@link Titanium.Calendar#property-STATUS_TENTATIVE STATUS_TENTATIVE}.</p>
*/
/**
* @property STATUS_CONFIRMED
* @type Number
* @readonly
* <p>Event confirmed status.</p>
* @description <p>A [event status]{@link Titanium.Calendar.Event#property-status} value.</p>
<p>One of the group of event "status" constants,
{@link Titanium.Calendar#property-STATUS_NONE STATUS_NONE},
{@link Titanium.Calendar#property-STATUS_CANCELED STATUS_CANCELED},
{@link Titanium.Calendar#property-STATUS_CONFIRMED STATUS_CONFIRMED},
and {@link Titanium.Calendar#property-STATUS_TENTATIVE STATUS_TENTATIVE}.</p>
*/
/**
* @property STATUS_TENTATIVE
* @type Number
* @readonly
* <p>Event tentative status.</p>
* @description <p>A [event status]{@link Titanium.Calendar.Event#property-status} value.</p>
<p>One of the group of event "status" constants,
{@link Titanium.Calendar#property-STATUS_NONE STATUS_NONE},
{@link Titanium.Calendar#property-STATUS_CANCELED STATUS_CANCELED},
{@link Titanium.Calendar#property-STATUS_CONFIRMED STATUS_CONFIRMED},
and {@link Titanium.Calendar#property-STATUS_TENTATIVE STATUS_TENTATIVE}.</p>
*/
/**
* @property AVAILABILITY_NOTSUPPORTED
* @type Number
* @readonly
* <p>Availability settings are not supported by the event's calendar.</p>
* @description <p>A {@link Titanium.Calendar.Event#property-availability event availability} value.</p>
<p>One of the group of event method constants,
{@link Titanium.Calendar#property-AVAILABILITY_NOTSUPPORTED AVAILABILITY_NOTSUPPORTED},
{@link Titanium.Calendar#property-AVAILABILITY_BUSY AVAILABILITY_BUSY},
{@link Titanium.Calendar#property-AVAILABILITY_FREE AVAILABILITY_FREE},
{@link Titanium.Calendar#property-AVAILABILITY_TENTATIVE AVAILABILITY_TENTATIVE},
and {@link Titanium.Calendar#property-AVAILABILITY_UNAVAILABLE AVAILABILITY_UNAVAILABLE}.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property AVAILABILITY_BUSY
* @type Number
* @readonly
* <p>Event has a busy availability setting.</p>
* @description <p>A {@link Titanium.Calendar.Event#property-availability event availability} value.</p>
<p>One of the group of event method constants,
{@link Titanium.Calendar#property-AVAILABILITY_NOTSUPPORTED AVAILABILITY_NOTSUPPORTED},
{@link Titanium.Calendar#property-AVAILABILITY_BUSY AVAILABILITY_BUSY},
{@link Titanium.Calendar#property-AVAILABILITY_FREE AVAILABILITY_FREE},
{@link Titanium.Calendar#property-AVAILABILITY_TENTATIVE AVAILABILITY_TENTATIVE},
and {@link Titanium.Calendar#property-AVAILABILITY_UNAVAILABLE AVAILABILITY_UNAVAILABLE}.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property AVAILABILITY_FREE
* @type Number
* @readonly
* <p>Event has a free availability setting.</p>
* @description <p>A {@link Titanium.Calendar.Event#property-availability event availability} value.</p>
<p>One of the group of event method constants,
{@link Titanium.Calendar#property-AVAILABILITY_NOTSUPPORTED AVAILABILITY_NOTSUPPORTED},
{@link Titanium.Calendar#property-AVAILABILITY_BUSY AVAILABILITY_BUSY},
{@link Titanium.Calendar#property-AVAILABILITY_FREE AVAILABILITY_FREE},
{@link Titanium.Calendar#property-AVAILABILITY_TENTATIVE AVAILABILITY_TENTATIVE},
and {@link Titanium.Calendar#property-AVAILABILITY_UNAVAILABLE AVAILABILITY_UNAVAILABLE}.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property AVAILABILITY_TENTATIVE
* @type Number
* @readonly
* <p>Event has a tentative availability setting.</p>
* @description <p>A {@link Titanium.Calendar.Event#property-availability event availability} value.</p>
<p>One of the group of event method constants,
{@link Titanium.Calendar#property-AVAILABILITY_NOTSUPPORTED AVAILABILITY_NOTSUPPORTED},
{@link Titanium.Calendar#property-AVAILABILITY_BUSY AVAILABILITY_BUSY},
{@link Titanium.Calendar#property-AVAILABILITY_FREE AVAILABILITY_FREE},
{@link Titanium.Calendar#property-AVAILABILITY_TENTATIVE AVAILABILITY_TENTATIVE},
and {@link Titanium.Calendar#property-AVAILABILITY_UNAVAILABLE AVAILABILITY_UNAVAILABLE}.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property AVAILABILITY_UNAVAILABLE
* @type Number
* @readonly
* <p>Event has a tentative availability setting.</p>
* @description <p>A {@link Titanium.Calendar.Event#property-availability event availability} value.</p>
<p>One of the group of event method constants,
{@link Titanium.Calendar#property-AVAILABILITY_NOTSUPPORTED AVAILABILITY_NOTSUPPORTED},
{@link Titanium.Calendar#property-AVAILABILITY_BUSY AVAILABILITY_BUSY},
{@link Titanium.Calendar#property-AVAILABILITY_FREE AVAILABILITY_FREE},
{@link Titanium.Calendar#property-AVAILABILITY_TENTATIVE AVAILABILITY_TENTATIVE},
and {@link Titanium.Calendar#property-AVAILABILITY_UNAVAILABLE AVAILABILITY_UNAVAILABLE}.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property AUTHORIZATION_AUTHORIZED
* @type Number
* @readonly
* <p>A {@link Titanium.Calendar#property-eventsAuthorization eventsAuthorization} value
indicating that the application is authorized to use events in the Calendar.</p>
* @description <p>This value is always returned if the device is running an iOS release prior to 6.0.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property AUTHORIZATION_DENIED
* @type Number
* @readonly
* <p>A {@link Titanium.Calendar#property-eventsAuthorization eventsAuthorization} value
indicating that the application is not authorized to use events in the Calendar.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property AUTHORIZATION_RESTRICTED
* @type Number
* @readonly
* <p>A {@link Titanium.Calendar#property-eventsAuthorization eventsAuthorization} value
indicating that the application is not authorized to use events in the Calendar.
the user cannot change this application's status.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property AUTHORIZATION_UNKNOWN
* @type Number
* @readonly
* <p>A {@link Titanium.Calendar#property-eventsAuthorization eventsAuthorization} value
indicating that the authorization state is unknown.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property SPAN_THISEVENT
* @type Number
* @readonly
* <p>A {@link Titanium.Calendar.Event#method-save save}/{@link Titanium.Calendar.Event#method-remove remove} event value,
indicating modifications to this event instance should affect only this instance.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property SPAN_FUTUREEVENTS
* @type Number
* @readonly
* <p>A {@link Titanium.Calendar.Event#method-save save}/{@link Titanium.Calendar.Event#method-remove remove} event value,
indicating modifications to this event instance should also affect future instances of this event.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property RECURRENCEFREQUENCY_DAILY
* @type Number
* @readonly
* <p>Indicates a daily recurrence rule for a events reccurance frequency.</p>
* @description <p>Used with the {@link Titanium.Calendar.RecurrenceRule#property-frequency} property.</p>
<p>One of the group of event "frequency" constants
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_DAILY RECURRENCEFREQUENCY_DAILY},
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_WEEKLY RECURRENCEFREQUENCY_WEEKLY},
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_MONTHLY RECURRENCEFREQUENCY_MONTHLY},
and {@link Titanium.Calendar#property-RECURRENCEFREQUENCY_YEARLY RECURRENCEFREQUENCY_YEARLY}.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property RECURRENCEFREQUENCY_WEEKLY
* @type Number
* @readonly
* <p>Indicates a weekly recurrence rule for a events reccurance frequency.</p>
* @description <p>Used with the {@link Titanium.Calendar.RecurrenceRule#property-frequency} property.</p>
<p>One of the group of event "frequency" constants
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_DAILY RECURRENCEFREQUENCY_DAILY},
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_WEEKLY RECURRENCEFREQUENCY_WEEKLY},
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_MONTHLY RECURRENCEFREQUENCY_MONTHLY},
and {@link Titanium.Calendar#property-RECURRENCEFREQUENCY_YEARLY RECURRENCEFREQUENCY_YEARLY}.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property RECURRENCEFREQUENCY_MONTHLY
* @type Number
* @readonly
* <p>Indicates a monthly recurrence rule for a events reccurance frequency.</p>
* @description <p>Used with the {@link Titanium.Calendar.RecurrenceRule#property-frequency} property.</p>
<p>One of the group of event "frequency" constants
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_DAILY RECURRENCEFREQUENCY_DAILY},
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_WEEKLY RECURRENCEFREQUENCY_WEEKLY},
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_MONTHLY RECURRENCEFREQUENCY_MONTHLY},
and {@link Titanium.Calendar#property-RECURRENCEFREQUENCY_YEARLY RECURRENCEFREQUENCY_YEARLY}.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property RECURRENCEFREQUENCY_YEARLY
* @type Number
* @readonly
* <p>Indicates a yearly recurrence rule for a events reccurance frequency.</p>
* @description <p>Used with the {@link Titanium.Calendar.RecurrenceRule#property-frequency} property.</p>
<p>One of the group of event "frequency" constants
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_DAILY RECURRENCEFREQUENCY_DAILY},
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_WEEKLY RECURRENCEFREQUENCY_WEEKLY},
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_MONTHLY RECURRENCEFREQUENCY_MONTHLY},
and {@link Titanium.Calendar#property-RECURRENCEFREQUENCY_YEARLY RECURRENCEFREQUENCY_YEARLY}.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property VISIBILITY_CONFIDENTIAL
* @type Number
* @readonly
* <p>Event confidential visibility.</p>
* @description <p>Used with {@link Titanium.Calendar.Event}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Calendar#property-VISIBILITY_CONFIDENTIAL VISIBILITY_CONFIDENTIAL},
{@link Titanium.Calendar#property-VISIBILITY_DEFAULT VISIBILITY_DEFAULT},
{@link Titanium.Calendar#property-VISIBILITY_PRIVATE VISIBILITY_PRIVATE},
and {@link Titanium.Calendar#property-VISIBILITY_PUBLIC VISIBILITY_PUBLIC}.</p>
* @platform android 3.2.0
*/
/**
* @property VISIBILITY_DEFAULT
* @type Number
* @readonly
* <p>Event default visibility.</p>
* @description <p>Used with {@link Titanium.Calendar.Event}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Calendar#property-VISIBILITY_CONFIDENTIAL VISIBILITY_CONFIDENTIAL},
{@link Titanium.Calendar#property-VISIBILITY_DEFAULT VISIBILITY_DEFAULT},
{@link Titanium.Calendar#property-VISIBILITY_PRIVATE VISIBILITY_PRIVATE},
and {@link Titanium.Calendar#property-VISIBILITY_PUBLIC VISIBILITY_PUBLIC}.</p>
* @platform android 3.2.0
*/
/**
* @property VISIBILITY_PRIVATE
* @type Number
* @readonly
* <p>Event private visibility.</p>
* @description <p>Used with {@link Titanium.Calendar.Event}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Calendar#property-VISIBILITY_CONFIDENTIAL VISIBILITY_CONFIDENTIAL},
{@link Titanium.Calendar#property-VISIBILITY_DEFAULT VISIBILITY_DEFAULT},
{@link Titanium.Calendar#property-VISIBILITY_PRIVATE VISIBILITY_PRIVATE},
and {@link Titanium.Calendar#property-VISIBILITY_PUBLIC VISIBILITY_PUBLIC}.</p>
* @platform android 3.2.0
*/
/**
* @property VISIBILITY_PUBLIC
* @type Number
* @readonly
* <p>Event public visibility.</p>
* @description <p>Used with {@link Titanium.Calendar.Event}.</p>
<p>One of the group of reminder method constants,
{@link Titanium.Calendar#property-VISIBILITY_CONFIDENTIAL VISIBILITY_CONFIDENTIAL},
{@link Titanium.Calendar#property-VISIBILITY_DEFAULT VISIBILITY_DEFAULT},
{@link Titanium.Calendar#property-VISIBILITY_PRIVATE VISIBILITY_PRIVATE},
and {@link Titanium.Calendar#property-VISIBILITY_PUBLIC VISIBILITY_PUBLIC}.</p>
* @platform android 3.2.0
*/
/**
* @property ATTENDEE_STATUS_UNKNOWN
* @type Number
* @readonly
* <p>Attendee status is unknown.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_STATUS_PENDING
* @type Number
* @readonly
* <p>Attendee status is pending.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_STATUS_ACCEPTED
* @type Number
* @readonly
* <p>Attendee status is accepted.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_STATUS_DECLINED
* @type Number
* @readonly
* <p>Attendee status is declined.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_STATUS_TENTATIVE
* @type Number
* @readonly
* <p>Attendee status is tentative.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_STATUS_DELEGATED
* @type Number
* @readonly
* <p>Attendee status is delegated.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_STATUS_IN_PROCESS
* @type Number
* @readonly
* <p>Attendee status is in process.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_ROLE_UNKNOWN
* @type Number
* @readonly
* <p>Attendee role is unknown.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_ROLE_OPTIONAL
* @type Number
* @readonly
* <p>Attendee role is optional.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_ROLE_REQUIRED
* @type Number
* @readonly
* <p>Attendee role is required.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_ROLE_CHAIR
* @type Number
* @readonly
* <p>Attendee role is chair.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_ROLE_NON_PARTICIPANT
* @type Number
* @readonly
* <p>Attendee is not a participant.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_TYPE_UNKNOWN
* @type Number
* @readonly
* <p>Attendee type is unknown.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_TYPE_PERSON
* @type Number
* @readonly
* <p>Attendee type is person.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_TYPE_ROOM
* @type Number
* @readonly
* <p>Attendee type is room.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_TYPE_RESOURCE
* @type Number
* @readonly
* <p>Attendee type is resource.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ATTENDEE_TYPE_GROUP
* @type Number
* @readonly
* <p>Attendee type is group.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property SOURCE_TYPE_LOCAL
* @type Number
* @readonly
* <p>A local calendar source.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property SOURCE_TYPE_EXCHANGE
* @type Number
* @readonly
* <p>A microsoft exchange calendar source.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property SOURCE_TYPE_CALDAV
* @type Number
* @readonly
* <p>A calDev calendar source.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property SOURCE_TYPE_MOBILEME
* @type Number
* @readonly
* <p>A mobileMe calendar source.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property SOURCE_TYPE_SUBSCRIBED
* @type Number
* @readonly
* <p>A subscribed calendar source.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property SOURCE_TYPE_BIRTHDAYS
* @type Number
* @readonly
* <p>A birthday calendar source.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property eventsAuthorization
* @type Number
* @readonly
* <p>Returns an authorization constant indicating if the application has access to the events in the EventKit.</p>
* @deprecated 5.2.0 Use <Titanium.Calendar.calendarAuthorization> instead.
* @description <p>Always returns <code>AUTHORIZATION_AUTHORIZED</code> on iOS pre-6.0.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-AUTHORIZATION_AUTHORIZED}
<li> {@link Titanium.Calendar#property-AUTHORIZATION_DENIED}
<li> {@link Titanium.Calendar#property-AUTHORIZATION_RESTRICTED}
<li> {@link Titanium.Calendar#property-AUTHORIZATION_UNKNOWN}
</ul></p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property calendarAuthorization
* @type Number
* @readonly
* <p>Returns an authorization constant indicating if the application has access to the events in the EventKit.</p>
* @description <p>Always returns <code>AUTHORIZATION_AUTHORIZED</code> on iOS pre-6.0.
type: Number</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-AUTHORIZATION_AUTHORIZED}
<li> {@link Titanium.Calendar#property-AUTHORIZATION_DENIED}
<li> {@link Titanium.Calendar#property-AUTHORIZATION_RESTRICTED}
<li> {@link Titanium.Calendar#property-AUTHORIZATION_UNKNOWN}
</ul></p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property allAlerts
* @type Titanium.Calendar.Alert[]
* @readonly
* <p>All alerts in selected calendars.</p>
* @platform android 3.2.0
*/
/**
* @property allCalendars
* @type Titanium.Calendar.Calendar[]
* @readonly
* <p>All calendars known to the native calendar app.</p>
*/
/**
* @property allEditableCalendars
* @type Titanium.Calendar.Calendar[]
* @readonly
* <p>All calendars known to the native calendar app that can add, edit, and
delete items in the calendar.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property selectableCalendars
* @type Titanium.Calendar.Calendar[]
* @readonly
* <p>All calendars selected within the native calendar app, which may be a subset of <code>allCalendars</code>. </p>
* @description <p>The native calendar application may know via the registered webservices, such as Gooogle or
Facebook accounts about calendars that it has access to but have not been selected to be
displayed in the native calendar app.</p>
* @platform android 3.2.0
*/
/**
* @property defaultCalendar
* @type Titanium.Calendar.Calendar
* @readonly
* <p>Calendar that events are added to by default, as specified by user settings.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @class EventsAuthorizationResponse
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/Calendar.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates whether the request succeeded.</p>
* @description <p>Returns <code>true</code> if request succeeded.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>May be undefined if <code>success</code> is <code>true</code>.</p>
*/
/**
* @property code
* @type Number
* <p>Error code, if any returned.</p>
* @description <p>May be undefined if <code>success</code> is <code>true</code>.</p>
*/
/**
* @class Titanium.Calendar.Calendar
* @platform android 3.2.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/CalendarProxy.yml
* <p>An object that represents a single calendar.</p>
*/
/**
* @method createEvent
* <p>Creates an event in this calendar.</p>
* @param {Dictionary<Titanium.Calendar.Event>} properties
<p>Properties of the event</p>
* @returns {Titanium.Calendar.Event}
*/
/**
* @method getEventById
* <p>Gets the event with the specified identifier.</p>
* @param {Number} id
<p>Identifier of the event.</p>
* @returns {Titanium.Calendar.Event}
*/
/**
* @method getEventsBetweenDates
* <p>Gets events that occur between two dates.</p>
* @param {Date/String} date1
<p>Start date.</p>
* @param {Date/String} date2
<p>End date.</p>
* @returns {Titanium.Calendar.Event[]}
*/
/**
* @method getEventsInDate
* <p>Gets events that occur on a specified date.</p>
* @param {Number} year
<p>Year of the events.</p>
* @param {Number} month
<p>Month of the events, as a zero-based integer with January at 0 and December at 11.</p>
* @param {Number} day
<p>Day of the month of the events.</p>
* @returns {Titanium.Calendar.Event[]}
*/
/**
* @method getEventsInMonth
* <p>Gets events that occur during a specified month.</p>
* @param {Number} year
<p>Year of the events.</p>
* @param {Number} month
<p>Month of the events, as a zero-based integer with January at 0 and December at 11.</p>
* @returns {Titanium.Calendar.Event[]}
*/
/**
* @method getEventsInYear
* <p>Gets all events that occur during a specified year.</p>
* @param {Number} year
<p>Year of the events.</p>
* @returns {Titanium.Calendar.Event[]}
*/
/**
* @method getHidden
* <p>Gets the value of the {@link Titanium.Calendar.Calendar#property-hidden} property.</p>
* @returns {Boolean}
*/
/**
* @method getId
* <p>Gets the value of the {@link Titanium.Calendar.Calendar#property-id} property.</p>
* @returns {String}
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.Calendar.Calendar#property-name} property.</p>
* @returns {String}
*/
/**
* @method getSelected
* <p>Gets the value of the {@link Titanium.Calendar.Calendar#property-selected} property.</p>
* @returns {Boolean}
* @platform android 3.2.0
*/
/**
* @method getSourceTitle
* <p>Gets the value of the {@link Titanium.Calendar.Calendar#property-sourceTitle} property.</p>
* @returns {String}
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @method getSourceType
* <p>Gets the value of the {@link Titanium.Calendar.Calendar#property-sourceType} property.</p>
* @returns {Number}
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @method getSourceIdentifier
* <p>Gets the value of the {@link Titanium.Calendar.Calendar#property-sourceIdentifier} property.</p>
* @returns {String}
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property hidden
* @type Boolean
* @readonly
* <p>Indicates whether this calendar can be edited or deleted.</p>
* @description <p>This property is <code>true</code> when this calendar is editable.</p>
*/
/**
* @property id
* @type String
* @readonly
* <p>Identifier of this calendar. Available only in iOS 5.0 and above.</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
*/
/**
* @property name
* @type String
* @readonly
* <p>Display name of this calendar.</p>
*/
/**
* @property selected
* @type Boolean
* @readonly
* <p>Indicates whether the calendar is selected.</p>
* @description <p>Set to <code>true</code> when this calendar is selected.</p>
<p>See {@link Titanium.Calendar} for examples.</p>
* @platform android 3.2.0
*/
/**
* @property sourceTitle
* @type String
* @readonly
* <p>Displays the source title.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property sourceType
* @type Number
* @readonly
* <p>Displays the source type.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-SOURCE_TYPE_LOCAL}
<li> {@link Titanium.Calendar#property-SOURCE_TYPE_EXCHANGE}
<li> {@link Titanium.Calendar#property-SOURCE_TYPE_CALDAV}
<li> {@link Titanium.Calendar#property-SOURCE_TYPE_MOBILEME}
<li> {@link Titanium.Calendar#property-SOURCE_TYPE_SUBSCRIBED}
<li> {@link Titanium.Calendar#property-SOURCE_TYPE_BIRTHDAYS}
</ul></p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property sourceIdentifier
* @type String
* @readonly
* <p>Displays the source identifier.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @class Titanium.Calendar.Event
* @platform android 3.2.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/Event.yml
* <p>An object that represents a single event in a calendar.</p>
* @description <p>The API supports retrieving information about existing events and creating new events. <br>
Be aware that modifying or deleting existing events and creating recurring rules for events
are only supported on iOS.</p>
<p>See {@link Titanium.Calendar} for examples of retrieving event information and creating events.</p>
*/
/**
* @method createAlert
* <p>Creates an alert for this event.</p>
* @param {Dictionary<Titanium.Calendar.Alert>} data
<p>Properties for the alert.</p>
* @returns {Titanium.Calendar.Alert}
*/
/**
* @method createReminder
* <p>Creates a reminder for this event.</p>
* @param {Dictionary<Titanium.Calendar.Reminder>} data
<p>Properties for the reminder.</p>
* @returns {Titanium.Calendar.Reminder}
* @platform android 3.2.0
*/
/**
* @method getExtendedProperty
* <p>Gets the value of the specified extended property.</p>
* @param {String} name
<p>Name of an existing extended property.</p>
* @returns {String}
* @platform android 3.2.0
*/
/**
* @method setExtendedProperty
* <p>Sets the value of the specified extended property.</p>
* @param {String} name
<p>Property name.</p>
* @param {String} value
<p>Property value.</p>
* @platform android 3.2.0
*/
/**
* @method createRecurrenceRule
* <p>Creates an recurrence pattern for a recurring event.
All of the properties for the recurrence rule must be set during creation.
The recurrence rule properties cannot be modified.</p>
* @param {Dictionary<Titanium.Calendar.RecurrenceRule>} data
<p>Properties for the recurrence rule.</p>
* @returns {Titanium.Calendar.RecurrenceRule}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method save
* <p>Saves changes to an event permanently.</p>
* @description <p>This method raises an exception if it is passed an event from another event store. </p>
<p>When an event is saved, it is updated in the Calendar database. Any fields you did
not modify are updated to reflect the most recent value in the database. If the
event has been deleted from the database, it is re-created as a new event.</p>
* @param {Number} span
<p>The span to use. Indicates whether the save affects future instances of the
event in the case of a recurring event.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-SPAN_THISEVENT}
<li> {@link Titanium.Calendar#property-SPAN_FUTUREEVENTS}
</ul></p>
* @returns {Boolean}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method remove
* <p>Removes an event from the event store.</p>
* @description <p>This method raises an exception if it is passed an event from another event store.</p>
* @param {Number} span
<p>The span to use. Indicates whether to remove future instances of the event in
the case of a recurring event.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-SPAN_THISEVENT}
<li> {@link Titanium.Calendar#property-SPAN_FUTUREEVENTS}
</ul></p>
* @returns {Boolean}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method refresh
* <p>Updates the event's data with the current information in the Calendar database.</p>
* @description <p>This method should be only used on events that your application is editing, and only
when your application receives the {@link Titanium.Calendar#event-change change} notification.
If this method returns NO, the event has been deleted or otherwise invalidated,
and you should not continue to use it. </p>
* @returns {Boolean}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method addRecurrenceRule
* <p>Adds a recurrence rule to the recurrence rule array.</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @param {Titanium.Calendar.RecurrenceRule} rule
<p>The recurrence rule to be added.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method removeRecurrenceRule
* <p>Removes a recurrence rule to the recurrence rule array.</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @param {Titanium.Calendar.RecurrenceRule} rule
<p>The recurrence rule to be removed.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getAlerts
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-alerts} property.</p>
* @returns {Titanium.Calendar.Alert[]}
*/
/**
* @method setAlerts
* <p>Sets the value of the {@link Titanium.Calendar.Event#property-alerts} property.</p>
* @param {Array<Titanium.Calendar.Alert>} alerts
<p>New value for the property.</p>
*/
/**
* @method getAllDay
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-allDay} property.</p>
* @returns {Boolean}
*/
/**
* @method setAllDay
* <p>Sets the value of the {@link Titanium.Calendar.Event#property-allDay} property.</p>
* @param {Boolean} allDay
<p>New value for the property.</p>
*/
/**
* @method getBegin
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-begin} property.</p>
* @returns {Date}
*/
/**
* @method setBegin
* <p>Sets the value of the {@link Titanium.Calendar.Event#property-begin} property.</p>
* @param {Date} begin
<p>New value for the property.</p>
*/
/**
* @method getNotes
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-notes} property.</p>
* @returns {String}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method setNotes
* <p>Sets the value of the {@link Titanium.Calendar.Event#property-notes} property.</p>
* @param {String} notes
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getDescription
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-description} property.</p>
* @returns {String}
* @platform android 3.2.0
*/
/**
* @method getEnd
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-end} property.</p>
* @returns {Date}
*/
/**
* @method setEnd
* <p>Sets the value of the {@link Titanium.Calendar.Event#property-end} property.</p>
* @param {Date} end
<p>New value for the property.</p>
*/
/**
* @method getExtendedProperties
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-extendedProperties} property.</p>
* @returns {Dictionary}
* @platform android 3.2.0
*/
/**
* @method getHasAlarm
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-hasAlarm} property.</p>
* @returns {Boolean}
*/
/**
* @method getId
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-id} property.</p>
* @returns {String}
*/
/**
* @method getLocation
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-location} property.</p>
* @returns {String}
*/
/**
* @method setLocation
* <p>Sets the value of the {@link Titanium.Calendar.Event#property-location} property.</p>
* @param {String} location
<p>New value for the property.</p>
*/
/**
* @method getReminders
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-reminders} property.</p>
* @returns {Titanium.Calendar.Reminder[]}
* @platform android 3.2.0
*/
/**
* @method getStatus
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-status} property.</p>
* @returns {Number}
*/
/**
* @method getAvailability
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-availability} property.</p>
* @returns {Number}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getIsDetached
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-isDetached} property.</p>
* @returns {Boolean}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.Calendar.Event#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getRecurrenceRule
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-recurrenceRule} property.</p>
* @removed 3.2.0
* @returns {Titanium.Calendar.RecurrenceRule}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method setRecurrenceRule
* <p>Sets the value of the {@link Titanium.Calendar.Event#property-recurrenceRule} property.</p>
* @removed 3.2.0
* @param {Titanium.Calendar.RecurrenceRule} recurrenceRule
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getRecurrenceRules
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-recurrenceRules} property.</p>
* @returns {Titanium.Calendar.RecurrenceRule[]}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method setRecurrenceRules
* <p>Sets the value of the {@link Titanium.Calendar.Event#property-recurrenceRules} property.</p>
* @param {Array<Titanium.Calendar.RecurrenceRule>} recurrenceRules
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getVisibility
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-visibility} property.</p>
* @returns {Number}
* @platform android 3.2.0
*/
/**
* @method getAttendees
* <p>Gets the value of the {@link Titanium.Calendar.Event#property-attendees} property.</p>
* @returns {Titanium.Calendar.Attendee[]}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property alerts
* @type Titanium.Calendar.Alert[]
* <p>Alarms associated with the calendar item, as an array of {@link Titanium.Calendar.Alert} objects.</p>
* @description <p>This property is read-only on Android.</p>
*/
/**
* @property [allDay=false]
* @type Boolean
* <p>Indicates whether this event is all day.</p>
* @description <p>This property is read-only on Android.</p>
*/
/**
* @property begin
* @type Date
* <p>Start date/time of this event.</p>
* @description <p>This property is read-only on Android.</p>
*/
/**
* @property notes
* @type String
* <p>Notes for this event.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property description
* @type String
* @readonly
* <p>Description of this event.</p>
* @platform android 3.2.0
*/
/**
* @property end
* @type Date
* <p>End date/time of this event.</p>
* @description <p>This property is read-only on Android.</p>
*/
/**
* @property extendedProperties
* @type Dictionary
* @readonly
* <p>Extended properties of this event.</p>
* @platform android 3.2.0
*/
/**
* @property hasAlarm
* @type Boolean
* @readonly
* <p>Indicates whether an alarm is scheduled for this event.</p>
*/
/**
* @property id
* @type String
* @readonly
* <p>Identifier of this event.</p>
*/
/**
* @property location
* @type String
* <p>Location of this event.</p>
* @description <p>This property is read-only on Android.</p>
*/
/**
* @property reminders
* @type Titanium.Calendar.Reminder[]
* @readonly
* <p>Existing reminders for this event.</p>
* @platform android 3.2.0
*/
/**
* @property status
* @type Number
* @readonly
* <p>Status of this event.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-STATUS_NONE}
<li> {@link Titanium.Calendar#property-STATUS_CANCELLED}
<li> {@link Titanium.Calendar#property-STATUS_CANCELED}
<li> {@link Titanium.Calendar#property-STATUS_CONFIRMED}
<li> {@link Titanium.Calendar#property-STATUS_TENTATIVE}
</ul></p>
*/
/**
* @property availability
* @type Number
* @readonly
* <p>Availability of this event.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-AVAILABILITY_NOTSUPPORTED}
<li> {@link Titanium.Calendar#property-AVAILABILITY_BUSY}
<li> {@link Titanium.Calendar#property-AVAILABILITY_FREE}
<li> {@link Titanium.Calendar#property-AVAILABILITY_TENTATIVE}
<li> {@link Titanium.Calendar#property-AVAILABILITY_UNAVAILABLE}
</ul></p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property isDetached
* @type Boolean
* @readonly
* <p>Boolean value that indicates whether an event is a detached instance of a
repeating event.</p>
* @description <p>This value is <code>YES</code> if and only if the event is part of a repeating event
and one or more of its attributes have been modified from the repeating event's
default attributes.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property title
* @type String
* <p>Title of this event.</p>
* @description <p>This property is read-only on Android.</p>
*/
/**
* @property recurrenceRule
* @type Titanium.Calendar.RecurrenceRule
* <p>Recurrence rule associated with the event. (Available in iOS 4.0 through iOS 5.1.)</p>
* @removed 3.2.0
* <p> <b>Requires:</b>
iOS 5.0 and earlier
</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property recurrenceRules
* @type Titanium.Calendar.RecurrenceRule[]
* <p>The recurrence rules for the calendar item. (Available in iOS 5.1 and above.)</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property visibility
* @type Number
* @readonly
* <p>Visibility of this event.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-VISIBILITY_CONFIDENTIAL}
<li> {@link Titanium.Calendar#property-VISIBILITY_DEFAULT}
<li> {@link Titanium.Calendar#property-VISIBILITY_PRIVATE}
<li> {@link Titanium.Calendar#property-VISIBILITY_PUBLIC}
</ul></p>
* @platform android 3.2.0
*/
/**
* @property attendees
* @type Titanium.Calendar.Attendee[]
* @readonly
* <p>The list of event attendees. This list will be empty if the event has no attendees.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @class Titanium.Calendar.RecurrenceRule
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/RecurrenceRule.yml
* <p>An object that is used to describe the recurrence pattern for a recurring event.</p>
*/
/**
* @method getCalendarID
* <p>Gets the value of the {@link Titanium.Calendar.RecurrenceRule#property-calendarID} property.</p>
* @returns {String}
*/
/**
* @method getFrequency
* <p>Gets the value of the {@link Titanium.Calendar.RecurrenceRule#property-frequency} property.</p>
* @returns {Number}
*/
/**
* @method getInterval
* <p>Gets the value of the {@link Titanium.Calendar.RecurrenceRule#property-interval} property.</p>
* @returns {Number}
*/
/**
* @method getDaysOfTheWeek
* <p>Gets the value of the {@link Titanium.Calendar.RecurrenceRule#property-daysOfTheWeek} property.</p>
* @returns {daysOfTheWeekDictionary}
*/
/**
* @method getDaysOfTheMonth
* <p>Gets the value of the {@link Titanium.Calendar.RecurrenceRule#property-daysOfTheMonth} property.</p>
* @returns {Number[]}
*/
/**
* @method getMonthsOfTheYear
* <p>Gets the value of the {@link Titanium.Calendar.RecurrenceRule#property-monthsOfTheYear} property.</p>
* @returns {Number[]}
*/
/**
* @method getWeeksOfTheYear
* <p>Gets the value of the {@link Titanium.Calendar.RecurrenceRule#property-weeksOfTheYear} property.</p>
* @returns {Number[]}
*/
/**
* @method getDaysOfTheYear
* <p>Gets the value of the {@link Titanium.Calendar.RecurrenceRule#property-daysOfTheYear} property.</p>
* @returns {Number[]}
*/
/**
* @method getSetPositions
* <p>Gets the value of the {@link Titanium.Calendar.RecurrenceRule#property-setPositions} property.</p>
* @returns {Number[]}
*/
/**
* @method getEnd
* <p>Gets the value of the {@link Titanium.Calendar.RecurrenceRule#property-end} property.</p>
* @returns {recurrenceEndDictionary}
*/
/**
* @property calendarID
* @type String
* @readonly
* <p>Identifier for the recurrence rule's calendar.</p>
*/
/**
* @property frequency
* @type Number
* @readonly
* <p>Frequency of the recurrence rule.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-RECURRENCEFREQUENCY_DAILY}
<li> {@link Titanium.Calendar#property-RECURRENCEFREQUENCY_WEEKLY}
<li> {@link Titanium.Calendar#property-RECURRENCEFREQUENCY_MONTHLY}
<li> {@link Titanium.Calendar#property-RECURRENCEFREQUENCY_YEARLY}
</ul></p>
*/
/**
* @property [interval=1]
* @type Number
* @readonly
* <p>The interval between instances of this recurrence. For example, a weekly
recurrence rule with an interval of 2 occurs every other week. Must be greater than 0.</p>
*/
/**
* @property daysOfTheWeek
* @type daysOfTheWeekDictionary
* @readonly
* <p>The days of the week that the event occurs, as an Dictionay of <code>daysOfWeek</code> and <code>Week</code>. </p>
*/
/**
* @property daysOfTheMonth
* @type Number[]
* @readonly
* <p>The days of the month that the event occurs, as an array of number objects.
Values can be from 1 to 31 and from -1 to -31. This parameter is only valid for
recurrence rules of type
{@link Titanium.Calendar#property-RECURRENCEFREQUENCY_MONTHLY RECURRENCEFREQUENCY_MONTHLY}.</p>
*/
/**
* @property monthsOfTheYear
* @type Number[]
* @readonly
* <p>The months of the year that the event occurs, as an array of Number objects.
Values can be from 1 to 12. This parameter is only valid for recurrence rules of
type {@link Titanium.Calendar#property-RECURRENCEFREQUENCY_YEARLY RECURRENCEFREQUENCY_YEARLY}.</p>
*/
/**
* @property weeksOfTheYear
* @type Number[]
* @readonly
* <p>The weeks of the year that the event occurs, as an array of number objects.
Values can be from 1 to 53 and from -1 to -53. This parameter is only valid for
recurrence rules of type {@link Titanium.Calendar#property-RECURRENCEFREQUENCY_YEARLY RECURRENCEFREQUENCY_YEARLY}.</p>
*/
/**
* @property daysOfTheYear
* @type Number[]
* @readonly
* <p>The days of the year that the event occurs, as an array of number objects.
Values can be from 1 to 366 and from -1 to -366. This parameter is only valid for
recurrence rules of type {@link Titanium.Calendar#property-RECURRENCEFREQUENCY_YEARLY RECURRENCEFREQUENCY_YEARLY}.</p>
*/
/**
* @property setPositions
* @type Number[]
* @readonly
* <p>An array of ordinal numbers that filters which recurrences to include in the
recurrence rule's frequency. For example, a yearly recurrence rule that has a
{@link Titanium.Calendar.RecurrenceRule#property-daysOfTheWeek daysOfTheWeek} value that specifies
Monday through Friday, and a <code>setPositions</code> array containing 2 and -1, occurs only
on the second weekday and last weekday of every year. </p>
*/
/**
* @property end
* @type recurrenceEndDictionary
* @readonly
* <p>End of a recurrence rule.</p>
* @description <p>The recurrence end can be specified by a date (date-based) or by a maximum count
of occurrences (count-based). An event which is set to never end <strong>should not</strong>
have its <code>recurrenceEnd set. Either</code>endDate<code>or</code>occurrenceCount` property will be
present.</p>
*/
/**
* @class daysOfTheWeekDictionary
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/RecurrenceRule.yml
* <p>Dictionary containing <code>daysOfWeek</code> and <code>week</code>.</p>
*/
/**
* @property daysOfWeek
* @type Number
* <p>The day of the week. Values are from 1 to 7, with Sunday being 1.</p>
*/
/**
* @property week
* @type Number
* <p>The week number of the day of the week.
Values range from -53 to 53. A negative value indicates a value from the end of
the range. 0 indicates the week number is irrelevant.</p>
*/
/**
* @class recurrenceEndDictionary
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/RecurrenceRule.yml
* <p>Dictionary containing either <code>endDate</code> or <code>occurrenceCount</code> property.</p>
*/
/**
* @property endDate
* @type Date
* <p>End date of the recurrence end, or undefined if the recurrence end is count-based.</p>
*/
/**
* @property occurrenceCount
* @type Number
* <p>Occurrence count of the recurrence end, or 0 if the recurrence end is date-based.</p>
*/
/**
* @class Titanium.Calendar.Reminder
* @platform android 3.2.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/Reminder.yml
* <p>An object that represents a single reminder for an event in a calendar.</p>
* @description <p>Reminders should be created using the {@link Titanium.Calendar.Event#method-createReminder} method
rather than directly.</p>
<p>See {@link Titanium.Calendar} for examples of retrieving reminder information and creating
reminders for events.</p>
*/
/**
* @method getId
* <p>Gets the value of the {@link Titanium.Calendar.Reminder#property-id} property.</p>
* @returns {String}
*/
/**
* @method getMethod
* <p>Gets the value of the {@link Titanium.Calendar.Reminder#property-method} property.</p>
* @returns {Number}
*/
/**
* @method getMinutes
* <p>Gets the value of the {@link Titanium.Calendar.Reminder#property-minutes} property.</p>
* @returns {Number}
*/
/**
* @property id
* @type String
* @readonly
* <p>Identifier of this reminder.</p>
*/
/**
* @property method
* @type Number
* @readonly
* <p>Method by which this reminder will be delivered.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Calendar#property-METHOD_ALERT}
<li> {@link Titanium.Calendar#property-METHOD_DEFAULT}
<li> {@link Titanium.Calendar#property-METHOD_EMAIL}
<li> {@link Titanium.Calendar#property-METHOD_SMS}
</ul></p>
*/
/**
* @property minutes
* @type Number
* @readonly
* <p>Reminder notice period in minutes, that determines how long prior to the event this reminder
should trigger.</p>
*/
/**
* @class Titanium.Codec
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Codec/Codec.yml
* <p>A module for translating between primitive types and raw byte streams.</p>
* @description <p>The <code>Codec</code> module can be used for encoding strings and numbers into {@link Titanium.Buffer Buffer}
objects, and decoding primitive types from buffers. </p>
<h4>Byte Order</h4>
<p>Multi-byte data can be stored in two different byte orders: big-endian or
little-endian. In big-endian byte order, the most significant or highest-value
byte is stored first. For example, the 4-byte integer 0xFEDCBA98 is made up of the
bytes 0xFE, 0xDC, 0xBA and 0x98, from most-significant to least-significant. </p>
<p>If we represent a buffer as an array of byte values, a big-endian encoding of
0xFEDCBA98 would look like this:</p>
<pre><code>[ 0xFE, 0xDC, 0xBA, 0x98 ]
</code></pre>
<p>In little-endian order, the bytes would be stored in this order:</p>
<pre><code>[ 0x98, 0xBA, 0xDC, 0xFE ]
</code></pre>
<p>For 8-bit character encodings, including ASCII, Latin-1 and UTF-8, byte order is not
significant: the text is a sequence of individual bytes.</p>
<p>For UTF-16, text is represented as a sequence of 16-bit values. For example,
a capital T in UTF-16 is 0x0054, and lowercase i is 0x0069. If we encode the string
"Ti" with UTF-16 in big-endian byte order, we get:</p>
<pre><code>[ 0x00, 0x54, 0x00, 0x69 ]
</code></pre>
<p>In UTF-16 with little-endian byte order, "Ti" is encoded as:</p>
<pre><code>[ 0x54, 0x00, 0x69, 0x00 ]
</code></pre>
<p>Note that the bytes for each character are stored least-significant byte first, but
the order of the characters is unchanged.</p>
*/
/**
* @method getNativeByteOrder
* <p>Get the OS native byte order (either {@link Titanium.Codec#property-BIG_ENDIAN} or
{@link Titanium.Codec#property-LITTLE_ENDIAN}).</p>
* @description <p>See "Byte Order" in the main discussion of {@link Titanium.Codec} for more information.</p>
<p>On Mobile Web, this property always returns {@link Titanium.Codec#property-LITTLE_ENDIAN}.</p>
* @returns {Number}OS native byte order.
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Codec#property-BIG_ENDIAN}
<li> {@link Titanium.Codec#property-LITTLE_ENDIAN}
</ul></p>
*/
/**
* @method encodeNumber
* <p>Encodes a number and writes it to a buffer.</p>
* @description <p>Takes a set of named parameters passed in the <code>options</code> argument.</p>
<p>Encodes the number <code>source</code> into <code>dest</code> using the passed in data <code>type</code>.</p>
<p>Two optional parameters can also be specified in <code>options</code>:</p>
<ul>
<li><p>If <code>position</code> is included in the <code>options</code> dictionary, writes the encoded number
to the buffer starting at <code>position</code>.</p></li>
<li><p>If <code>byteOrder</code> is included in the <code>options</code> dictionary, the specified byte order
is used -- otherwise, the native byte order is assumed.</p></li>
</ul>
<p>On Mobile Web, <code>position</code> is not supported.</p>
* <h3>Examples</h3>
<h4>Encode a Double-Precision Floating Point Value</h4>
<p>This example encodes a double-precision floating point value in 8 bytes using the OS byte
order.</p>
<pre><code>var buffer = Ti.createBuffer({ length: 8 });
Ti.Codec.encodeNumber({
source: 1.23456789,
dest: buffer,
type: Ti.Codec.TYPE_DOUBLE
});
</code></pre><h4>Encode an Integer Specifying Start Position and Byte Order</h4>
<p>This example encodes a 4-byte integer using big endian encoding, and
writes it to the supplied buffer starting at index position 10.</p>
<pre><code>var buffer = Ti.createBuffer({ length: 100 });
Ti.Codec.encodeNumber({
source: 0x3456789a,
dest: buffer,
position: 10,
type: Ti.Codec.TYPE_INT,
byteOrder: Ti.Codec.BIG_ENDIAN
});
</code></pre>
* @param {EncodeNumberDict} options
<p>Named parameters.</p>
* @returns {Number}Position _after_ the encoded number in `dest`.
*/
/**
* @method decodeNumber
* <p>Decodes a number from the <code>source</code> buffer using the specified data type.</p>
* @description <p>Takes a set of named parameters in the <code>options</code> argument.</p>
<p>Bytes are read from the <code>source</code> buffer and decoded as the specified data type, <code>type</code>.</p>
<p>Two optional parameters can also be specified in <code>options</code>:</p>
<ul>
<li><p>If <code>position</code> is included in the <code>options</code> dictionary, reads data from the
buffer starting at <code>position</code>.</p></li>
<li><p>If <code>byteOrder</code> is included in the <code>options</code> dictionary, the specified byte order
is used -- otherwise, the native byte order is assumed.</p></li>
</ul>
<p>Throws an exception if <code>source</code> is null, or <code>position</code> is greater than <code>source.length</code></p>
<p>On Mobile Web, <code>position</code> and <code>byteOrder</code> are not supported.</p>
* <h3>Examples</h3>
<h4>Decode a Double-Precision Floating Point Number</h4>
<p>This sample decodes an 8-byte double-precision floating point number using the
OS byte order.</p>
<pre><code>var buffer = // a buffer containing (at least) one 8-byte floating-point number
var value = Ti.Codec.decodeNumber({
source: buffer,
type: Ti.Codec.TYPE_DOUBLE
});
</code></pre><h4>Decode an Integer Specifying Start Position and Byte Order</h4>
<p>This sample decodes a 4-byte integer starting at index position 10 in the
buffer, using big endian encoding.</p>
<pre><code>var buffer = // a buffer containing a 4-byte integer at position 10.
var value = Ti.Codec.decodeNumber({
source: buffer,
position: 10,
type: Ti.Codec.TYPE_INT,
byteOrder: Ti.Codec.BIG_ENDIAN
});
</code></pre>
* @param {DecodeNumberDict} options
<p>Named parameters.</p>
* @returns {Number}Number decoded from `source`.
*/
/**
* @method encodeString
* <p>Encodes a string into a series of bytes in a buffer using the specified character set.</p>
* @description <p>Takes a set of named parameters in the <code>options</code> argument.</p>
<p>The string is read from <code>source</code> and written to the buffer <code>dest</code>.</p>
<p>Several optional parameters can also be specified in <code>options</code>:</p>
<ul>
<li><p>If <code>charset</code> is included, the string is encoded using the specified character
encoding.</p></li>
<li><p>If <code>destPosition</code> is included, data is written into the buffer starting at
the specified position. </p></li>
<li><p>If <code>sourcePosition</code> is included, a substring of the source string starting at the
specified position is encoded.</p></li>
<li><p>If <code>sourceLength</code> is included, at most the specified numer of characters
are encoded.</p></li>
</ul>
<p>Throws an exception if <code>charset</code> is not a valid character set,
<code>source</code> is null, or either <code>sourcePosition</code>, <code>sourceLength</code>, or
<code>sourcePosition</code>+<code>sourceLength</code> is greater than <code>source.length</code>.</p>
<p>On Mobile Web, the <code>charset</code> option is not supported. All strings are treated as UTF-8.</p>
* <h3>Examples</h3>
<h4>Encode String with Default Character Encoding</h4>
<p>This sample encodes a string using the default character encoding (UTF-8), then trims the
buffer to the length of the encoded string.</p>
<pre><code>var buffer = Ti.createBuffer({ length: 1024 });
var length = Ti.Codec.encodeString({
source: "hello world",
dest: buffer
});
buffer.length = length;
</code></pre><h4>Encode Substring with Specified Character Encoding</h4>
<p>This sample encodes the first 10 characters of a string using UTF-16 character encoding. </p>
<pre><code>// (10 * 2) + BOM = 22
var buffer = Ti.createBuffer({ length: 22 });
Ti.Codec.encodeString({
source: "jack jumped over the candle stick",
sourceLength: 10,
dest: buffer,
charset: Ti.Codec.CHARSET_UTF16
});
</code></pre>
* @param {Dictionary<EncodeStringDict>} options
<p>Named parameters.</p>
* @returns {Number}An index indicating the first byte in the destination buffer _after_ the
encoded string.
*/
/**
* @method decodeString
* <p>Decodes the source buffer into a String using the supplied character set.</p>
* @description <p>Takes a set of named parameters in the <code>options</code> argument.</p>
<p>Bytes are read from the <code>source</code> buffer and decoded as a string.</p>
<p>Several optional parameters can also be specified in <code>options</code>:</p>
<ul>
<li><p>If <code>position</code> is specified, bytes are read from <code>source</code> starting at <code>position</code>.</p></li>
<li><p>If <code>length</code> is specified, no more than <code>length</code> bytes are read.</p></li>
<li><p>If <code>charset</code> is specified, it determines the character encoding used to decode the
string. Otherwise, UTF-8 is assumed.</p></li>
</ul>
<p>Throws an exception if <code>charset</code> is not a valid character set, <code>source</code> is null,
or either <code>position</code>, <code>length</code>, or <code>position</code>+<code>length</code> is greater than <code>source.length</code>.</p>
<p>On Mobile Web, <code>charset</code> is not supported. All strings are treated as UTF-8.</p>
* <h3>Examples</h3>
<h4>Decode a String</h4>
<p>This sample decodes a string using the default character encoding.</p>
<pre><code>var buffer = // a buffer containing an encoded string
var string = Ti.Codec.decodeString({ source: buffer });
</code></pre><h4>Decode a String with a Specified Character Encoding</h4>
<p>This sample decodes a string using the UTF-16 character encoding.</p>
<pre><code>var buffer = // a buffer containing a UTF-16 encoded string
var string = Ti.Codec.decodeString({
source: buffer,
charset: Ti.Codec.CHARSET_UTF16
});
</code></pre>
* @param {DecodeStringDict} options
<p>Named parameters.</p>
* @returns {String}The decoded string
*/
/**
* @property CHARSET_ASCII
* @type String
* @readonly
* <p>ASCII character encoding..</p>
* <p><b>Constant value:</b>ascii</p>
* @description <p>See also: <a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> on Wikipedia.</p>
*/
/**
* @property CHARSET_ISO_LATIN_1
* @type String
* @readonly
* <p>ISO 8859-1 (Latin-1) character encoding.</p>
* <p><b>Constant value:</b>iso-latin-1</p>
* @description <p>See also: <a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1">ISO/IEC 8859-1</a> on Wikipedia.</p>
*/
/**
* @property CHARSET_UTF8
* @type String
* @readonly
* <p>UTF-8 character encoding.</p>
* <p><b>Constant value:</b>utf8</p>
* @description <p>See also: <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> on Wikipedia.</p>
*/
/**
* @property CHARSET_UTF16
* @type String
* @readonly
* <p>UTF-16 character encoding with default byte order.</p>
* <p><b>Constant value:</b>utf16</p>
* @description <p>See also: <a href="http://en.wikipedia.org/wiki/UTF-16/UCS-2">UTF-16/UCS2</a> on Wikipedia.</p>
*/
/**
* @property CHARSET_UTF16BE
* @type String
* @readonly
* <p>UTF-16 character encoding with big endian byte order.</p>
* <p><b>Constant value:</b>utf16be</p>
* @description <p>See also: <a href="http://en.wikipedia.org/wiki/UTF-16/UCS-2">UTF-16/UCS2</a> on Wikipedia.</p>
*/
/**
* @property CHARSET_UTF16LE
* @type String
* @readonly
* <p>UTF-16 character encoding with little endian byte order.</p>
* <p><b>Constant value:</b>utf16le</p>
* @description <p>See also: <a href="http://en.wikipedia.org/wiki/UTF-16/UCS-2">UTF-16/UCS2</a> on Wikipedia.</p>
*/
/**
* @property TYPE_BYTE
* @type String
* @readonly
* <p>8-bit integer encoding type.</p>
* <p><b>Constant value:</b>byte</p>
*/
/**
* @property TYPE_SHORT
* @type String
* @readonly
* <p>16-bit integer encoding type.</p>
* <p><b>Constant value:</b>short</p>
*/
/**
* @property TYPE_INT
* @type String
* @readonly
* <p>32-bit integer encoding type.</p>
* <p><b>Constant value:</b>int</p>
*/
/**
* @property TYPE_FLOAT
* @type String
* @readonly
* <p>32-bit single precision floating-point type.</p>
* <p><b>Constant value:</b>float</p>
*/
/**
* @property TYPE_LONG
* @type String
* @readonly
* <p>64-bit integer encoding type.</p>
* <p><b>Constant value:</b>long</p>
*/
/**
* @property TYPE_DOUBLE
* @type String
* @readonly
* <p>64-bit double precision floating-point type.</p>
* <p><b>Constant value:</b>double</p>
*/
/**
* @property BIG_ENDIAN
* @type Number
* @readonly
* <p>Big endian (network) byte order -- that is, the most significant byte first.</p>
* @description <p>See "Byte Order" in the main discussion of {@link Titanium.Codec} for more information.</p>
*/
/**
* @property LITTLE_ENDIAN
* @type Number
* @readonly
* <p>Little endian byte order -- that is, the least significant byte first.</p>
* @description <p>See "Byte Order" in the main discussion of {@link Titanium.Codec} for more information.</p>
*/
/**
* @class EncodeNumberDict
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Codec/Codec.yml
* <p>Named parameters for {@link Titanium.Codec#method-encodeNumber}.</p>
*/
/**
* @property source
* @type Number
* <p>Number to encode.</p>
*/
/**
* @property dest
* @type Titanium.Buffer
* <p>Destination buffer.</p>
*/
/**
* @property type
* @type String
* <p>Encoding type to use.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Codec#property-TYPE_BYTE}
<li> {@link Titanium.Codec#property-TYPE_SHORT}
<li> {@link Titanium.Codec#property-TYPE_INT}
<li> {@link Titanium.Codec#property-TYPE_FLOAT}
<li> {@link Titanium.Codec#property-TYPE_LONG}
<li> {@link Titanium.Codec#property-TYPE_DOUBLE}
</ul></p>
*/
/**
* @property [position=0]
* @type Number
* <p>Index in the <code>dest</code> buffer of the first byte of encoded data.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [byteOrder=Native byte order.]
* @type Number
* <p>Byte order to encode with.</p>
*/
/**
* @class DecodeNumberDict
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Codec/Codec.yml
* <p>Named parameters for {@link Titanium.Codec#method-decodeNumber}.</p>
*/
/**
* @property source
* @type Titanium.Buffer
* <p>Buffer to decode.</p>
*/
/**
* @property type
* @type String
* <p>The encoding type to use.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Codec#property-TYPE_BYTE}
<li> {@link Titanium.Codec#property-TYPE_SHORT}
<li> {@link Titanium.Codec#property-TYPE_INT}
<li> {@link Titanium.Codec#property-TYPE_FLOAT}
<li> {@link Titanium.Codec#property-TYPE_LONG}
<li> {@link Titanium.Codec#property-TYPE_DOUBLE}
</ul></p>
*/
/**
* @property [position=0]
* @type Number
* <p>Index in the <code>source</code> buffer of the first byte of data to decode.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [byteOrder=Native byte order.]
* @type Number
* <p>byte order to decode with.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @class EncodeStringDict
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Codec/Codec.yml
* <p>Named parameters for {@link Titanium.Codec#method-encodeString}.</p>
*/
/**
* @property source
* @type String
* <p>Source string to encode.</p>
*/
/**
* @property dest
* @type Titanium.Buffer
* <p>Destination buffer.</p>
*/
/**
* @property [destPosition=0]
* @type Number
* <p>Index in the <code>dest</code> buffer of the first byte of the encoded string.</p>
*/
/**
* @property [sourcePosition=0]
* @type Number
* <p>Position in <code>source</code> to start encoding.</p>
*/
/**
* @property [sourceLength=The length of `source`]
* @type Number
* <p>Number of characters in <code>source</code> to encode.</p>
*/
/**
* @property [charset={@link Titanium.Codec#property-CHARSET_UTF8}]
* @type String
* <p>Character encoding to use when encoding this string to bytes.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Codec#property-CHARSET_ASCII}
<li> {@link Titanium.Codec#property-CHARSET_ISO_LATIN_1}
<li> {@link Titanium.Codec#property-CHARSET_UTF8}
<li> {@link Titanium.Codec#property-CHARSET_UTF16}
<li> {@link Titanium.Codec#property-CHARSET_UTF16BE}
<li> {@link Titanium.Codec#property-CHARSET_UTF16LE}
</ul></p>
*/
/**
* @class DecodeStringDict
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Codec/Codec.yml
* <p>Named parameters for {@link Titanium.Codec#method-decodeString}.</p>
*/
/**
* @property source
* @type Titanium.Buffer
* <p>Buffer to decode.</p>
*/
/**
* @property [position=0]
* @type Number
* <p>Index in the <code>source</code> buffer of the first byte of data to decode.</p>
*/
/**
* @property [length=Length of `source`]
* @type Number
* <p>Number of bytes to decode.</p>
*/
/**
* @property [charset={@link Titanium.Codec#property-CHARSET_UTF8}]
* @type String
* <p>Character set to use when encoding this string to bytes.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Codec#property-CHARSET_ASCII}
<li> {@link Titanium.Codec#property-CHARSET_ISO_LATIN_1}
<li> {@link Titanium.Codec#property-CHARSET_UTF8}
<li> {@link Titanium.Codec#property-CHARSET_UTF16}
<li> {@link Titanium.Codec#property-CHARSET_UTF16BE}
<li> {@link Titanium.Codec#property-CHARSET_UTF16LE}
</ul></p>
*/
/**
* @class Titanium.Contacts
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Contacts/Contacts.yml
* <p>The top-level Contacts module, used for accessing and modifying the system contacts address book.</p>
* @description <p>See examples for more information.</p>
<h4>iOS Platform Notes</h4>
<p>On iOS, the contacts database may be modified by an external application, causing any <code>Person</code> or
<code>Group</code> objects you've retrieved to be out of sync with the database. The IDs of these objects are
not guaranteed to remain the same, so updating an object when it is out of sync may have
unpredictable results.</p>
<p>To avoid this, listen for the {@link Titanium.Contacts#event-reload reload} event. When you receive a
<code>reload</code> event, you should assume that any existing <code>Person</code> or <code>Group</code> objects are invalid and
reload them from the <code>Contacts</code> module before modifying them.</p>
<p>See the examples for sample use of the <code>reload</code> event.</p>
<p>If 'ABAddressBookErrorDomain error 0' occurs, it implies that you are not allowed to add or edit
certain fields. Check your default account in the iOS settings under contacts. If it's not 'iCloud',
mostly likely it will not support fields such as alternateBirthday or socialProfile.</p>
* <h3>Examples</h3>
<h4>Request access to the address book</h4>
<pre><code>var performAddressBookFunction = function(){...};
var addressBookDisallowed = function(){...};
if (Ti.Contacts.hasContactsPermissions()) {
performAddressBookFunction();
} else {
Ti.Contacts.requestContactsPermissions(function(e) {
if (e.success) {
performAddressBookFunction();
} else {
addressBookDisallowed();
}
});
}</code></pre><h4>Query Existing System Address Book Records</h4>
<p>Output to the console all properties of all people.</p>
<pre><code>var singleValue = [
'recordId', 'firstName', 'middleName', 'lastName', 'fullName', 'prefix', 'suffix',
'nickname', 'firstPhonetic', 'middlePhonetic', 'lastPhonetic', 'organization',
'jobTitle', 'department', 'note', 'birthday', 'created', 'modified', 'kind'
];
var multiValue = [
'email', 'address', 'phone', 'instantMessage', 'relatedNames', 'date', 'url'
];
var people = Ti.Contacts.getAllPeople();
Ti.API.info('Total contacts: ' + people.length);
for (var i=0, ilen=people.length; i<ilen; i++){
Ti.API.info('---------------------');
var person = people[i];
for (var j=0, jlen=singleValue.length; j<jlen; j++){
Ti.API.info(singleValue[j] + ': ' + person[singleValue[j]]);
}
for (var j=0, jlen=multiValue.length; j<jlen; j++){
Ti.API.info(multiValue[j] + ': ' + JSON.stringify(person[multiValue[j]]));
}
}
</code></pre><h4>Add New System Address Book Records</h4>
<p>Create two new records in the system address book. Note that the {@link Titanium.Contacts.Person}
object is queried in the same way that it is created (as shown in previous example.)</p>
<pre><code>Ti.API.info('Saving contact...');
Ti.Contacts.createPerson({
firstName: 'Paul',
lastName: 'Dowsett',
address:{
work:[
{
CountryCode: 'gb', // determines how the address is displayed
Street: '200 Brook Drive\nGreen Park',
City: 'Reading',
County: 'Berkshire',
Country: 'England',
ZIP: 'RG2 6UB'
},
{
CountryCode: 'gb', // determines how the address is displayed
Street: '1 St Pauls Road\nClerkenwell',
City: 'City of London',
State: 'London',
Country: 'England',
ZIP: 'EC1 1AA'
}
],
home:[
{
CountryCode: 'gb', // determines how the address is displayed
Street: '2 Boleyn Court',
City: 'London',
State: 'Greenwich',
Country: 'England',
ZIP: 'SE10'
}
]
},
birthday: '2012-01-01T12:00:00.000+0000',
instantMessage:{
home:[
{
service: 'AIM',
username: 'leisureAIM'
},
{
service: 'MSN',
username: 'no_paul_here@msn.com'
}
],
work:[
{
service: 'AIM',
username: 'seriousAIM'
}
]
},
organization: 'Appcelerator',
phone:{
mobile: ['07900 000001', '07900 000002'],
work: ['+44 (0)118 925 6128', '+44 (0)118 000 0000']
},
url:{
homepage: ['www.google.com'],
work: ['www.appcelerator.com', 'www.example.com']
}
});
Ti.API.info('Contact saved');
Ti.API.info('Saving contact...');
var workAddress1 = {
'CountryCode': 'us',
'Street': '440 N. Bernardo Avenue',
'City': 'Mountain View',
'State': 'California',
'Country': 'United States',
'ZIP': '94043'
};
Ti.Contacts.createPerson({
firstName:'Arthur',
lastName:'Evans',
address:{
'work':[workAddress1]
}
});
Ti.API.info('Contact saved');
</code></pre><h4>Repopulate contact data if it was modified externally</h4>
<p>Listen for the <code>reload</code> event to repopulate the contact data
if it was modified externally, for example, in the iOS Contacts app.</p>
<pre><code>var win = Ti.UI.createWindow();
var table = Ti.UI.createTableView();
// Repopulate contact data
function reloadContacts() {
var contacts = Ti.Contacts.getAllPeople();
var data = [];
for (var i = 0; i < contacts.length; i++) {
var title = contacts[i].fullName;
if (!title || title.length === 0) {
title = "(no name)";
}
var row = Ti.UI.createTableViewRow({
title: title
});
data.push(row);
}
table.data = data;
}
Ti.Contacts.addEventListener('reload', function(e){
alert('Reloading contacts. Your contacts were changed externally!');
reloadContacts();
});
// initial call to populate contact data
reloadContacts();
win.add(table);
win.open();
</code></pre>
*/
/**
* @event reload
* <p>Fired when the database backing the contacts module is modified externally.</p>
* @description <p>If you have an existing reference to a <code>Person</code> or <code>Group</code> object, you should obtain
a new reference from the <code>Contacts</code> module. Using the existing object may result
in unpredictable behavior, such as updating the wrong contact.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method hasContactsPermissions
* <p>Returns <code>true</code> if the app has contacts access.</p>
* @returns {Boolean}
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method requestContactsPermissions
* <p>Requests for contacts access.</p>
* @description <p>On Android, the request view will show if the permission is not accepted by the user, and the user did
not check the box "Never ask again" when denying the request. If the user checks the box "Never ask again,"
the user has to manually enable the permission in device settings.</p>
<p>This method requests <code>Manifest.permission.READ_CONTACTS</code> on Android. If you require other permissions, you can also
use {@link Titanium.Android#method-requestPermissions}.</p>
<p>In iOS 6, Apple introduced the Info.plist key <code>NSContactsUsageDescription</code> that is used to display an
own description while authorizing contacts permissions. In iOS 10, this key is mandatory and the application
will crash if your app does not include the key. Check the <a href="https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html">Apple docs</a> for more information.</p>
* @param {Callback<ContactsAuthorizationResponse>} callback
<p>Function to call upon user decision to grant contacts access.</p>
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method requestAuthorization
* <p>If authorization is unknown, will bring up a dialog requesting permission.</p>
* @deprecated 5.1.0 Use <Titanium.Contacts.requestContactsPermissions> instead.
* @description <p>Note that the callback may be synchronous or asynchronous. That is, it may be called
during requestAuthorization or much later. See the "Request access to the address book"
example on how to best use this method. </p>
* @param {Callback<ContactsAuthorizationResponse>} callback
<p>Callback function to execute when when authorization is no longer unknown.</p>
* @platform android 2.1.3
* @platform iphone 2.1.3
* @platform ipad 2.1.3
*/
/**
* @method createGroup
* <p>Creates and returns an instance of {@link Titanium.Contacts.Group}.</p>
* @description <p>This method must be followed by {@link Titanium.Contacts#method-save} to commit its changes.</p>
* @param {Dictionary<Titanium.Contacts.Group>} parameters (optional)
<p>Properties to set on a new object, including any in {@link Titanium.Contacts.Group} except
those marked as non-creation or read-only.</p>
* @returns {Titanium.Contacts.Group}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method createPerson
* <p>Creates and returns an instance of {@link Titanium.Contacts.Person}, and commits all pending
changes to the underlying contacts database.</p>
* @param {Dictionary<Titanium.Contacts.Person>} parameters (optional)
<p>Properties to set on a new object, including any in {@link Titanium.Contacts.Person} except
those marked as non-creation or read-only.</p>
* @returns {Titanium.Contacts.Person}
* @platform android 2.1.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAllGroups
* <p>Gets all groups.</p>
* @returns {Titanium.Contacts.Group[]}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAllPeople
* <p>Gets all people, unless a limit is specified.</p>
* @param {Number} limit
<p>Maximum number of people. Android only.</p>
* @returns {Titanium.Contacts.Person[]}
*/
/**
* @method getGroupByID
* <p>Gets the group with the specified identifier. Deprecated for >= iOS9. Use {@link Titanium.Contacts#method-getGroupByIdentifier} instead.</p>
* <p> <b>Requires:</b>
iOS 8.0 and earlier
</p>
* @param {Number} id
<p>Group identifier.</p>
* @returns {Titanium.Contacts.Group}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getGroupByIdentifier
* <p>Gets the group with the specified identifier.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @param {String} id
<p>Group identifier.</p>
* @returns {Titanium.Contacts.Group}
* @platform iphone 5.0.0
* @platform ipad 5.0.0
* @platform windowsphone 5.0.0
*/
/**
* @method getPeopleWithName
* <p>Gets people with a <code>firstName</code>, <code>middleName</code> or <code>lastName</code> field, or a combination
of these fields, that match the specified name.</p>
* @param {String} name
<p>Name to match.</p>
* @returns {Titanium.Contacts.Person[]}
*/
/**
* @method getPersonByID
* <p>Gets the person with the specified identifier. Deprecated for >= iOS9. Use {@link Titanium.Contacts#method-getPersonByIdentifier} instead.</p>
* <p> <b>Requires:</b>
iOS 8.0 and earlier
</p>
* @param {Number} id
<p>Contact identifier.</p>
* @returns {Titanium.Contacts.Person}
*/
/**
* @method getPersonByIdentifier
* <p>Gets the person with the specified identifier.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @param {Number} id
<p>Contact identifier.</p>
* @returns {Titanium.Contacts.Person}
* @platform android 5.0.0
* @platform iphone 5.0.0
* @platform ipad 5.0.0
* @platform windowsphone 5.0.0
*/
/**
* @method removeGroup
* <p>Removes a group from the address book.</p>
* @description <p>This method must be followed by {@link Titanium.Contacts#method-save} to commit its changes.</p>
* @param {Titanium.Contacts.Group} group
<p>Contact group.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method removePerson
* <p>Removes a contact from the address book.</p>
* @description <p>On iOS:</p>
<p>This method must be followed by a save action to commit the data to the underlying database,
which can be done explicitly using {@link Titanium.Contacts#method-save} or implicitly using
{@link Titanium.Contacts#method-createPerson}. Although the {@link Titanium.Contacts.Person} object will still
exist once committed, it will no longer be valid. Continuing to use it will result in
unpredictable behavior, including crashes.</p>
<p>On Android:</p>
<p>This method will remove the person from the Contacts book automatically. </p>
* @param {Titanium.Contacts.Person} person
<p>Contact.</p>
* @platform android 2.1.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method revert
* <p>Reverts all changes made by the previous save to the address book. Deprecated for >= iOS9.</p>
* <p> <b>Requires:</b>
iOS 8.0 and earlier
</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method save
* <p>Commits all pending changes to the underlying contacts database.</p>
* @description <p>On Android:</p>
<p>Takes an array of {@link Titanium.Contacts.Person} objects and saves changes for
the specified contacts only.</p>
* @param {Array<Titanium.Contacts.Person>} contacts
<p>List of contacts to save. Used on Android only.</p>
* @platform android 3.0.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method showContacts
* <p>Displays a picker that allows a person to be selected.</p>
* @param {showContactsParams} params
<p>Argument containing parameters for this method. Optional on Android.</p>
*/
/**
* @method getContactsAuthorization
* <p>Gets the value of the {@link Titanium.Contacts#property-contactsAuthorization} property.</p>
* @returns {Number}
* @platform android 2.1.3
* @platform iphone 2.1.3
* @platform ipad 2.1.3
*/
/**
* @property CONTACTS_KIND_ORGANIZATION
* @type Number
* @readonly
* <p>Specifies that a contact is an organization.</p>
* @description <p>Used with the {@link Titanium.Contacts.Person#property-kind} property.</p>
<p>One of the group of contact "kind" constants
{@link Titanium.Contacts#property-CONTACTS_KIND_ORGANIZATION CONTACTS_KIND_ORGANIZATION},
and {@link Titanium.Contacts#property-CONTACTS_KIND_PERSON CONTACTS_KIND_PERSON}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property CONTACTS_KIND_PERSON
* @type Number
* @readonly
* <p>Specifies that a contact is a person.</p>
* @description <p>Used with the {@link Titanium.Contacts.Person#property-kind} property.
One of the group of contact "kind" constants {@link Titanium.Contacts#property-CONTACTS_KIND_ORGANIZATION CONTACTS_KIND_ORGANIZATION}, and {@link Titanium.Contacts#property-CONTACTS_KIND_PERSON CONTACTS_KIND_PERSON}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property CONTACTS_SORT_FIRST_NAME
* @type Number
* @readonly
* <p>Specifies that group members will be sorted by first name.</p>
* @description <p>Used with the {@link Titanium.Contacts.Group#method-sortedMembers} method.
One of the group of contact group "sort" constants {@link Titanium.Contacts#property-CONTACTS_SORT_FIRST_NAME CONTACTS_SORT_FIRST_NAME}, and {@link Titanium.Contacts#property-CONTACTS_SORT_LAST_NAME CONTACTS_SORT_LAST_NAME}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property CONTACTS_SORT_LAST_NAME
* @type Number
* @readonly
* <p>Specifies that group members will be sorted by last name.</p>
* @description <p>Used with the {@link Titanium.Contacts.Group#method-sortedMembers} method.
One of the group of contact group "sort" constants {@link Titanium.Contacts#property-CONTACTS_SORT_FIRST_NAME CONTACTS_SORT_FIRST_NAME}, and {@link Titanium.Contacts#property-CONTACTS_SORT_LAST_NAME CONTACTS_SORT_LAST_NAME}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUTHORIZATION_AUTHORIZED
* @type Number
* @readonly
* <p>A {@link Titanium.Contacts#property-contactsAuthorization contactsAuthorization} value
indicating that the application is authorized to use the address book.</p>
* @description <p>This value is always returned on Android devices, as well as on iOS versions earlier than 6.0.</p>
* @platform android 2.1.3
* @platform iphone 2.1.3
* @platform ipad 2.1.3
*/
/**
* @property AUTHORIZATION_DENIED
* @type Number
* @readonly
* <p>A {@link Titanium.Contacts#property-contactsAuthorization contactsAuthorization} value
indicating that the application is not authorized to use the address book.</p>
* @platform android 2.1.3
* @platform iphone 2.1.3
* @platform ipad 2.1.3
*/
/**
* @property AUTHORIZATION_RESTRICTED
* @type Number
* @readonly
* <p>A {@link Titanium.Contacts#property-contactsAuthorization contactsAuthorization} value
indicating that the application is not authorized to use the address book <em>and</em>
the user cannot change this application's status.</p>
* @platform android 2.1.3
* @platform iphone 2.1.3
* @platform ipad 2.1.3
*/
/**
* @property AUTHORIZATION_UNKNOWN
* @type Number
* @readonly
* <p>A {@link Titanium.Contacts#property-contactsAuthorization contactsAuthorization} value
indicating that the authorization state is unknown.</p>
* @platform android 2.1.3
* @platform iphone 2.1.3
* @platform ipad 2.1.3
*/
/**
* @property contactsAuthorization
* @type Number
* @readonly
* <p>Returns an authorization constant indicating if the application has access to the address book.</p>
* @description <p>Always returns <code>AUTHORIZATION_AUTHORIZED</code> on iOS pre-6.0 and Android devices.</p>
<p>If <code>contactsAuthorization</code> is <code>AUTHORIZATION_RESTRICTED</code>, you should not
attempt to re-authorize: this will lead to issues.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Contacts#property-AUTHORIZATION_AUTHORIZED}
<li> {@link Titanium.Contacts#property-AUTHORIZATION_DENIED}
<li> {@link Titanium.Contacts#property-AUTHORIZATION_RESTRICTED}
<li> {@link Titanium.Contacts#property-AUTHORIZATION_UNKNOWN}
</ul></p>
* @platform android 2.1.3
* @platform iphone 2.1.3
* @platform ipad 2.1.3
*/
/**
* @class showContactsParams
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Contacts/Contacts.yml
* <p>Dictionary of options for the {@link Titanium.Contacts#method-showContacts} method.</p>
*/
/**
* @property [animated=true]
* @type Boolean
* <p>Determines whether to animate the show/hide of the contacts picker (iPhone, iPad only.)</p>
*/
/**
* @property fields
* @type String[]
* <p>Field names to show when selecting properties. By default, shows all available.</p>
*/
/**
* @property cancel
* @type Callback<Object>
* <p>Function to call when selection is canceled.</p>
*/
/**
* @property selectedPerson
* @type Callback<Object>
* <p>Function to call when a person is selected. Must not be used with <code>selectedProperty</code> property.</p>
*/
/**
* @property selectedProperty
* @type Callback<Object>
* <p>Function to call when a property is selected. Must not be used with <code>selectedPerson</code>
property.
Note: If ringtone or texttone is selected, null values are returned, since these are unsupported
by Apple.
Since iOS 9.0, there is a native apple issue whereby it may return null if the birthday property
is selected on certain device models.
The callback contains the selected property and a 'person' object of type {@link Titanium.Contacts.Person}.
Since iOS 9.0, apple only returns the person object with partial information. Currently it is known to
at least contain the selected property and fullName. </p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @class ContactsAuthorizationResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Contacts/Contacts.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @class Titanium.Contacts.Group
* @platform iphone 1.4.0
* @platform ipad 1.4.0
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Contacts/Group.yml
* <p>An object which represents a group in the system contacts address book.</p>
* @description <p>See examples in {@link Titanium.Contacts} for more information.</p>
*/
/**
* @method add
* <p>Adds a person to this group.</p>
* @param {Titanium.Contacts.Person} person
<p>Person to add. For >= iOS9, it is not required to
call {@link Titanium.Contacts#method-save} after calling this method.</p>
*/
/**
* @method members
* <p>Gets people that are members of this group.</p>
* @returns {Titanium.Contacts.Person[]}
*/
/**
* @method remove
* <p>Removes a person from this group. For >= iOS9, it is not
required to call {@link Titanium.Contacts#method-save} after calling this method.</p>
* @param {Titanium.Contacts.Person} person
<p>Person to remove.</p>
*/
/**
* @method sortedMembers
* <p>Gets people that are members of this group, sorted in the specified order.</p>
* @param {Number} sortBy
<p>Method for sorting.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Contacts#property-CONTACTS_SORT_FIRST_NAME}
<li> {@link Titanium.Contacts#property-CONTACTS_SORT_LAST_NAME}
</ul></p>
* @returns {Titanium.Contacts.Person[]}
*/
/**
* @method getIdentifier
* <p>Gets the value of the {@link Titanium.Contacts.Group#property-identifier} property.</p>
* @returns {String}
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.Contacts.Group#property-name} property.</p>
* @returns {String}
*/
/**
* @method setName
* <p>Sets the value of the {@link Titanium.Contacts.Group#property-name} property.</p>
* @param {String} name
<p>New value for the property.</p>
*/
/**
* @method getRecordId
* <p>Gets the value of the {@link Titanium.Contacts.Group#property-recordId} property.</p>
* @returns {Number}
*/
/**
* @method setRecordId
* <p>Sets the value of the {@link Titanium.Contacts.Group#property-recordId} property.</p>
* @param {Number} recordId
<p>New value for the property.</p>
*/
/**
* @property identifier
* @type String
* @readonly
* <p>Identifier of the group.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property name
* @type String
* <p>Name of this group.</p>
*/
/**
* @property recordId
* @type Number
* <p>Record identifier of the group. Single value. Deprecated for >= iOS9.</p>
* <p> <b>Requires:</b>
iOS 8.0 and earlier
</p>
*/
/**
* @class Titanium.Contacts.Person
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Contacts/Person.yml
* <p>An object that represents a contact record for a person or organization in the system contacts
address book.</p>
* @description <p>A person object is created using {@link Titanium.Contacts#method-createPerson}.</p>
<p>The following two kinds of properties exist for this object:</p>
<ul>
<li>single value - contains either a <code>string</code> or <code>number</code> type value, an array of <code>string</code> type
values, or <code>null</code> if unset.</li>
<li>multi-value - contains a dictionary with typical keys of <code>home</code>, <code>work</code> and/or <code>other</code>. Each
key contains either a <code>string</code> type value, an array of <code>string</code> type values, or a dictionary
containing key/value pairs with <code>string</code> type values.</li>
</ul>
<h4>Adding and Modifying Properties</h4>
<p>Support for adding and modifying properties is currently supported on iOS and Android.</p>
<h4>Keys as Address Book UI Labels</h4>
<p>Keys act as labels in the address book user interface.</p>
<p>Although there is limited support for custom, arbitrarily-named, keys when used with multi-value
properties, there is no support them with single value properties.</p>
<p>On iOS, creating custom keys is not recommended, and will lead to undefined results.</p>
<p>If a label has been created by the user of the device and used with a multi-value property, it
will exist as a key with the same name.</p>
<p>See examples in {@link Titanium.Contacts} for more information.</p>
*/
/**
* @method getAddress
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-address} property.</p>
* @returns {Dictionary}
*/
/**
* @method setAddress
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-address} property.</p>
* @param {Dictionary} address
<p>New value for the property.</p>
*/
/**
* @method getAlternateBirthday
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-alternateBirthday} property.</p>
* @returns {Dictionary}
* @platform iphone 3.6.0
* @platform ipad 3.6.0
* @platform windowsphone 4.1.0
*/
/**
* @method setAlternateBirthday
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-alternateBirthday} property.</p>
* @param {Dictionary} alternateBirthday
<p>New value for the property.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
* @platform windowsphone 4.1.0
*/
/**
* @method getBirthday
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-birthday} property.</p>
* @returns {String}
*/
/**
* @method setBirthday
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-birthday} property.</p>
* @param {String} birthday
<p>New value for the property.</p>
*/
/**
* @method getCreated
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-created} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getDate
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-date} property.</p>
* @returns {Dictionary}
*/
/**
* @method setDate
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-date} property.</p>
* @param {Dictionary} date
<p>New value for the property.</p>
*/
/**
* @method getDepartment
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-department} property.</p>
* @returns {String}
*/
/**
* @method setDepartment
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-department} property.</p>
* @param {String} department
<p>New value for the property.</p>
*/
/**
* @method getEmail
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-email} property.</p>
* @returns {Dictionary}
*/
/**
* @method setEmail
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-email} property.</p>
* @param {Dictionary} email
<p>New value for the property.</p>
*/
/**
* @method getFirstName
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-firstName} property.</p>
* @returns {String}
*/
/**
* @method setFirstName
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-firstName} property.</p>
* @param {String} firstName
<p>New value for the property.</p>
*/
/**
* @method getFirstPhonetic
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-firstPhonetic} property.</p>
* @returns {String}
*/
/**
* @method setFirstPhonetic
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-firstPhonetic} property.</p>
* @param {String} firstPhonetic
<p>New value for the property.</p>
*/
/**
* @method getFullName
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-fullName} property.</p>
* @returns {String}
*/
/**
* @method getId
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-id} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getIdentifier
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-identifier} property.</p>
* @returns {String}
* @platform iphone 5.0.0
* @platform ipad 5.0.0
* @platform windowsphone 5.0.0
*/
/**
* @method getImage
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-image} property.</p>
* @returns {Titanium.Blob}
*/
/**
* @method setImage
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-image} property.</p>
* @param {Titanium.Blob} image
<p>New value for the property.</p>
*/
/**
* @method getInstantMessage
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-instantMessage} property.</p>
* @returns {Dictionary}
*/
/**
* @method setInstantMessage
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-instantMessage} property.</p>
* @param {Dictionary} instantMessage
<p>New value for the property.</p>
*/
/**
* @method getJobTitle
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-jobTitle} property.</p>
* @returns {String}
*/
/**
* @method setJobTitle
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-jobTitle} property.</p>
* @param {String} jobTitle
<p>New value for the property.</p>
*/
/**
* @method getKind
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-kind} property.</p>
* @returns {Number}
*/
/**
* @method setKind
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-kind} property.</p>
* @param {Number} kind
<p>New value for the property.</p>
*/
/**
* @method getLastName
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-lastName} property.</p>
* @returns {String}
*/
/**
* @method setLastName
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-lastName} property.</p>
* @param {String} lastName
<p>New value for the property.</p>
*/
/**
* @method getLastPhonetic
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-lastPhonetic} property.</p>
* @returns {String}
*/
/**
* @method setLastPhonetic
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-lastPhonetic} property.</p>
* @param {String} lastPhonetic
<p>New value for the property.</p>
*/
/**
* @method getMiddleName
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-middleName} property.</p>
* @returns {String}
*/
/**
* @method setMiddleName
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-middleName} property.</p>
* @param {String} middleName
<p>New value for the property.</p>
*/
/**
* @method getMiddlePhonetic
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-middlePhonetic} property.</p>
* @returns {String}
*/
/**
* @method setMiddlePhonetic
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-middlePhonetic} property.</p>
* @param {String} middlePhonetic
<p>New value for the property.</p>
*/
/**
* @method getModified
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-modified} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getNickname
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-nickname} property.</p>
* @returns {String}
*/
/**
* @method setNickname
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-nickname} property.</p>
* @param {String} nickname
<p>New value for the property.</p>
*/
/**
* @method getNote
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-note} property.</p>
* @returns {String}
*/
/**
* @method setNote
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-note} property.</p>
* @param {String} note
<p>New value for the property.</p>
*/
/**
* @method getOrganization
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-organization} property.</p>
* @returns {String}
*/
/**
* @method setOrganization
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-organization} property.</p>
* @param {String} organization
<p>New value for the property.</p>
*/
/**
* @method getPhone
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-phone} property.</p>
* @returns {Dictionary}
*/
/**
* @method setPhone
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-phone} property.</p>
* @param {Dictionary} phone
<p>New value for the property.</p>
*/
/**
* @method getPrefix
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-prefix} property.</p>
* @returns {String}
*/
/**
* @method getRecordId
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-recordId} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setRecordId
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-recordId} property.</p>
* @param {Number} recordId
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getRelatedNames
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-relatedNames} property.</p>
* @returns {Dictionary}
*/
/**
* @method setRelatedNames
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-relatedNames} property.</p>
* @param {Dictionary} relatedNames
<p>New value for the property.</p>
*/
/**
* @method getSocialProfile
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-socialProfile} property.</p>
* @returns {Dictionary}
* @platform iphone 3.6.0
* @platform ipad 3.6.0
* @platform windowsphone 4.1.0
*/
/**
* @method setSocialProfile
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-socialProfile} property.</p>
* @param {Dictionary} socialProfile
<p>New value for the property.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
* @platform windowsphone 4.1.0
*/
/**
* @method getSuffix
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-suffix} property.</p>
* @returns {String}
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.Contacts.Person#property-url} property.</p>
* @returns {Dictionary}
*/
/**
* @method setUrl
* <p>Sets the value of the {@link Titanium.Contacts.Person#property-url} property.</p>
* @param {Dictionary} url
<p>New value for the property.</p>
*/
/**
* @property address
* @type Dictionary
* <p>Addresses for the person. Multi-value. Read-only on Android.</p>
* @description <p>The format of the dictionary accepted by this property is as follows:</p>
<ul>
<li>Keys: any of <code>home</code>, <code>work</code>, and/or <code>other</code>.</li>
<li>Values: arrays of dictionary types with seven keys, <code>CountryCode</code>, <code>Street</code>, <code>City</code>,
, <code>State</code>, <code>Country</code> and <code>PostalCode</code>, each with a <code>string</code> type value.</li>
</ul>
<p>On Android:</p>
<p>'CountryCode' and 'County' are currently not supported.</p>
<p>On iOS:</p>
<p>The <code>CountryCode</code> key value may be one of the recognized two-character ISO 3166-1 country
codes, and determines the format in which the contact is presented by the address book
user interface. See the wikipedia section
<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements">ISO 3166-1 alpha-2</a>
for a comprehensive list of codes.</p>
*/
/**
* @property alternateBirthday
* @type Dictionary
* <p>Alternate birthday of the person. Single Dictionary.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>The format of the dictionary accepted by this property is as follows:</p>
<ul>
<li>Keys: <code>calendarIdentifier</code>, <code>era</code>, <code>year</code>, <code>month</code>, <code>day</code> and <code>isLeapMonth</code>.</li>
<li>Values: Use <code>chinese</code>, <code>hebrew</code> and <code>islamic-civil</code> for <code>calendarIdentifier</code>.
Use <code>number</code> type for <code>era</code>, <code>year</code>, <code>month</code> and <code>day</code>. These must be consistent with
corresponding <code>calendarIdentifier</code>.
Use <code>boolean</code> type for <code>isLeapMonth</code>.</li>
</ul>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
* @platform windowsphone 4.1.0
*/
/**
* @property birthday
* @type String
* <p>Date of birth of the person. Single value.</p>
* @description <p>Date format is "<em>yyyy</em>-_MM_-<em>dd</em><strong>T</strong><em>HH</em><strong>:</strong><em>mm</em><strong>:</strong><em>ss</em><strong>.</strong><em>SSS</em><strong>+0000</strong>"</p>
*/
/**
* @property created
* @type String
* @readonly
* <p>Date and time that the person record was created. Single value. Deprecated since iOS 9.</p>
* <p> <b>Requires:</b>
iOS 8.0 and earlier
</p>
* @description <p>Date format is "<em>yyyy</em>-_MM_-<em>dd</em><strong>T</strong><em>HH</em><strong>:</strong><em>mm</em><strong>:</strong><em>ss</em><strong>.</strong><em>SSS</em><strong>+0000</strong>"</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property date
* @type Dictionary
* <p>Dates associated with the person. Multi-value.</p>
* @description <p>Adding or modifying this property is not currently supported.</p>
<p>The format of the dictionary accepted by this property is as follows:</p>
<ul>
<li>Keys: any of <code>anniversary</code> and/or <code>other</code>.</li>
<li>Values: array of <code>string</code> type.</li>
</ul>
<p>Date format is "<em>yyyy</em>-_MM_-<em>dd</em><strong>T</strong><em>HH</em><strong>:</strong><em>mm</em><strong>:</strong><em>ss</em><strong>.</strong><em>SSS</em><strong>+0000</strong>"</p>
*/
/**
* @property department
* @type String
* <p>Department of the person. Single value.</p>
*/
/**
* @property email
* @type Dictionary
* <p>Email addresses for the person. Multi-value. Read-only on Android.</p>
* @description <p>The format of the dictionary accepted by this property is as follows:</p>
<ul>
<li>Keys: any of <code>home</code>, <code>work</code>, and/or <code>other</code>.</li>
<li>Values: array of <code>string</code> type.</li>
</ul>
*/
/**
* @property firstName
* @type String
* <p>First name of the person. Single value.</p>
*/
/**
* @property firstPhonetic
* @type String
* <p>Phonetic first name of the person. Single value.</p>
*/
/**
* @property fullName
* @type String
* @readonly
* <p>Localized full name of the person. Single value. Read-only on Android.</p>
* @description <p>The full name will be printed in the order of.
Prefix,first name, middle name, family name, suffix.</p>
*/
/**
* @property id
* @type Number
* @readonly
* <p>Record identifier of the person. Single value.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property identifier
* @type String
* @readonly
* <p>Identifier of the person.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Prior to iOS 9, use the {@link Titanium.Contacts.Person#property-recordId recordId} property.</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
* @platform windowsphone 5.0.0
*/
/**
* @property image
* @type Titanium.Blob
* <p>Image for the person. Single value. Read-only for >= iOS9</p>
* @description <p>Set to <code>null</code> to remove the image.</p>
*/
/**
* @property instantMessage
* @type Dictionary
* <p>Instant messenger information of the person. Multi-value.</p>
* @description <p>The format of the dictionary accepted by this property is as follows:</p>
<ul>
<li>Keys: any of <code>home</code>, <code>work</code> and/or <code>other</code>.</li>
<li>Values: arrays of dictionary types with two keys, <code>service</code> and <code>username</code>, each with a
<code>string</code> type value.</li>
</ul>
<p>The <code>service</code> key value may be one of <code>AIM</code>, <code>Facebook</code>, <code>GaduGadu</code>, <code>GoogleTalk</code>, <code>ICQ</code>,
<code>Jabber</code>, <code>MSN</code>, <code>QQ</code>, <code>Skype</code>, or <code>Yahoo</code>. These values are key sensitive.</p>
*/
/**
* @property jobTitle
* @type String
* <p>Job title of the person. Single value.</p>
*/
/**
* @property kind
* @type Number
* <p>Determines the type of information the person record contains; either person or organization.
Read-only on Android.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Contacts#property-CONTACTS_KIND_ORGANIZATION}
<li> {@link Titanium.Contacts#property-CONTACTS_KIND_PERSON}
</ul></p>
*/
/**
* @property lastName
* @type String
* <p>Last name of the person. Single value.</p>
*/
/**
* @property lastPhonetic
* @type String
* <p>Phonetic last name of the person. Single value.</p>
*/
/**
* @property middleName
* @type String
* <p>Middle name of the person. Single value.</p>
*/
/**
* @property middlePhonetic
* @type String
* <p>Phonetic middle name of the person. Single value.</p>
*/
/**
* @property modified
* @type String
* @readonly
* <p>Date and time that the person record was last modified. Single value. Deprecated since iOS 9.</p>
* <p> <b>Requires:</b>
iOS 8.0 and earlier
</p>
* @description <p>Date format is "<em>yyyy</em>-_MM_-<em>dd</em><strong>T</strong><em>HH</em><strong>:</strong><em>mm</em><strong>:</strong><em>ss</em><strong>.</strong><em>SSS</em><strong>+0000</strong>"</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property nickname
* @type String
* <p>Nickname of the person. Single value.</p>
*/
/**
* @property note
* @type String
* <p>Notes for the person. Single value.</p>
*/
/**
* @property organization
* @type String
* <p>Organization to which the person belongs. Single value.</p>
*/
/**
* @property phone
* @type Dictionary
* <p>Phone numbers for the person. Multi-value. Read-only on Android.</p>
* @description <p>The format of the dictionary accepted by this property is as follows:</p>
<ul>
<li>Keys: any of <code>home</code>, <code>work</code>, <code>other</code>, <code>mobile</code>, <code>pager</code>, <code>workFax</code>, <code>homeFax</code>, <code>main</code>,
and/or <code>iPhone</code>.</li>
<li>Values: array of <code>string</code> type.</li>
</ul>
*/
/**
* @property prefix
* @type String
* @readonly
* <p>Prefix for the person. Single value.</p>
*/
/**
* @property recordId
* @type Number
* <p>Record identifier of the person. Single value. Deprecated since iOS 9.</p>
* <p> <b>Requires:</b>
iOS 8.4 and earlier
</p>
* @description <p>For iOS 9 and later, use the {@link Titanium.Contacts.Person#property-identifier identifier} property.
In iOS 8, a contact can be selected without requiring User permission. In such case this
property returns -1. </p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property relatedNames
* @type Dictionary
* <p>Names of people to which the person is related. Multi-value.</p>
* @description <p>The format of the dictionary accepted by this property is as follows:</p>
<ul>
<li>Keys: any of <code>mother</code>, <code>father</code>, <code>parent</code>, <code>brother</code>, <code>sister</code>, <code>child</code>, <code>friend</code>, <code>spouse</code>,
<code>partner</code>, <code>assistant</code>, <code>manager</code>, and/or <code>other</code>.</li>
<li>Values: array of <code>string</code> type.</li>
</ul>
*/
/**
* @property socialProfile
* @type Dictionary
* <p>Social profile information of the person. Multi-value.</p>
* @description <p>The format of the dictionary accepted by this property is as follows:</p>
<ul>
<li>Keys: any of <code>home</code>, <code>work</code> and/or <code>other</code>.</li>
<li>Values: arrays of dictionary types with two keys, <code>service</code> and <code>username</code> each with a
<code>string</code> type value.</li>
</ul>
<p>The <code>service</code> key value may be one of <code>twitter</code>, <code>sinaweibo</code>, <code>gamecenter</code>, <code>facebook</code>,
<code>myspace</code>, <code>linkedin</code>, or <code>flickr</code>. These values are key sensitive.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
* @platform windowsphone 4.1.0
*/
/**
* @property suffix
* @type String
* @readonly
* <p>Suffix for the person. Single value.</p>
*/
/**
* @property url
* @type Dictionary
* <p>URLs of webpages associated with the person. Multi-value.</p>
* @description <p>The format of the dictionary accepted by this property is as follows:</p>
<ul>
<li>Keys: any of <code>homepage</code>, <code>home</code>, <code>work</code>, and/or <code>other</code>.</li>
<li>Values: array of <code>string</code> type.</li>
</ul>
*/
/**
* @class Titanium.Database.DB
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Database/DB.yml
* <p>The <code>Database</code> instance returned by {@link Titanium.Database#method-open} or {@link Titanium.Database#method-install}.</p>
*/
/**
* @method close
* <p>Closes the database and releases resources from memory. Once closed, this instance is no
longer valid and should not be used. On iOS, also closes all {@link Titanium.Database.ResultSet}
instances that exist.</p>
*/
/**
* @method execute
* <p>Executes an SQL statement against the database and returns a <code>ResultSet</code>.</p>
* <h3>Examples</h3>
<h4>Executing a Query</h4>
<p>The following code will install a database using
{@link Titanium.Database#method-install Titanium.Database.install} and execute SQL statements that will
create a table, insert data and query the table.</p>
<pre><code>var db = Ti.Database.install('mydb1', 'mydb1Installed');
db.execute('DELETE FROM people');
db.execute('CREATE TABLE IF NOT EXISTS people (name TEXT, phone_number TEXT, city TEXT)');
var thisName = 'Arthur';
var thisPhoneNo = '1-617-000-0000';
var thisCity = 'Mountain View';
db.execute('INSERT INTO people (name, phone_number, city) VALUES (?, ?, ?)', thisName, thisPhoneNo, thisCity);
var personArray = ['Paul','020 7000 0000', 'London'];
db.execute('INSERT INTO people (name, phone_number, city) VALUES (?, ?, ?)', personArray);
var rows = db.execute('SELECT rowid,name,phone_number,city FROM people');
db.close();
while (rows.isValidRow())
{
Ti.API.info('Person ---> ROWID: ' + rows.fieldByName('rowid') + ', name:' + rows.field(1) + ', phone_number: ' + rows.fieldByName('phone_number') + ', city: ' + rows.field(3));
rows.next();
}
rows.close();
</code></pre>
<p>Note that the above <code>SELECT</code> query contains the <a href="http://www.sqlite.org/lang_createtable.html#rowid">rowid</a>
column, which is a SQLite-specific column that stores the unique identifier for each row.</p>
* @param {String} sql
<p>SQL to execute. May include placeholders for parameter substitution.</p>
* @param {String/Array<String>/Object/Array<Object>} vararg (optional)
<p>Either a variable ordered list of zero or more values, or an array of values,
to be substituted with the respective <code>?</code> placeholder of the query.</p>
* @returns {Titanium.Database.ResultSet}
*/
/**
* @method remove
* <p>Removes the database files for this instance from disk. WARNING: this is a destructive
operation and cannot be reversed. All data in the database will be lost; use with caution.</p>
*/
/**
* @method getFile
* <p>Gets the value of the {@link Titanium.Database.DB#property-file} property.</p>
* @returns {Titanium.Filesystem.File}
* @platform android 5.4.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getLastInsertRowId
* <p>Gets the value of the {@link Titanium.Database.DB#property-lastInsertRowId} property.</p>
* @returns {Number}
*/
/**
* @method setLastInsertRowId
* <p>Sets the value of the {@link Titanium.Database.DB#property-lastInsertRowId} property.</p>
* @param {Number} lastInsertRowId
<p>New value for the property.</p>
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.Database.DB#property-name} property.</p>
* @returns {String}
*/
/**
* @method setName
* <p>Sets the value of the {@link Titanium.Database.DB#property-name} property.</p>
* @param {String} name
<p>New value for the property.</p>
*/
/**
* @method getRowsAffected
* <p>Gets the value of the {@link Titanium.Database.DB#property-rowsAffected} property.</p>
* @returns {Number}
*/
/**
* @method setRowsAffected
* <p>Sets the value of the {@link Titanium.Database.DB#property-rowsAffected} property.</p>
* @param {Number} rowsAffected
<p>New value for the property.</p>
*/
/**
* @property file
* @type Titanium.Filesystem.File
* @readonly
* <p>A <code>File</code> object representing the file where this database is stored. Must only be used for
setting file properties.</p>
* @platform android 5.4.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property lastInsertRowId
* @type Number
* <p>The identifier of the last populated row.</p>
*/
/**
* @property name
* @type String
* <p>The name of the database.</p>
*/
/**
* @property rowsAffected
* @type Number
* <p>The number of rows affected by the last query.</p>
*/
/**
* @class Titanium.Database
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Database/Database.yml
* <p>The top-level <code>Database</code> module, used for creating and accessing the
in-application SQLite database.</p>
*/
/**
* @method install
* <p>Installs an SQLite database to device's internal storage.</p>
* @description <p>Copies an SQLite database file to the device's internal storage (only) and
creates a persistent name that is available for the lifetime of the app.
On Android, if the source file does not exist, an empty database is created.</p>
<p>Returns a reference to the opened database. If the destination file already
exists, behaves as {@link Titanium.Database#method-open}.</p>
<p>This method is primarily used for iOS.</p>
<p>With Android, as there is often minimal internal storage available, <code>install</code>
may only be appropriate for small databases or for prototyping. When database
files are to be stored on external storage (for example, SD Card), a combination of
{@link Titanium.Filesystem} and {@link Titanium.Database#method-open} is required.</p>
<p>With Titanium 1.8.0.1 on iOS, the default database location changed in accordance
with Apple's guidelines. If a database file already exists in the old
location, <code>install</code> will automatically move it to the new location
rather than copying the file from the path provided in the first
argument.</p>
<p>Files stored in the <code>Private Documents</code> directory on iOS5 will be
automatically backed up to iCloud and removed from the device in low
storage situations. See
<a href="https://developer.apple.com/library/ios/qa/qa1719/_index.html">How do I prevent files from being backed up to iCloud and iTunes?</a>
for details. To prevent this for database files, use the {@link Titanium.Database.DB#property-file}
object with the {@link Titanium.Filesystem.File#method-setRemoteBackup} method. </p>
<p>Always {@link Titanium.Database.DB#method-close close} the database after use.</p>
* <h3>Examples</h3>
<h4>Install a Database (iOS)</h4>
<p>A database, with a filename of <code>mydb1</code> and located in the same directory as the
the running script, is installed.</p>
<pre><code>var db1 = Ti.Database.install('mydb1', 'mydb1Installed');
</code></pre>
<p>The file is copied to the default database location with a file
extension of <code>sql</code>.</p>
<p><strong>On simulator</strong></p>
<ul>
<li><code>/Users/user_name/Library/Application Support/iPhone Simulator/ios_version/Applications/apple_app_id/Library/Private Documents/mydb1Installed.sql</code> (Titanium 1.8.0.1)</li>
<li><code>/Users/user_name/Library/Application Support/iPhone Simulator/ios_version/Applications/apple_app_id/Library/Application Support/database/mydb1Installed.sql</code> (earlier versions)</li>
</ul>
<p><strong>On device</strong></p>
<ul>
<li><code>/Applications/apple_app_id/Library/Private Documents/mydb1Installed.sql</code> (Titanium 1.8.0.1)</li>
<li><code>/Applications/apple_app_id/Library/Application Support/database/mydb1Installed.sql</code> (earlier versions)</li>
</ul>
<p>To prevent the database file being automatically backed up to iCloud, use <code>setRemoteBackup</code>.</p>
<pre><code>db1.file.setRemoteBackup(false);
</code></pre><h4>Install a Database to Internal Storage (Android)</h4>
<p>A database, with a filename of <code>mydb1</code> and located in the same directory as the
the running script, is installed.</p>
<pre><code>var db1 = Ti.Database.install('mydb1', 'mydb1Installed');
</code></pre>
<p>Unlike on iOS, no file extension is added. The file is opened in the
following default database location, on both emulator and device.</p>
<ul>
<li><code>file:///data/data/appID/databases/mydb1Installed</code></li>
</ul><h4>Install a Database to External Storage (Android)</h4>
<p>The device is checked for the presence of external storage and a
database, with a filename of <code>mydb2</code> and located in the same directory as the
the running script, is installed.</p>
<pre><code>if (Ti.Platform.name === 'android' && Ti.Filesystem.isExternalStoragePresent()) {
var db2 = Ti.Database.install('mydb2', Ti.Filesystem.externalStorageDirectory + 'path' + Ti.Filesystem.separator + 'to' + Ti.Filesystem.separator + 'mydb2Installed');
}
</code></pre>
<p>Unlike on iOS, no file extension is added. The file is copied to the
absolute path provided.</p>
<ul>
<li><code>file:///sdcard/path/to/mydb2Installed</code></li>
</ul>
* @param {String} path
<p>Path and filename of the database file to copy to internal storage.
File location is relative to the script's context unless an absolute
path, such as one constructed with a {@link Titanium.Filesystem}
constant, is used.</p>
* @param {String} dbName
<p>Destination filename or absolute path, which will subsequently be passed to
{@link Titanium.Database#method-open}.</p>
* @returns {Titanium.Database.DB}
*/
/**
* @method open
* <p>Opens an SQLite database.</p>
* @description <p>Opens an SQLite database and returns a reference to it. If the database does
not exist, creates an empty database file and returns a reference to this
opened database.</p>
<p>With Titanium 1.8.0.1 on iOS, the default database location changed in accordance
with Apple's guidelines. If a database file already exists in the old
location, <code>open</code> will automatically move it to the new location.</p>
<p>Always {@link Titanium.Database.DB#method-close close} the database after use.</p>
* <h3>Examples</h3>
<h4>Open a Database from Internal Storage (iOS)</h4>
<p>A database, with a persistant name of <code>mydb1Installed</code> and located in the
default database location on internal storage, is opened.</p>
<pre><code>var db = Ti.Database.open('mydb1Installed');
</code></pre>
<p>A file extension of <code>sql</code> is added, and the file is opened from the
following location.</p>
<p>On simulator</p>
<ul>
<li><code>/Users/<user name>/Library/Application Support/iPhone Simulator/<iOS version>/Applications/<apple app id>/Library/Private Documents/mydb1Installed.sql</code> (Titanium 1.8.0.1)</li>
<li><code>/Users/<user name>/Library/Application Support/iPhone Simulator/<iOS version>/Applications/<apple app id>/Library/Application Support/database/mydb1Installed.sql</code> (earlier versions)</li>
</ul>
<p>On device</p>
<ul>
<li><code>/Applications/<apple app id>/Library/Private Documents/mydb1Installed.sql</code> (Titanium 1.8.0.1)</li>
<li><code>/Applications/<apple app id>/Library/Application Support/database/mydb1Installed.sql</code> (earlier versions)</li>
</ul><h4>Open a Database on Internal Storage (Android)</h4>
<p>A database, with a persistant name of <code>mydb1Installed</code> and located in the
default database location on internal storage, is opened.</p>
<p>var db1 = Ti.Database.open('mydb1Installed');</p>
<p>Unlike on iOS, no file extension is added. The file is opened in
the following location.</p>
<ul>
<li><code>file:///data/data/appID/databases/mydb1Installed</code></li>
</ul><h4>Open a Database on External Storage (Android)</h4>
<p>A database, with a filename of <code>mydb2Installed</code> and located at the
absolute path provided, is opened.</p>
<pre><code>if (Ti.Platform.name === 'android' && Ti.Filesystem.isExternalStoragePresent()) {
var db2 = Ti.Database.open(Ti.Filesystem.externalStorageDirectory + 'path' + Ti.Filesystem.separator + 'to' + Ti.Filesystem.separator + 'mydb2Installed');
}
</code></pre>
<p>Unlike on iOS, no file extension is added. The file is copied to the
absolute path, as follows.</p>
<ul>
<li><code>file:///sdcard/path/to/mydb2Installed</code></li>
</ul><h4>Open a Database in the shared directory of an application group (iOS)</h4>
<p>Opens a Database in a shared directory</p>
<pre><code>var suiteDir = Ti.Filesystem.directoryForSuite('group.appc.Sharing');
if (!suiteDir) {
logInApp('Suite Directory not found, check Entitlements.');
return;
}
var path = suiteDir + 'TestDB';
var db = Ti.Database.open(path);
db.close();
</code></pre>
* @param {String} dbName
<p>The dbname previously passed to {@link Titanium.Database#method-install}. An absolute path
to the file, including one that is constructed with a {@link Titanium.Filesystem}
constant or {@link Titanium.Filesystem#method-directoryForSuite} method, may be used.</p>
* @returns {Titanium.Database.DB}
*/
/**
* @property FIELD_TYPE_DOUBLE
* @type Number
* @readonly
* <p>Constant for requesting a column's value returned in double form.</p>
*/
/**
* @property FIELD_TYPE_FLOAT
* @type Number
* @readonly
* <p>Constant for requesting a column's value returned in float form.</p>
*/
/**
* @property FIELD_TYPE_INT
* @type Number
* @readonly
* <p>Constant for requesting a column's value returned in integer form.</p>
*/
/**
* @property FIELD_TYPE_STRING
* @type Number
* @readonly
* <p>Constant for requesting a column's value returned in string form.</p>
*/
/**
* @class Titanium.Database.ResultSet
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Database/ResultSet.yml
* <p>The ResultSet instance returned by {@link Titanium.Database.DB#method-execute}.</p>
* @description <p>A result set represents the results returned by a database query.</p>
<p>The {@link Titanium.Database.ResultSet#property-rowCount rowCount} property identifies the number of
rows in the result set. The <code>ResultSet</code> object maintains an internal record of the
current row. As shown in the example, you can use the
{@link Titanium.Database.ResultSet#method-next next} method to iterate through the rows in the set.</p>
<p>Use the {@link Titanium.Database.ResultSet#method-field field} or
{@link Titanium.Database.ResultSet#method-fieldByName fieldByName} methods to query the fields for
the current row.</p>
<p>On the iOS platform, closing the database also closes the result set, that is,
you can only access the result set if the database is currently open.</p>
* <h3>Examples</h3>
<h4>Using ResultSet</h4>
<p>The following code will create a database and execute SQL statements that will create a
table, insert data into it, query the table and iterate through the returned
<code>ResultSet</code>.</p>
<pre><code>var db = Ti.Database.open('mydb1Installed');
db.execute('CREATE TABLE IF NOT EXISTS people (name TEXT, phone_number TEXT, city TEXT)');
db.execute('DELETE FROM people');
var thisName = 'Arthur';
var thisPhoneNo = '1-617-000-0000';
var thisCity = 'Mountain View';
db.execute('INSERT INTO people (name, phone_number, city) VALUES (?, ?, ?)', thisName, thisPhoneNo, thisCity);
var personArray = ['Paul','020 7000 0000', 'London'];
db.execute('INSERT INTO people (name, phone_number, city) VALUES (?, ?, ?)', personArray);
var rows = db.execute('SELECT rowid,name,phone_number,city FROM people');
Ti.API.info('Row count: ' + rows.rowCount);
var fieldCount = rows.fieldCount;
Ti.API.info('Field count: ' + fieldCount);
while (rows.isValidRow()){
Ti.API.info('Person ---> ROWID: ' + rows.fieldByName('rowid') + ', name:' + rows.field(1) + ', phone_number: ' + rows.fieldByName('phone_number') + ', city: ' + rows.field(3));
rows.next();
}
rows.close();
db.close();
</code></pre>
<p>Note that the above <code>SELECT</code> query contains the <a href="http://www.sqlite.org/lang_createtable.html#rowid">rowid</a>
field, which contains an SQLite-specific unique identifier for each row.</p>
*/
/**
* @method fieldCount
* <p>Returns the number of columns in this result set. This method has been <strong>removed</strong> in Release 3.3.0 of the Titanium SDK. Use the fieldCount property instead.</p>
* @removed 3.3.0 Use the fieldCount property instead.
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method close
* <p>Closes this result set and release resources. Once closed, the result set must no longer
be used.</p>
*/
/**
* @method field
* <p>Retrieves the value for the specified field in the current row,
and casts it to the specified type (String, Integer, Float or Double.)</p>
* @description <p>All of the numeric types (Integer, Float or Double) are returned as JavaScript Number objects. </p>
<p>If no <code>type</code> parameter is specified, the returned data type depends on the data in the column. </p>
<ul>
<li>If the data in the column is TEXT, the data is returned as a String.</li>
<li>If the data in the column is any kind of number, the data is returned as a Number.</li>
<li>If the data in the column is a BLOB, the data is returned as a {@link Titanium.Blob} object. </li>
</ul>
<p>When a <code>type</code> is specified and the data cannot be converted to the specified type, an
exception is thrown. </p>
<p>Returns null if the value in the table is NULL.</p>
* @param {Number} index
<p>A zero-based column index.</p>
* @param {Number} type (optional)
<p>Type to cast field value.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Database#property-FIELD_TYPE_DOUBLE}
<li> {@link Titanium.Database#property-FIELD_TYPE_FLOAT}
<li> {@link Titanium.Database#property-FIELD_TYPE_INT}
<li> {@link Titanium.Database#property-FIELD_TYPE_STRING}
</ul></p>
* @returns {String/Number/Titanium.Blob}
*/
/**
* @method fieldByName
* <p>Retrieves the value for the specified field in the current row,
and casts it to the specified type (String, Integer, Float or Double.)</p>
* @description <p>All of the numeric types (Integer, Float or Double) are returned as JavaScript Number objects. </p>
<p>If no <code>type</code> parameter is specified, the returned data type depends on the data in the column. </p>
<ul>
<li>If the data in the column is TEXT, the data is returned as a String.</li>
<li>If the data in the column is any kind of number, the data is returned as a Number.</li>
<li>If the data in the column is a BLOB, the data is returned as a {@link Titanium.Blob} object. </li>
</ul>
<p>When a <code>type</code> is specified and the data cannot be converted to the specified type, an
exception is thrown. </p>
<p>Returns null if the value in the table is NULL. </p>
* @param {String} name
<p>A column name or alias used in the SQL query.</p>
* @param {Number} type (optional)
<p>Type to cast for the field value.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Database#property-FIELD_TYPE_DOUBLE}
<li> {@link Titanium.Database#property-FIELD_TYPE_FLOAT}
<li> {@link Titanium.Database#property-FIELD_TYPE_INT}
<li> {@link Titanium.Database#property-FIELD_TYPE_STRING}
</ul></p>
* @returns {String/Number/Titanium.Blob}
*/
/**
* @method fieldName
* <p>Returns the field name for the specified field index.</p>
* @param {Number} index
<p>A zero-based column index for the field.</p>
* @returns {String}
*/
/**
* @method getFieldName
* <p>Returns the field name for the specified field index.</p>
* @param {Number} index
<p>A zero-based column index for the field.</p>
* @returns {String}
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method isValidRow
* <p>Returns whether the current row is valid.</p>
* @returns {Boolean}
*/
/**
* @method next
* <p>Advances to the next row in the result set and returns <code>true</code> if one exists,
or <code>false</code> otherwise.</p>
* @returns {Boolean}
*/
/**
* @method getFieldCount
* <p>Gets the value of the {@link Titanium.Database.ResultSet#property-fieldCount} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @method getRowCount
* <p>Gets the value of the {@link Titanium.Database.ResultSet#property-rowCount} property.</p>
* @returns {Number}
*/
/**
* @method getValidRow
* <p>Gets the value of the {@link Titanium.Database.ResultSet#property-validRow} property.</p>
* @returns {Boolean}
*/
/**
* @property fieldCount
* @type Number
* @readonly
* <p>The number of columns in this result set.</p>
* @platform android 0.8
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @property rowCount
* @type Number
* @readonly
* <p>The number of rows in this result set.</p>
*/
/**
* @property validRow
* @type Boolean
* @readonly
* <p>Indicates whether the current row is valid.</p>
*/
/**
* @class ErrorResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/ErrorResponse.yml
* <p>Properties used in any event or callback which needs to report a success or failure.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded.</p>
* @description <p>Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Will be undefined if <code>success</code> is <code>true</code>.</p>
*/
/**
* @property code
* @type Number
* <p>Error code. Returns 0 if <code>success</code> is <code>true</code>.</p>
* @description <p>Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
*/
/**
* @class SuccessResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/ErrorResponse.yml
* <p>Properties used in any event or callback which needs to report a success.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded. Returns <code>true</code>.</p>
* @description <p>Returns <code>true</code>.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Will be undefined.</p>
*/
/**
* @property code
* @type Number
* <p>Error code. Returns 0.</p>
* @description <p>Error code will be 0.</p>
*/
/**
* @class FailureResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/ErrorResponse.yml
* <p>Properties used in any event or callback which needs to report a failure.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded. Returns <code>false</code>.</p>
* @description <p>Returns <code>false</code>.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>May be undefined.</p>
*/
/**
* @property code
* @type Number
* <p>Error code. Returns a non-zero value.</p>
* @description <p>If the error was generated by the operating system, that system's error value
is used. Otherwise, this value will be -1.</p>
*/
/**
* @class Titanium.Event
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Event.yml
* <p>The base type for all Titanium events.</p>
*/
/**
* @property bubbles
* @type Boolean
* @readonly
* <p>True if the event will try to bubble up if possible.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [cancelBubble=false]
* @type Boolean
* <p>Set to true to stop the event from bubbling.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property source
* @type Object
* @readonly
* <p>Source object that fired the event.</p>
*/
/**
* @property type
* @type String
* @readonly
* <p>Name of the event fired.</p>
*/
/**
* @class Titanium.Facebook
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 2.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Facebook/Facebook.yml
* <p>The top level Facebook module. </p>
* @deprecated 3.1.0 On Mobile Web, continue to use this module.
On Android and iOS, use <Modules.Facebook> instead.
* @description <p><strong>Note:</strong> In Titanium 3.1, the <code>Titianium.Facebook</code> module on Android and iOS is replaced by the
{@link Modules.Facebook} add-on module that uses more recent versions of the native Facebook SDKs for
Android and iOS. For Mobile Web, continue to use <code>Titanium.Facebook</code>.</p>
<p>The Facebook module is used for connecting your application with
Facebook. This module supports the following features:</p>
<ul>
<li><p>Logging in to Facebook and authorizing your application.</p></li>
<li><p>Making requests through the Facebook Graph API using
{@link Titanium.Facebook#method-requestWithGraphPath requestWithGraphPath}.</p></li>
<li><p>Making requests through the legacy Facebook REST API using
{@link Titanium.Facebook#method-request request}. </p></li>
<li><p>Posting Facebook dialogs.</p></li>
</ul>
<h4>Facebook Login and Authorization</h4>
<p>To use Facebook, a user must log in to Facebook and explicitly authorize the
application to perform certain actions, such as accessing profile information or
posting status messages. </p>
<p>There are two ways to initiate the login process:</p>
<ul>
<li><p>Call {@link Titanium.Facebook#method-authorize authorize} prompt the user to login and authorize
the application.</p></li>
<li><p>Create a Facebook {@link Titanium.Facebook.LoginButton LoginButton} to allow the user to
log in if desired.</p></li>
</ul>
<p>Which approach you take depends on your UI and how central Facebook is to your
application.</p>
<p>Before calling <code>authorize</code> or creating a login button, you must set the
{@link Titanium.Facebook#property-appid appid} and {@link Titanium.Facebook#property-permissions permissions}
properties. </p>
<p>To create a Facebook App ID, go to the Facebook Developer App:</p>
<p><a href="https://developers.facebook.com/apps">developers.facebook.com/apps</a></p>
<p>For a complete list of permissions, see the
<a href="http://developers.facebook.com/docs/reference/api/permissions/">official Facebook Permissions Reference</a></p>
<h4>Facebook Graph API</h4>
<p>The Facebook Graph API is the preferred method for getting information about a user's friends,
news feed, and so on. Each object in the Facebook social graph is represented by a
graph API <em>object</em>, such as a user, photo, or status message. </p>
<p>The Graph API allows you to make requests on behalf of the user, such as posting a
picture or status message. </p>
<p>Use the {@link Titanium.Facebook#method-requestWithGraphPath requestWithGraphPath} method to make a
request to the Graph API.</p>
<p>For details on each of the Graph API objects and the supported operations, see the
<a href="http://developers.facebook.com/docs/reference/api/">official Facebook Graph API documentation</a>.</p>
<h4>Facebook REST API</h4>
<p>The Facebook REST API is in the process of being deprecated, and should not be used
unless your application relies on an API that doesn't exist in the Graph API.</p>
<p>Use the {@link Titanium.Facebook#method-request request} method to make a request to the REST API.</p>
<p>For details on the REST API, see the
<a href="http://developers.facebook.com/docs/reference/rest/">official Facebook REST API documentation</a>.</p>
<h4>Facebook Dialogs</h4>
<p>Facebook dialogs are standard user-interface components for used to prompt users to
interact with Facebook in a specific way, such as:</p>
<ul>
<li><p>Sending an application request</p></li>
<li><p>Sending a status update</p></li>
<li><p>Adding a friend</p></li>
</ul>
<p>Because dialogs require user interaction, they do not require Facebook permissions.</p>
<p>For details on different dialogs see the
<a href="http://developers.facebook.com/docs/reference/dialogs/">official Facebook Dialogs documentation</a>. </p>
<h4>iOS Platform Implementation Notes</h4>
<p>Due to how the facebook login process works on iOS, your app will need to have the following
in your tiapp.xml if you target those platforms:</p>
<pre><code><property name="ti.facebook.appid">your_facebook_app_id_here</property >
</code></pre>
<p>You must still set Ti.Facebook.appid within your app itself to use the facebook module. <br>
This property is used only for configuring your app to interface with the facebook
login process.</p>
<h4>Previous Versions</h4>
<p>Titanium Mobile SDK 1.6.0 marked a significant change for this module. Older versions of
the module were not compatible with the new Graph API. Applications written for the
pre-1.6.0 version of this module will <strong>not</strong> work with the 1.6.0 and higher versions. <br>
Nor is the code shown in the examples here backwards-compatible with pre-1.6.0 Titanium
Mobile SDK.</p>
* <h3>Examples</h3>
<h4>Authorize</h4>
<p>Shows official Facebook dialog for logging in the user and prompting the user to approve your
requested permissions. Listen for the module's {@link Titanium.Facebook#event-login login} event to
determine whether the request succeeded.</p>
<pre><code>Ti.Facebook.appid = '[YOUR APPID]';
Ti.Facebook.permissions = ['publish_stream']; // Permissions your app needs
Ti.Facebook.addEventListener('login', function(e) {
if (e.success) {
alert('Logged In');
} else if (e.error) {
alert(e.error);
} else if (e.cancelled) {
alert("Canceled");
}
});
Ti.Facebook.authorize();
</code></pre><h4>Logout</h4>
<p>Logout the user and forget the authorization token. The
{@link Titanium.Facebook#method-logout logout} event is fired after the user is logged out.</p>
<pre><code>Ti.Facebook.addEventListener('logout', function(e) {
alert('Logged out');
});
Ti.Facebook.logout();
</code></pre><h4>Authorize/Logout Using the Facebook LoginButton</h4>
<p>You can use the the Facebook-themed {@link Titanium.Facebook.LoginButton LoginButton}
to allow the user to log in as required. The button updates its state automatically depending
on whether the user is logged in or not. When the user is logged in, then the button
will show "Logout", and vice-versa.</p>
<p>Note that you don't need to set a click listener or anything else on the button.
It "just works". To be notified when the user logs in or out, add event listeners for the
{@link Titanium.Facebook#event-login login} and {@link Titanium.Facebook#method-logout logout} events
provided by the Titanium Facebook module, as in the example below.</p>
<pre><code>// Don't forget to set your appid and requested permissions, else the login button
// won't be effective.
Ti.Facebook.appid = '[your appid]';
Ti.Facebook.permissions = ['publish_stream'];
Ti.Facebook.addEventListener('login', function(e) {
if (e.success) {
alert('Logged in');
}
});
Ti.Facebook.addEventListener('logout', function(e) {
alert('Logged out');
});
// Add the button. Note that it doesn't need a click event listener.
win2.add(Ti.Facebook.createLoginButton({
top : 50,
style : Ti.Facebook.BUTTON_STYLE_WIDE
}));
</code></pre>
<p>The specified button style ('wide' or <code>BUTTON_STYLE_WIDE</code>) shows a wide version of the
button that displays "Connect with Facebook" instead of just "Connect".</p><h4>Simple Graph API Call</h4>
<p>This example makes a call to the "me" graph path, which represents the current
user. The JSON results are simply displayed in an alert. This example assumes
the user is already logged in (you can check this with {@link Titanium.Facebook#property-loggedIn}).</p>
<pre><code>Ti.Facebook.requestWithGraphPath('me', {}, 'GET', function(e) {
if (e.success) {
alert(e.result);
} else if (e.error) {
alert(e.error);
} else {
alert('Unknown response');
}
});
</code></pre><h4>Create an Event Using the Graph API</h4>
<p>This example uses the Graph API to create an event <br>
in the logged-on user's Facebook account. This requires the "create_event" permission.</p>
<pre><code>// First make sure this permission exists
Ti.Facebook.permissions = ['create_event'];
Ti.Facebook.authorize();
// ...
// ...
// Now create the event after you've confirmed authorize() was successful.
var starttime = new Date(2012, 4, 31, 17, 0);
var endtime = new Date(2012, 4, 31, 19, 0);
var title = "Barry's Birthday Celebration";
var description = "Barry will have a great party";
var data = {
start_time: JSON.stringify(starttime), // API expects a JSON stringified date
end_time: JSON.stringify(endtime),
summary: description,
name: title
};
Ti.Facebook.requestWithGraphPath('me/events', data, 'POST', function(e) {
if (e.success) {
alert("Success! Returned from FB: " + e.result);
} else {
if (e.error) {
alert(e.error);
} else {
alert("Unknown result");
}
}
});
</code></pre>
<p>For more information on the Event object, see:</p>
<ul>
<li><a href="http://developers.facebook.com/docs/reference/api/event/">Event in the Facebook Graph API Reference</a>.</li>
</ul><h4>Set a User's Facebook Status Using the Graph API</h4>
<p>This example uses the Graph API to set the user's Facebook status, which requires the
"publish_stream" permission.</p>
<pre><code>// First make sure this permission exists
Ti.Facebook.permissions = ['publish_stream'];
Ti.Facebook.authorize();
// ...
// ...
// Now create the status message after you've confirmed that authorize() succeeded
Ti.Facebook.requestWithGraphPath('me/feed', {message: "Trying out FB Graph API and it's fun!"},
"POST", function(e) {
if (e.success) {
alert("Success! From FB: " + e.result);
} else {
if (e.error) {
alert(e.error);
} else {
alert("Unkown result");
}
}
});
</code></pre>
<p>For more information on the Staus object, see:</p>
<ul>
<li><a href="http://developers.facebook.com/docs/reference/api/status/">Status in the Facebook Graph API Reference</a>. </li>
</ul><h4>Post a Photo Using the Graph API</h4>
<p>This example posts a photo to the user's account using the Graph API.
Another example below shows how to do this with the REST API, if desired.
This requires the "publish_stream" permission.</p>
<pre><code>// First make sure this permission exists
Ti.Facebook.permissions = ['publish_stream'];
Ti.Facebook.authorize();
// ...
// ...
// Now post the photo after you've confirmed that authorize() succeeded
var f = Ti.Filesystem.getFile('pumpkin.jpg');
var blob = f.read();
var data = {
message: 'This is a pumpkin',
picture: blob
};
Ti.Facebook.requestWithGraphPath('me/photos', data, 'POST', function(e){
if (e.success) {
alert("Success! From FB: " + e.result);
} else {
if (e.error) {
alert(e.error);
} else {
alert("Unkown result");
}
}
});
</code></pre>
<p>For more information on posting photos, see:</p>
<ul>
<li><a href="http://developers.facebook.com/docs/reference/api/photo/">Photo in the Facebook Graph API Reference</a> </li>
</ul><h4>Post a photo using the REST API</h4>
<p>This example posts a photo to the user's account using the REST API. Another example above shows
how to do this with the Graph API. This requires the "publish_stream" permission.</p>
<pre><code>// First make sure this permission exists
Ti.Facebook.permissions = ['publish_stream'];
Ti.Facebook.authorize();
// ...
// ...
// Now post the photo after you've confirmed that authorize() succeeded
var f = Ti.Filesystem.getFile('pumpkin.jpg');
var blob = f.read();
var data = {
caption: 'This is a pumpkin',
picture: blob
};
Ti.Facebook.request('photos.upload', data, function(e){
if (e.success) {
alert("Success! From FB: " + e.result);
} else {
if (e.error) {
alert(e.error);
} else {
alert("Unkown result");
}
}
});
</code></pre>
<p>For more information on posting photos using the REST API, see:</p>
<ul>
<li><a href="http://developers.facebook.com/docs/reference/rest/photos.upload/">photos.upload in the Facebook REST API Reference</a> </li>
</ul><h4>Show the Facebook Feed Dialog</h4>
<p>This example shows how to display the offical Facebook Feed Dialog, for adding a
post to the user's wall. In this example, we'll prefill some of the feed fields by
passing a data dictionary to the {@link Titanium.Facebook#method-dialog dialog} method; this is not required.</p>
<pre><code>var data = {
link : "http://www.appcelerator.com",
name : "Appcelerator Titanium Mobile",
message : "Checkout this cool open source project for creating mobile apps",
caption : "Appcelerator Titanium Mobile",
picture : "http://developer.appcelerator.com/assets/img/DEV_titmobile_image.png",
description : "You've got the ideas, now you've got the power. Titanium translates " +
"your hard won web skills into native applications..."
};
Titanium.Facebook.dialog("feed", data, function(e) {
if(e.success && e.result) {
alert("Success! New Post ID: " + e.result);
} else {
if(e.error) {
alert(e.error);
} else {
alert("User canceled dialog.");
}
}
});
</code></pre>
<p>For more information on Facebook Dialogs, see:</p>
<ul>
<li><a href="http://developers.facebook.com/docs/reference/dialogs/">Facebook Dialog Reference</a> </li>
</ul>
*/
/**
* @event login
* <p>Fired at session login.</p>
* @param {String} uid
<p>User ID returned by Facebook if the login was successful.</p>
* @param {Boolean} success
<p>Indicates if the login was successful.</p>
* @param {String} data
<p>Data returned by Facebook when we query for the UID (using graph path "me")
after a successful login. Data is in JSON format, and includes information
such as user name, locale and gender.</p>
* @param {String} error
<p>Error message, if request failed.</p>
* @param {String} cancelled
<p>Indicates if the user canceled the login request by closing the dialog.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event logout
* <p>Fired at session logout.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method authorize
* <p>Prompts the user to log in (if not already logged in) and authorize your application. </p>
* @description <p>Be sure to set your {@link Titanium.Facebook#property-appid appid} and your required
{@link Titanium.Facebook#property-permissions permissions} before calling <code>authorize</code>.</p>
<p>A {@link Titanium.Facebook#event-login login} event is generated to indicate successful or
unsuccessful login attempt.</p>
*/
/**
* @method dialog
* <p>Opens a supported Facebook dialog.</p>
* @description <p>For a list of dialogs, parameters, and response formats, see the
<a href="http://developers.facebook.com/docs/reference/dialogs/">official documentation for Facebook Dialogs</a>. </p>
<p>The callback is invoked when the dialog is closed, either because the user
approved the action, or canceled the dialog.</p>
* @param {String} action
<p>Specifies which dialog to show, such as "feed".</p>
* @param {Object} params
<p>A dictionary object for pre-filling some of the dialog's fields. <br>
See <a href="Titanium.Facebook#examples">Code Examples</a>.</p>
* @param {Callback<FacebookDialogResponsev1>} callback
<p>Callback to invoke when the user completes or cancels the dialog.</p>
*/
/**
* @method logout
* <p>Clears the OAuth <code>accessToken</code> and logs out the user.</p>
*/
/**
* @method request
* <p>Makes a request to the legacy Facebook REST API.</p>
* @description <p>For details on API calls and responses, see the
<a href="http://developers.facebook.com/docs/reference/rest/">offical Facebook REST API documentation</a>.</p>
* @param {String} method
<p>The REST API method to call.</p>
* @param {Object} params
<p>A dictionary object for setting parameters required by the call, if any.
See <a href="Titanium.Facebook#examples">Code Examples</a>.</p>
* @param {Callback<FacebookRESTResponsev1>} callback
<p>Callback to invoke when the request completes.</p>
*/
/**
* @method requestWithGraphPath
* <p>Makes a Facebook Graph API request.</p>
* @description <p>If the request requires user authorization, the user must be logged in, and your app
must be authorized to make the request. You can check the
{@link Titanium.Facebook#property-loggedIn loggedIn} property to determine if the user is logged in.</p>
<p>Every Facebook object has an associated path. For example, "me" requests information about
the current user.</p>
<p>For a complete list of Graph API methods, parameters and return types, see the
<a href="http://developers.facebook.com/docs/reference/api/">official Facebook Graph API documentation</a>.</p>
* @param {String} path
<p>Graph API path to request.</p>
* @param {Dictionary} params
<p>A dictionary object for setting parameters required by the call, if any. <br>
See <a href="Titanium.Facebook#examples">Code Examples</a>.</p>
* @param {String} httpMethod
<p>The HTTP method (GET/POST/DELETE) to use for the call.</p>
* @param {Callback<FacebookGraphResponsev1>} callback
<p>Callback to invoke when the request completes.</p>
*/
/**
* @method getAccessToken
* <p>Gets the value of the {@link Titanium.Facebook#property-accessToken} property.</p>
* @returns {String}
*/
/**
* @method setAccessToken
* <p>Sets the value of the {@link Titanium.Facebook#property-accessToken} property.</p>
* @param {String} accessToken
<p>New value for the property.</p>
*/
/**
* @method getAppid
* <p>Gets the value of the {@link Titanium.Facebook#property-appid} property.</p>
* @returns {String}
*/
/**
* @method setAppid
* <p>Sets the value of the {@link Titanium.Facebook#property-appid} property.</p>
* @param {String} appid
<p>New value for the property.</p>
*/
/**
* @method getExpirationDate
* <p>Gets the value of the {@link Titanium.Facebook#property-expirationDate} property.</p>
* @returns {Date}
*/
/**
* @method setExpirationDate
* <p>Sets the value of the {@link Titanium.Facebook#property-expirationDate} property.</p>
* @param {Date} expirationDate
<p>New value for the property.</p>
*/
/**
* @method getForceDialogAuth
* <p>Gets the value of the {@link Titanium.Facebook#property-forceDialogAuth} property.</p>
* @returns {Boolean}
*/
/**
* @method setForceDialogAuth
* <p>Sets the value of the {@link Titanium.Facebook#property-forceDialogAuth} property.</p>
* @param {Boolean} forceDialogAuth
<p>New value for the property.</p>
*/
/**
* @method getLoggedIn
* <p>Gets the value of the {@link Titanium.Facebook#property-loggedIn} property.</p>
* @returns {Boolean}
*/
/**
* @method setLoggedIn
* <p>Sets the value of the {@link Titanium.Facebook#property-loggedIn} property.</p>
* @param {Boolean} loggedIn
<p>New value for the property.</p>
*/
/**
* @method getPermissions
* <p>Gets the value of the {@link Titanium.Facebook#property-permissions} property.</p>
* @returns {String[]}
*/
/**
* @method setPermissions
* <p>Sets the value of the {@link Titanium.Facebook#property-permissions} property.</p>
* @param {Array<String>} permissions
<p>New value for the property.</p>
*/
/**
* @method getUid
* <p>Gets the value of the {@link Titanium.Facebook#property-uid} property.</p>
* @returns {String}
*/
/**
* @method setUid
* <p>Sets the value of the {@link Titanium.Facebook#property-uid} property.</p>
* @param {String} uid
<p>New value for the property.</p>
*/
/**
* @method createLoginButton
* <p>Creates and returns an instance of {@link Titanium.Facebook.LoginButton}.</p>
* @deprecated 3.1.0 On Mobile Web, continue to use this module.
On Android and iOS, use <Modules.Facebook.LoginButton> instead.
* @param {Dictionary<Titanium.Facebook.LoginButton>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Facebook.LoginButton} except those marked not-creation or read-only.</p>
* @returns {Titanium.Facebook.LoginButton}
*/
/**
* @property BUTTON_STYLE_NORMAL
* @type Number
* @readonly
* <p>Use with {@link Titanium.Facebook.LoginButton#property-style LoginButton.style} to specify
the default login button reading "Connect" or "Login".</p>
*/
/**
* @property BUTTON_STYLE_WIDE
* @type Number
* @readonly
* <p>Use with {@link Titanium.Facebook.LoginButton#property-style LoginButton.style} to specify
a wide login button reading "Connect with Facebook" or "Login with Facebook".</p>
*/
/**
* @property accessToken
* @type String
* <p>OAuth token set after a successful <code>authorize</code>.</p>
*/
/**
* @property appid
* @type String
* <p>Your Facebook application id. You need to set this for anything to work.</p>
*/
/**
* @property expirationDate
* @type Date
* <p>Time at which the <code>accessToken</code> expires.</p>
*/
/**
* @property [forceDialogAuth=true]
* @type Boolean
* <p>Indicates whether the login should use the traditional dialog-based
authentication.</p>
* @description <p>Set to <code>false</code> to enable Single-Sign-On (SSO) in cases where the official Facebook app is on the
device. Default is <code>true</code>, meaning the traditional, dialog-based
authentication is used rather than SSO. See the
<a href="http://developers.facebook.com/docs/guides/mobile">Facebook Mobile Guide</a> for
details of their Single-Sign-On scheme.</p>
<p>This property is read-only on Mobile Web.</p>
*/
/**
* @property loggedIn
* @type Boolean
* <p>Indicates if the user is logged in.</p>
*/
/**
* @property permissions
* @type String[]
* <p>Array of permissions to request for your app.</p>
* @description <p>Be sure the permissions you want are set before calling
{@link Titanium.Facebook#method-authorize authorize}..</p>
*/
/**
* @property uid
* @type String
* <p>Unique user ID returned from Facebook.</p>
*/
/**
* @class FacebookGraphResponsev1
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Facebook/Facebook.yml
* <p>Argument passed to the graph API callback, in response to a
{@link Titanium.Facebook#method-requestWithGraphPath requestWithGraphPath} call.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the request succeeded.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if request failed.</p>
*/
/**
* @property path
* @type String
* <p>Graph API path of the original request.</p>
*/
/**
* @property result
* @type String
* <p>JSON response returned by Facebook.</p>
*/
/**
* @class FacebookDialogResponsev1
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Facebook/Facebook.yml
* <p>Argument passed to the dialog callback when a dialog is completed or canceled.</p>
* @description <p>The <code>success</code> and <code>cancelled</code> properties may not be reliable for dialogs. In the event
that the user canceled the dialog, the <code>result</code> field is <code>undefined</code>.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the request succeeded.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if request failed.</p>
*/
/**
* @property cancelled
* @type Boolean
* <p>Indicates if the user canceled the dialog.</p>
*/
/**
* @property result
* @type String
* <p>JSON response containing the <code>post_id</code> of the new post, if successful.
<code>undefined</code> if the user canceled the dialog.</p>
*/
/**
* @class FacebookRESTResponsev1
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Facebook/Facebook.yml
* <p>Argument passed to the REST API callback when a request completes (successfully
or unsuccessfully).</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the request succeeded.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if request failed.</p>
*/
/**
* @property method
* @type String
* <p>REST method call you specified.</p>
*/
/**
* @property result
* @type String
* <p>JSON response returned by Facebook.</p>
*/
/**
* @class Titanium.Facebook.LoginButton
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 2.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Facebook/LoginButton.yml
* <p>A Facebook login button.</p>
* @deprecated 3.1.0 On Mobile Web, continue to use this module.
On Android and iOS, use <Modules.Facebook.LoginButton> instead.
* @description <p>The Login Button created by {@link Titanium.Facebook#method-createLoginButton}. This is a
Facebook-themed button that does not require a click event handler or any listeners. <br>
Click events on the button are automatically handled by the Facebook module.</p>
<p>The button changes its label to reflect the current state of the Facebook
session. For example, if the user is already logged in, this button will show "Logout".</p>
<p>See the examples in the {@link Titanium.Facebook} documentation.</p>
* <h3>Examples</h3>
<h4>Alloy XML Markup</h4>
<p>Example of using the Facebook Login Button in Alloy.</p>
<p>facebook.xml:</p>
<pre><code><Alloy>
<Window id="socialWin">
<LoginButton ns="Ti.Facebook" />
</Window>
</Alloy>
</code></pre>
<p>facebook.js:</p>
<pre><code>Ti.Facebook.appid = APP_ID;
Ti.Facebook.permissions = [APP_PERMISSIONS];
$.socialWin.open();
</code></pre>
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.Facebook.LoginButton#property-style} property.</p>
* @returns {String}
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.Facebook.LoginButton#property-style} property.</p>
* @param {String} style
<p>New value for the property.</p>
*/
/**
* @property style
* @type String
* <p>Sets the login button style.</p>
* @description <p>All versions of the button include the Facebook logo.</p>
<p>Use {@link Titanium.Facebook#property-BUTTON_STYLE_WIDE BUTTON_STYLE_WIDE} to show a wider version of the button
that includes the text, "Login with Facebook" or "Connect with Facebook".</p>
<p>Use {@link Titanium.Facebook#property-BUTTON_STYLE_NORMAL BUTTON_STYLE_NORMAL} to show a
narrower button that simply says, "Login" or "Connect".</p>
*/
/**
* @class Titanium.Filesystem.File
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Filesystem/File.yml
* <p>Object representing a path to a file or directory in the device's persistent storage.</p>
* @description <p>Use the {@link Titanium.Filesystem#method-getFile} method to get a handle to a <code>File</code> object,
which represents a given path. There does not need to be an existing file or directory
does not need to exist before <code>getFile</code> is called. If the file doesn't exist, and
the file path identifies a file in a writable directory, writing to the file
creates the file implicitly. </p>
<p>See {@link Titanium.Filesystem} for constants identifying commonly-used device directories.</p>
<p>Use the {@link Titanium.Filesystem.File#method-exists exists} method to test whether the file exists.</p>
<p>A file object can point to an ordinary file, a directory or a symbolic link.
Use {@link Titanium.Filesystem.File#method-createDirectory createDirectory} to create a directory.
Use the {@link Titanium.Filesystem.File#method-getDirectoryListing getDirectoryListing} method to
retrieve a list of the directory's contents.</p>
<p>The <code>File</code> object doesn't provide methods for random access into the file.
The <code>read</code> method reads the file's entire contents into a <code>Blob</code> object.
The <code>write</code> method can either overwrite the entire file or append to an
existing file. </p>
<p>For random access to a file, such as accessing a small portion of a larger file,
you can open a file as a {@link Titanium.Filesystem.FileStream FileStream} object. Use the
{@link Titanium.Filesystem.File#method-open open} method to get a <code>FileStream</code> for an
existing <code>File</code> object, or use the {@link Titanium.Filesystem#method-openStream} method
to get a <code>FileStream</code> directly without calling <code>getFile</code> first.</p>
<p>The {@link Titanium.Filesystem} module defines a number of properties and methods related to
filesystem access, including properties that specify paths for application-specific
directories, and methods for creating temporary files and directories.</p>
<p>On Android, files may be stored on external storage (that is, removable media such as
SD Cards).</p>
<p>Note that once created with <code>getFile</code>, the path associated with a file object is
immutable. If you move the underlying file using {@link Titanium.Filesystem.File#method-move move}
or {@link Titanium.Filesystem.File#method-rename rename}, you can no longer access it with the
original <code>File</code> object. You must use <code>getFile</code> to get a handle to the new path.</p>
<h4>Resource Files</h4>
<p>The <code>Resources</code> directory and all the files in it are read-only. On Android, resource
files are stored in the resource bundle and do not have all of the properties of
normal files. In particular, they do not have creation or modification timestamps.</p>
* <h3>Examples</h3>
<h4>Reading a File</h4>
<p>Data files shipped with the application are stored in the resources directory.</p>
<p>This example reads string data from a text file.</p>
<pre><code>// resourcesDirectory is actually the default location, so the first
// argument could be omitted here.
file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, "textfile.txt");
var blob = file.read();
var readText = blob.text;
// dispose of file handle & blob.
file = null;
blob = null;
</code></pre><h4>Creating a Subdirectory</h4>
<p>Files that the application writes to need to be stored outside of the
resources directory, since that directory is read-only.</p>
<p>This example creates a subdirectory to store downloaded images.
The example assumes that two variables are defined elsewhere in the code:
myImageID, a string containing some kind of ID for the downloaded image,
and myImageData, a <code>Blob</code> containing JPEG image data.</p>
<pre><code>var imageDir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,
'downloaded_images');
if (! imageDir.exists()) {
imageDir.createDirectory();
}
// .resolve() provides the resolved native path for the directory.
var imageFile = Ti.Filesystem.getFile(imageDir.resolve(), myImageID + '.jpg');
Ti.API.info("ImageFile path is: " + imageFile.resolve());
if (imageFile.write(myImageData)===false) {
// handle write error
}
// dispose of file handles
imageFile = null;
imageDir = null;
</code></pre>
*/
/**
* @method getProtectionKey
* <p>Returns the protection key value of this file object.
Returns <code>null</code> if there's an error.</p>
* @returns {String}
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Filesystem#property-IOS_FILE_PROTECTION_NONE}
<li> {@link Titanium.Filesystem#property-IOS_FILE_PROTECTION_COMPLETE}
<li> {@link Titanium.Filesystem#property-IOS_FILE_PROTECTION_COMPLETE_UNLESS_OPEN}
<li> {@link Titanium.Filesystem#property-IOS_FILE_PROTECTION_COMPLETE_UNTIL_FIRST_USER_AUTHENTICATION}
</ul></p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @method setProtectionKey
* <p>Sets the protection key as an attribute to the file identified by this file object.</p>
* @description <p>Returns <code>true</code> if successfully set. Returns <code>false</code> if failed.</p>
* @param {String} fileProtectionType
<p>File protection type.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Filesystem#property-IOS_FILE_PROTECTION_NONE}
<li> {@link Titanium.Filesystem#property-IOS_FILE_PROTECTION_COMPLETE}
<li> {@link Titanium.Filesystem#property-IOS_FILE_PROTECTION_COMPLETE_UNLESS_OPEN}
<li> {@link Titanium.Filesystem#property-IOS_FILE_PROTECTION_COMPLETE_UNTIL_FIRST_USER_AUTHENTICATION}
</ul></p>
* @returns {Boolean}
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @method getParent
* <p>Returns the path of the parent directory holding the file identified by this file object, as a String <strong>or</strong> as a <code>File</code> object.</p>
* @description <p>On iOS, this method returns the path of the parent directory as a String.</p>
<p>Android supports a {@link Titanium.Filesystem.File#property-parent parent} property, which
is a <code>File</code> object representing the parent directory path. The <code>getParent</code> method
on Android is a getter for the <code>parent</code> property, so it returns a <code>File</code> object
rather than a String.</p>
* @returns {String/Titanium.Filesystem.File}
*/
/**
* @method append
* <p>Appends data to the file identified by this file object.</p>
* @description <p>Data to append can be specified as a String, <code>Blob</code>, or <code>File</code>.</p>
<p>If the <code>data</code> argument is a <code>File</code> object, the file's contents
are appended to this file.</p>
<p>Returns <code>true</code> if the operation succeeds.</p>
* @param {String/Titanium.Blob/Titanium.Filesystem.File} data
<p>Data to append.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method copy
* <p>Copies the file identified by this file object to a new path.</p>
* @description <p>Returns <code>true</code> if the copy succeeds.</p>
* @param {String} destinationPath
<p>Destination path to copy to.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method createDirectory
* <p>Creates a directory at the path identified by this file object.</p>
* @description <p>Returns <code>true</code> if the directory was created successfully.</p>
* @returns {Boolean}
*/
/**
* @method createFile
* <p>Creates a file at the path identified by this file object.</p>
* @description <p>Note that if you write to a file that doesn't exist, the file is created automatically,
so it is not necessary to call this method unless you want to explicitly create the file
(for example, to create an empty file).</p>
<p>Returns <code>true</code> if the file was created successfully. Returns <code>false</code> if the
file already exists, or if the file couldn't be created for some other reason.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method createTimestamp
* <p>Returns the creation timestamp for the file identified by this file object.</p>
* @description <p>On Android, returns 0 for resource files.</p>
* @returns {Number}
*/
/**
* @method deleteDirectory
* <p>Deletes the directory identified by this file object.</p>
* @description <p>Returns <code>true</code> if the operation was successful. Does nothing if the file
object does not identify a directory.</p>
* @param {Boolean} recursive (optional)
<p>Pass <code>true</code> to recursively delete any directory contents.</p>
* @returns {Boolean}
*/
/**
* @method deleteFile
* <p>Deletes the file identified by this file object.</p>
* @description <p>Returns <code>true</code> if the operation was successful.</p>
* @returns {Boolean}
*/
/**
* @method exists
* <p>Returns <code>true</code> if the file or directory identified by this file object exists on the device.</p>
* @returns {Boolean}
*/
/**
* @method extension
* <p>Returns the extension for the file identified by this file object.</p>
* @returns {String}
*/
/**
* @method getDirectoryListing
* <p>Returns a listing of the directory identified by this file object, or <code>null</code>
if this object doesn't identify a directory.</p>
* @returns {String[]}
*/
/**
* @method isDirectory
* <p>Returns <code>true</code> if this file object represents a directory.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method isFile
* <p>Returns <code>true</code> if this file object represents an ordinary file.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method modificationTimestamp
* <p>Returns the last modification time for this file.</p>
* @description <p>On Android, returns 0 for resource files.</p>
* @returns {Number}
*/
/**
* @method move
* <p>Moves the file identified by this file object to another path.</p>
* @description <p>Note that this method moves the stored file, but doesn't update this
file object to point to the new path. To access the file after moving it,
you must call {@link Titanium.Filesystem#method-getFile getFile} using the destination
path to obtain a new file handle.</p>
* @param {String} newpath
<p>New location for the file.</p>
* @returns {Boolean}
*/
/**
* @method open
* <p>Opens the file identified by this file object for random access.</p>
* @description <p>You can open the file for reading, writing, or appending by specifying one of the
<code>MODE</code> constants from {@link Titanium.Filesystem}:
{@link Titanium.Filesystem#property-MODE_READ MODE_READ}, {@link Titanium.Filesystem#property-MODE_WRITE MODE_WRITE},
or {@link Titanium.Filesystem#property-MODE_APPEND MODE_APPEND}.</p>
<p>The <code>FileStream</code> object returned by this call can be used to read from, write to, or
append to the file, depending on what mode the file is opened in.</p>
* @param {Number} mode
<p>Mode to open the file in: <code>MODE_READ</code>, <code>MODE_WRITE</code>, or <code>MODE_APPEND</code>.</p>
* @returns {Titanium.Filesystem.FileStream}
*/
/**
* @method read
* <p>Returns the contents of the file identified by this file object as a <code>Blob</code>.</p>
* @returns {Titanium.Blob}
*/
/**
* @method rename
* <p>Renames the file identified by this file object.</p>
* @description <p>Returns <code>true</code> if the file was successfully renamed.</p>
<p>Fails if the destination is in a different directory than the current file.
Use {@link Titanium.Filesystem.File#method-move move} to move a file to a different directory.</p>
<p>Note that this method renames the stored file, but doesn't update this
file object to point to the new path. To access the file after renaming it,
you must call {@link Titanium.Filesystem#method-getFile getFile} using the destination
path to obtain a new file handle.</p>
* @param {String} newname
<p>New name for the file.</p>
* @returns {Boolean}
*/
/**
* @method resolve
* <p>Returns the fully-resolved native path associated with this file object.</p>
* @description <p>On iOS, the path returned by this method is a plain file path, not a URL. It is suitable
for use in native modules that need to access the file using native APIs.</p>
<p>On Android, the return value of <code>resolve</code> is a <code>file://</code> URL, identical to the
{@link Titanium.Filesystem.File#property-nativePath nativePath} property.</p>
* @returns {String}
*/
/**
* @method spaceAvailable
* <p>Returns the amount of free space available on the device where the file identified by this file object is stored.</p>
* @description <p>Free space is returned in bytes.</p>
* @returns {Number}
*/
/**
* @method write
* <p>Writes the specified data to the file identified by this file object.</p>
* @description <p>If the <code>append</code> parameter is <code>false</code> or not specified, any existing data in
the file is overwritten. </p>
<p>If <code>append</code> is <code>true</code>, the specified data is appended to the end of the file.</p>
* @param {String/Titanium.Filesystem.File/Titanium.Blob} data
<p>Data to write, as a String, <code>Blob</code> or <code>File</code> object.</p>
* @param {Boolean} append (optional)
<p>If <code>true</code>, append the data to the end of the file.</p>
* @returns {Boolean}
*/
/**
* @method getExecutable
* <p>Gets the value of the {@link Titanium.Filesystem.File#property-executable} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getRemoteBackup
* <p>Gets the value of the {@link Titanium.Filesystem.File#property-remoteBackup} property.</p>
* @returns {Boolean}
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @method setRemoteBackup
* <p>Sets the value of the {@link Titanium.Filesystem.File#property-remoteBackup} property.</p>
* @param {Boolean} remoteBackup
<p>New value for the property.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @method getSymbolicLink
* <p>Gets the value of the {@link Titanium.Filesystem.File#property-symbolicLink} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getWriteable
* <p>Gets the value of the {@link Titanium.Filesystem.File#property-writeable} property.</p>
* @removed 6.0.0 Use <Titanium.Filesystem.File.writable> instead.
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getHidden
* <p>Gets the value of the {@link Titanium.Filesystem.File#property-hidden} property.</p>
* @returns {Boolean}
*/
/**
* @method setHidden
* <p>Sets the value of the {@link Titanium.Filesystem.File#property-hidden} property.</p>
* @param {Boolean} hidden
<p>New value for the property.</p>
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.Filesystem.File#property-name} property.</p>
* @returns {String}
*/
/**
* @method getNativePath
* <p>Gets the value of the {@link Titanium.Filesystem.File#property-nativePath} property.</p>
* @returns {String}
*/
/**
* @method getParent
* <p>Gets the value of the {@link Titanium.Filesystem.File#property-parent} property.</p>
* @returns {Titanium.Filesystem.File}
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getReadonly
* <p>Gets the value of the {@link Titanium.Filesystem.File#property-readonly} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getSize
* <p>Gets the value of the {@link Titanium.Filesystem.File#property-size} property.</p>
* @returns {Number}
*/
/**
* @method getWritable
* <p>Gets the value of the {@link Titanium.Filesystem.File#property-writable} property.</p>
* @returns {Boolean}
*/
/**
* @property executable
* @type Boolean
* @readonly
* <p><code>true</code> if the file is executable.</p>
* @description <p>On iOS, Mobile Web, this property exists but is always <code>false</code>.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [remoteBackup=true]
* @type Boolean
* <p>Value indicating whether or not to back up to a cloud service.</p>
* @description <p>Some apps may be rejected by Apple for backing up specific files; if this
is the case, ensure that this value is set to <code>false</code> for them. This
value should only need to be set once by your app, but setting it
multiple times will not cause problems. For files distributed with your
app, this will need to be set on boot. This flag will only affect iOS
versions 5.0.1 and later, but is safe to set on earlier versions.</p>
<p>Note that setting this property to <code>false</code> will also prevent the
file identified by this object from being backed up to iTunes.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @property symbolicLink
* @type Boolean
* @readonly
* <p><code>true</code> if the file identified by this object is a symbolic link.</p>
* @description <p>On Mobile Web, this property exists but is always <code>false</code>.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property writeable
* @type Boolean
* @readonly
* <p><code>true</code> if the file identified by this object is writable.</p>
* @removed 6.0.0 Use <Titanium.Filesystem.File.writable> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property hidden
* @type Boolean
* <p>Set to <code>true</code> if the file is hidden.</p>
* @description <p>On iOS, Mobile Web, this property exists but is always <code>false</code>.</p>
*/
/**
* @property name
* @type String
* @readonly
* <p>Name of the file.</p>
*/
/**
* @property nativePath
* @type String
* @readonly
* <p>Native path associated with this file object, as a file URL.</p>
* @description <p>On iOS, use the {@link Titanium.Filesystem.File#method-resolve resolve}
method to obtain a plain file path for use with native modules.</p>
*/
/**
* @property parent
* @type Titanium.Filesystem.File
* @readonly
* <p>A <code>File</code> object representing the parent directory of the file identified by this object.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property readonly
* @type Boolean
* @readonly
* <p><code>true</code> if the file identified by this object is read-only.</p>
* @description <p>On Mobile Web, this property exists but is always <code>true</code> for files in the resources directory
and <code>false</code> for application data and temporary files.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property size
* @type Number
* @readonly
* <p>Size, in bytes, of the file identified by this object.</p>
*/
/**
* @property writable
* @type Boolean
* @readonly
* <p><code>true</code> if the file identified by this object is writable.</p>
*/
/**
* @class Titanium.Filesystem.FileStream
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.IOStream
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Filesystem/FileStream.yml
* <p>Wrapper around <code>Titanium.Filesystem.File</code> that implements the <code>Titanium.IOStream</code> interface</p>
*/
/**
* @method close
* <p>closes file stream, exception is thrown on error</p>
* @description <p>Throws an exception on error.</p>
*/
/**
* @class Titanium.Filesystem
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Filesystem/Filesystem.yml
* <p>The top level filesystem module, used to access files and directories on the device.</p>
* @description <p>For examples of using the Filesystem APIs, refer to the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Filesystem_Access_and_Storage">Filesystem Access and Storage guide</a>
as well as the other Filesystem submodule API documentation.</p>
* <h3>Examples</h3>
<h4>Getting a directory for an application group (iOS)</h4>
<p>This example writes a string to a text file in a shared directory</p>
<pre><code>var suiteDir = Ti.Filesystem.directoryForSuite('group.appc.Sharing');
if (!suiteDir) {
logInApp('Suite Directory not found, check Entitlements.');
return;
}
var f = Ti.Filesystem.getFile(suiteDir,'emptyfile.txt');
f.write('The file is no longer empty!');
</code></pre>
*/
/**
* @method getAsset
* <p>Returns a <code>Blob</code> object representing the asset catalog image identified by the path arguments.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>This method is only applicable on images in assets catalogs for apps with app-thinning
enabled on iOS. Since the bundled image has been reallocated into assets catalog, it is
no longer accessible via the original file path. To obtain a <code>Blob</code> object representing
this image, use the original file path as the parameter in this method instead of using it in
{@link Titanium.Filesystem#method-getFile getFile}</p>
<p>Similar to {@link Titanium.Filesystem#method-getFile getFile}, this method takes a variable
number of arguments, where each argument is treated as a path component.
All of the arguments are joined together using the platform-specific path separator
to make the final path.</p>
<p>If a relative path is passed, the full path should be interpreted relative
to the current file. For example, if the file <code>Resources/login/login.js</code>
contains the following code:</p>
<pre><code>var icon = Titanium.Filesystem.getAsset('icon.png');
</code></pre>
<p>The path is interpreted as <code>Resources/login/icon.png</code>. </p>
<p>On iOS, all relative paths are currently interpreted as relative to the
<code>Resources</code> directory, <strong>not</strong> to the current context. This is a known issue
that will be addressed in a future release.</p>
* @param {String} path
<p>One or more path components. Path arguments are joined together using the platform specific path separator to form the full path.</p>
* @returns {Titanium.Blob}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method hasStoragePermissions
* <p>Returns <code>true</code> if the app has storage permissions.</p>
* @returns {Boolean}
* @platform android 5.4.0
*/
/**
* @method requestStoragePermissions
* <p>Requests for storage permissions</p>
* @description <p>On Android, the request view will show if the permission is not accepted by the user, and the user did
not check the box "Never ask again" when denying the request. If the user checks the box "Never ask again,"
the user has to manually enable the permission in device settings.</p>
<p>This method requests <code>Manifest.permission.READ_EXTERNAL_STORAGE</code>. If you require other permissions, you can also
use {@link Titanium.Android#method-requestPermissions}.</p>
* @param {Callback<RequestStorageAccessResult>} callback
<p>Function to call upon user decision to grant storage access</p>
* @platform android 5.4.0
*/
/**
* @method openStream
* <p>Opens file using the {@link Titanium.IOStream} interface.</p>
* @param {Number} mode
<p>Access mode.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Filesystem#property-MODE_APPEND}
<li> {@link Titanium.Filesystem#property-MODE_READ}
<li> {@link Titanium.Filesystem#property-MODE_WRITE}
</ul></p>
* @param {String} path
<p>One or more path components. Path arguments are joined together using the
platform-specific path separator to form the full path. </p>
* @returns {Titanium.Filesystem.FileStream}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method directoryForSuite
* <p>Returns the path to the container directory associated with the specified security application group ID.</p>
* @description <p>This is a writable directory used on iOS. Groups of sandboxed apps that need to share files
and other information can request a container directory as part of their entitlements.</p>
<p>When called with a valid group identifier, this method returns the location of that directory as a string.
Returns null if the group identifier is invalid; check the app's entitlements.</p>
* @param {String} suiteName
<p>The name of the suite.</p>
* @returns {String}
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method getFile
* <p>Returns a <code>File</code> object representing the file identified by the path arguments.</p>
* @description <p>Note that <code>getFile</code> does not create a file if one does not exist at the specified
path. It returns a new <code>File</code> object referring to the specified file path. The
application can create a file at that path by calling
{@link Titanium.Filesystem.File#method-write write} or create a directory by calling
{@link Titanium.Filesystem.File#method-createDirectory createDirectory} on the <code>File</code> object.</p>
<p>This method takes a variable number of arguments, where each argument is treated
as a path component. All of the arguments are joined together using the
platform-specific path separator to make the final path.</p>
<p>If a relative path is passed, the full path should be interpreted relative
to the current file. For example, if the file <code>Resources/login/login.js</code>
contains the following code:</p>
<pre><code>var icon = Titanium.Filesystem.getFile('icon.png');
</code></pre>
<p>The path is interpreted as <code>Resources/login/icon.png</code>. </p>
<p>On iOS, all relative paths are currently interpreted as relative to the
<code>Resources</code> directory, <strong>not</strong> to the current context. This is a known issue
that will be addressed in a future release.</p>
<p>On iOS9, if app thinning is enabled, and the file of interest is an image file
that was bundled with the app (not downloaded during runtime), this will not return
the image file since it is already allocated inside the assets catalog. Please
use {@link Titanium.Filesystem#method-getAsset getAsset} instead for this case.</p>
* @param {String} path
<p>One or more path components. Path arguments are joined together using the platform specific path separator to form the full path.</p>
* @returns {Titanium.Filesystem.File}
*/
/**
* @method createTempDirectory
* <p>Creates a temporary directory and returns a {@link Titanium.Filesystem.File File} object representing the new directory.</p>
* @returns {Titanium.Filesystem.File}
*/
/**
* @method createTempFile
* <p>Creates a temporary file and returns a {@link Titanium.Filesystem.File File} object representing the new file.</p>
* @returns {Titanium.Filesystem.File}
*/
/**
* @method isExternalStoragePresent
* <p>Returns <code>true</code> if the device supports external storage <em>and</em> the external storage device is mounted.</p>
* @description <p>Returns <code>true</code> on Android if an external storage device, such as an SD card, is
available for reading and writing.</p>
<p>Returns <code>false</code> on iOS and Mobile Web.</p>
* @returns {Boolean}
*/
/**
* @method getApplicationCacheDirectory
* <p>Gets the value of the {@link Titanium.Filesystem#property-applicationCacheDirectory} property.</p>
* @returns {String}
* @platform android 1.8.3
* @platform iphone 1.8.3
* @platform ipad 1.8.3
*/
/**
* @method getApplicationDataDirectory
* <p>Gets the value of the {@link Titanium.Filesystem#property-applicationDataDirectory} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getApplicationDirectory
* <p>Gets the value of the {@link Titanium.Filesystem#property-applicationDirectory} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getApplicationSupportDirectory
* <p>Gets the value of the {@link Titanium.Filesystem#property-applicationSupportDirectory} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getExternalStorageDirectory
* <p>Gets the value of the {@link Titanium.Filesystem#property-externalStorageDirectory} property.</p>
* @returns {String}
* @platform android 0.8
*/
/**
* @method getLineEnding
* <p>Gets the value of the {@link Titanium.Filesystem#property-lineEnding} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getResourcesDirectory
* <p>Gets the value of the {@link Titanium.Filesystem#property-resourcesDirectory} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getResRawDirectory
* <p>Gets the value of the {@link Titanium.Filesystem#property-resRawDirectory} property.</p>
* @returns {String}
* @platform android 3.0.2
*/
/**
* @method getSeparator
* <p>Gets the value of the {@link Titanium.Filesystem#property-separator} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getTempDirectory
* <p>Gets the value of the {@link Titanium.Filesystem#property-tempDirectory} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property MODE_APPEND
* @type Number
* @readonly
* <p>Constant for append mode for file operations.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property MODE_READ
* @type Number
* @readonly
* <p>Constant for read mode for file operations.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property MODE_WRITE
* @type Number
* @readonly
* <p>Constant for write mode for file operations.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property IOS_FILE_PROTECTION_NONE
* @type String
* @readonly
* <p>Constant used to set protection key to NSFileProtectionNone in file attributes.</p>
* @description <p>File will have no special protection associated with it. Can be read from or written
to at any time.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @property IOS_FILE_PROTECTION_COMPLETE
* @type String
* @readonly
* <p>Constant used to set protection key to NSFileProtectionComplete in file attributes.</p>
* @description <p>File is stored in an encrypted format on disk. Cannot be read from or written to while
the device is locked or booting.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @property IOS_FILE_PROTECTION_COMPLETE_UNLESS_OPEN
* @type String
* @readonly
* <p>Constant used to set protection key to NSFileProtectionCompleteUnlessOpen in file attributes.</p>
* @description <p>File is stored in an encrypted format on disk. Can be created while the device is locked,
but once closed, cannot be opened again until the device is unlocked. If the file is opened when
unlocked, you may continue to access the file normally, even if the user locks the device. </p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @property IOS_FILE_PROTECTION_COMPLETE_UNTIL_FIRST_USER_AUTHENTICATION
* @type String
* @readonly
* <p>Constant used to set protection key to NSFileProtectionCompleteUntilFirstUserAuthentication in file attributes.</p>
* @description <p>File is stored in an encrypted format on disk. Cannot be accessed until after the device has booted.
After the user unlocks the device for the first time, your app can access the file and continue to
access it even if the user subsequently locks the device.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @property applicationCacheDirectory
* @type String
* @readonly
* <p>Path to the application's internal cache directory.</p>
* @description <p>Files stored in the cache directory remain after the application is closed but at the
discretion of the operating system.</p>
<p>On the Android platform, the cache is limited to 25 MB and the files remain for the lifetime
of the application, that is, until the application is uninstalled.</p>
<p>On the iOS platform, the cache does not have a size limit but the data remains until iOS
cleans the directory to recover the disk space.</p>
* @platform android 1.8.3
* @platform iphone 1.8.3
* @platform ipad 1.8.3
*/
/**
* @property applicationDataDirectory
* @type String
* @readonly
* <p>Path to the application's data directory.</p>
* @description <p>This is a writable directory that can be used to store applications-specific files. </p>
<p>On iOS, this directory is specifically designated for user documents, and a
separate directory,
{@link Titanium.Filesystem#property-applicationSupportDirectory applicationSupportDirectory} is
used for other application data.</p>
<p>On iOS, files in this directory are backed up unless the
{@link Titanium.Filesystem.File#property-remoteBackup remoteBackup} flag is set to false.</p>
<p>On Android, files in this directory cannot be accessed by other applications, so
it should not be used for files that must be used by another application
(for example, a video file that will be passed to the system's video player application).
These files should be stored in the
{@link Titanium.Filesystem#property-externalStorageDirectory externalStorageDirectory}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property applicationDirectory
* @type String
* @readonly
* <p>Path to the iOS application directory.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property applicationSupportDirectory
* @type String
* @readonly
* <p>Path to the application support directory.</p>
* @description <p>This is a writable directory used on iOS for application files that are <em>not</em>
user documents--including settings files, caches, and so on.</p>
<p>On iOS, files in this directory are backed up unless the
{@link Titanium.Filesystem.File#property-remoteBackup remoteBackup} flag is set to false.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property externalStorageDirectory
* @type String
* @readonly
* <p>Path to a directory on removable storage, such as SD card.</p>
* @description <p>This directory can be used for storing arbitrary data. It is read/write and files
in this directory can be passed to other applications, such as video
players--which is not possible with the
{@link Titanium.Filesystem#property-applicationDataDirectory applicationDataDirectory}.</p>
<p>This directory may not be subject to as many memory limitations as the
<code>applicationDataDirectory</code>, which is stored in the device's internal storage.
Note, however, that the user may remove or replace the removable storage device
without warning, so the application must be prepared to handle this case gracefully. </p>
<p>The application should check
{@link Titanium.Filesystem#method-isExternalStoragePresent isExternalStoragePresent} before
accessing this location. The application should also handle any exceptions generated
if the storage device is unmounted during use, or if the files stored on external
storage are not available.</p>
* @platform android 0.8
*/
/**
* @property lineEnding
* @type String
* @readonly
* <p>Platform-specific line ending constant.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property resourcesDirectory
* @type String
* @readonly
* <p>Path to the application's resource directory.</p>
* @description <p>This directory is read-only. If you need to modify any files in this directory,
they must first be copied to another directory, such as <br>
{@link Titanium.Filesystem#property-applicationDataDirectory applicationDataDirectory} or
{@link Titanium.Filesystem#property-tempDirectory tempDirectory}. </p>
<p>On iOS,
writable files can also be placed in the
{@link Titanium.Filesystem#property-applicationSupportDirectory applicationSupportDirectory}.
On Android, writable files can also be placed in the
{@link Titanium.Filesystem#property-externalStorageDirectory externalStorageDirectory}.</p>
<p>Note that when running on the simulator, the resources directory may be writable,
but it is not writable on device.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property resRawDirectory
* @type String
* @readonly
* <p>Path to the application's raw resource directory.</p>
* @description <p>On Android, the raw resources directory can be used for resources that need to be
accessed as individual files, not included in the Android resources bundle. For
example, sound files placed in the raw resources directory can be accessed by
notifications, which cannot access sound files from the resource
directory.</p>
<p>To use raw resources, place files in the <code>platform/android/res/raw</code> folder, where
<code>platform</code> is at the top level of the project, not inside the <code>Resources</code> folder. You
will need to create the <code>platform</code> folder and subfolders.</p>
<p>This directory is read-only. If you need to modify any files in this directory,
they must first be copied to another directory, such as <br>
{@link Titanium.Filesystem#property-applicationDataDirectory applicationDataDirectory} or
{@link Titanium.Filesystem#property-tempDirectory tempDirectory}. </p>
* @platform android 3.0.2
*/
/**
* @property separator
* @type String
* @readonly
* <p>Platform-specific path separator constant.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property tempDirectory
* @type String
* @readonly
* <p>Path for the application's temporary directory.</p>
* @description <p>This directory can be used for storing temporary files. Files in this directory
may not persist when the application is shut down and restarted.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @class RequestStorageAccessResult
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Filesystem/Filesystem.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @class Titanium.Geolocation.Android
* @platform android 2.0.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Android/Android.yml
* <p>Module for Android-specific geolocation functionality.</p>
* @description <p>This module is used for manually configuring geolocation settings on Android. </p>
<p>Manual configuration is recommended for applications that have more demanding
geolocation needs (for example, driving directions). However, for basic geolocation
information, <em>simple mode</em> geolocation may be sufficient. For information on simple
mode, see {@link Titanium.Geolocation}.</p>
<p>Manual configuration involves managing <em>providers</em> and <em>rules</em>:</p>
<ul>
<li><p><em>Location providers</em>, such as GPS, provide location updates.</p></li>
<li><p><em>Location rules</em> filter the results returned by location providers. </p></li>
</ul>
<p>Configuring geolocation manually involves three steps:</p>
<ol>
<li><p>Enabling manual mode.</p></li>
<li><p>Enabling location providers.</p></li>
<li><p>Adding location rules (optional).</p></li>
</ol>
<p>As with the other modes, you register for location updates using the main
{@link Titanium.Geolocation} module. Location updates are generated as long as
an event listener is registered for the <code>location</code> event. When you are not
using location updates, you should remove any registered event listeners.</p>
<p>In manual mode, the application is responsible for dynamically updating the settings
to acheive its required accuracy while limiting battery usage. For example, an
application might do any of the following:</p>
<ul>
<li><p>If the application isn't getting updates frequently enough, it can adjust its
provider settings to provide more updates, or relax its location rules to allow
less accurate updates through. </p></li>
<li><p>If the application isn't receiving accurate enough updates from one provider, it
can add another provider to try to improve results.</p></li>
<li><p>If the application is getting sufficiently accurate results from the network
provider, it can disable the GPS provider to save power.</p></li>
</ul>
<h4>Enabling Manual Configuration Mode</h4>
<p>To enable manual configuration mode, set the {@link Titanium.Geolocation.Android#property-manualMode manualMode}
property to <code>true</code>. In manual configuration mode, the location providers and location
rules set through this module control the generation of location updates.</p>
<p>When <code>manualMode</code> is <code>true</code>, the following configuration settings in the
{@link Titanium.Geolocation} module are ignored:</p>
<ul>
<li>{@link Titanium.Geolocation#property-accuracy Geolocation.accuracy}</li>
<li>{@link Titanium.Geolocation#property-frequency Geolocation.frequency}</li>
<li>{@link Titanium.Geolocation#property-preferredProvider Geolocation.preferredProvider}</li>
</ul>
<p>When <code>manualMode</code> is <code>false</code>, the <code>accuracy</code>, <code>frequency</code> and <code>preferredProvider</code>
settings from {@link Titanium.Geolocation} are used to configure location updates.
Any location providers and location rules set in {@link Titanium.Geolocation.Android}
are retained, but they have no effect.</p>
<h4>Location Providers</h4>
<p>Android supports three kinds of location providers: GPS, network, and the
"passive" location provider, which provides only cached information. </p>
<p>Each location provider represents a different tradeoff between accuracy and
battery power. For most accurate results, you can use a combination of location
providers. Your application can also dynamically change providers to optimize
battery life (for example, if the network provider is providing good enough
location updates, you can disable the GPS provider).</p>
<p>Location providers are represented by the
{@link Titanium.Geolocation.Android.LocationProvider LocationProvider} object.
To specify a location provider, create a new provider object, then register it
with {@link Titanium.Geolocation.Android#method-createLocationProvider addLocationProvider}:</p>
<pre><code>gpsProvider = Ti.Geolocation.Android.createLocationProvider({
name: Ti.Geolocation.PROVIDER_GPS,
minUpdateTime: 60,
minUpdateDistance: 100
});
Ti.Geolocation.Android.addLocationProvider(gpsProvider);
</code></pre>
<p>As shown above, when you create a location provider, you can specify two
properties to limit update frequency:</p>
<ul>
<li><p><code>minUpdateTime</code>. Limits the frequency of location updates to no more
than one per <code>minUpdateTime</code> seconds.</p></li>
<li><p><code>minUpdateDistance</code>. Don't send location updates until the location changes
at least <code>minUpdateDistance</code> meters.</p></li>
</ul>
<p>Only one provider of each type (GPS, network, passive) can be registered at a
time. Adding a new location provider with the same <code>name</code> value replaces any
existing provider with the same <code>name</code>.</p>
<p>Once a location provider is added, changes made to the location provider object itself
(such as changing its <code>minUpdateTime</code> value) change the active configuration of the
location system.</p>
<h4>Location Rules</h4>
<p><em>Location Rules</em> filter the results returned by location providers. You use
location rules to reduce the number of location update events, and ensure that
the events you do receive are as accurate and recent as your application requires.</p>
<p>You are not required to set any location rules. However, by reducing the number of
location events that are passed from the native code
to the JavaScript layer, location rules can improve both performance and battery
life.</p>
<p>Location rules are represented by the
{@link Titanium.Geolocation.Android.LocationProvider LocationRule} object. To
specify a location rule, create a new rule object, then register it with
{@link Titanium.Geolocation.Android#method-createLocationProvider addLocationRule}:</p>
<pre><code>var gpsRule = Ti.Geolocation.Android.createLocationRule({
provider: Ti.Geolocation.PROVIDER_GPS,
// Updates should be accurate to 100m
accuracy: 100,
// Updates should be no older than 5m
maxAge: 300000
// But no more frequent than once per 10 seconds
minAge: 10000
});
Ti.Geolocation.Android.addLocationRule(gpsRule);
</code></pre>
<p>Each rule can specify any combination of the following criteria:</p>
<ul>
<li><p><code>provider</code>. If specified, this rule only applies to updates generated
by the specified provider. If not specified, this rule applies to all updates.</p></li>
<li><p><code>accuracy</code>. Minimum accuracy required for a location update. Accuracy is
expressed as the maximum allowable error, in meters. Updates with reported
accuracy values greater than this are filtered out. </p></li>
<li><p><code>minAge</code>. Controls the frequency of location updates. Do not forward an update unless
at least <code>minAge</code> milliseconds have passed since the last good location
update.</p></li>
<li><p><code>maxAge</code>. Controls the freshness of location updates. Do not forward an update
unless it is newer than <code>maxAge</code> milliseconds.</p></li>
</ul>
<p>You can specify as many location rules as you like. The order in which location rules
are added is not significant. For a <code>location</code> event to be generated, the location
update must pass all of the active rules.</p>
<p>Note that some combinations of rules may make it very difficult to get location
updates. In particular, very low values for either <code>accuracy</code> or <code>maxAge</code> may prevent
results from getting through. </p>
*/
/**
* @method addLocationProvider
* <p>Adds and enables the specified location provider, possibly replacing an existing one.</p>
* @description <p>If another location provider with the same <code>name</code> value is already active, the
new location provider replaces the exiting one.</p>
* @param {Titanium.Geolocation.Android.LocationProvider} provider
<p>The location provider to add.</p>
*/
/**
* @method removeLocationProvider
* <p>Disables and removes the specified location provider.</p>
* @param {Titanium.Geolocation.Android.LocationProvider} provider
<p>The location provider to remove.</p>
*/
/**
* @method addLocationRule
* <p>Adds and enables the specified location rule.</p>
* @description <p>Only location updates that pass all of the active rules are passed on to the
application.</p>
* @param {Titanium.Geolocation.Android.LocationRule} rule
<p>The location rule to add.</p>
*/
/**
* @method removeLocationRule
* <p>Disables and removes the specified location rule.</p>
* @param {Titanium.Geolocation.Android.LocationRule} rule
<p>The location rule to remove.</p>
*/
/**
* @method getManualMode
* <p>Gets the value of the {@link Titanium.Geolocation.Android#property-manualMode} property.</p>
* @returns {Boolean}
*/
/**
* @method setManualMode
* <p>Sets the value of the {@link Titanium.Geolocation.Android#property-manualMode} property.</p>
* @param {Boolean} manualMode
<p>New value for the property.</p>
*/
/**
* @method createLocationProvider
* <p>Creates and returns an instance of {@link Titanium.Geolocation.Android.LocationProvider}.</p>
* @param {Dictionary<Titanium.Geolocation.Android.LocationProvider>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Geolocation.Android.LocationProvider} except those marked not-creation or read-only.</p>
* @returns {Titanium.Geolocation.Android.LocationProvider}
*/
/**
* @method createLocationRule
* <p>Creates and returns an instance of {@link Titanium.Geolocation.Android.LocationRule}.</p>
* @param {Dictionary<Titanium.Geolocation.Android.LocationRule>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Geolocation.Android.LocationRule} except those marked not-creation or read-only.</p>
* @returns {Titanium.Geolocation.Android.LocationRule}
*/
/**
* @property [manualMode=false]
* @type Boolean
* <p>Set to <code>true</code> to enable manual configuration of location updates through this module.</p>
* @description <p>If <code>true</code>, location updates are controlled by the location providers and location rules
configured in this module.</p>
<p>If <code>false</code>, location updates are configured using the {@link Titanium.Geolocation#property-accuracy accuracy},
{@link Titanium.Geolocation#property-frequency frequency} and {@link Titanium.Geolocation#property-preferredProvider preferredProvider}
properties in the {@link Titanium.Geolocation} module.</p>
*/
/**
* @class Titanium.Geolocation.Android.LocationProvider
* @platform android 2.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Android/LocationProvider.yml
* <p>Represents a source of location information, such as GPS.</p>
* @description <p>See {@link Titanium.Geolocation.Android} for details on using <code>LocationProviders</code> to
manually configure location updates.</p>
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.Geolocation.Android.LocationProvider#property-name} property.</p>
* @returns {String}
*/
/**
* @method setName
* <p>Sets the value of the {@link Titanium.Geolocation.Android.LocationProvider#property-name} property.</p>
* @param {String} name
<p>New value for the property.</p>
*/
/**
* @method getMinUpdateTime
* <p>Gets the value of the {@link Titanium.Geolocation.Android.LocationProvider#property-minUpdateTime} property.</p>
* @returns {Number}
*/
/**
* @method setMinUpdateTime
* <p>Sets the value of the {@link Titanium.Geolocation.Android.LocationProvider#property-minUpdateTime} property.</p>
* @param {Number} minUpdateTime
<p>New value for the property.</p>
*/
/**
* @method getMinUpdateDistance
* <p>Gets the value of the {@link Titanium.Geolocation.Android.LocationProvider#property-minUpdateDistance} property.</p>
* @returns {Number}
*/
/**
* @method setMinUpdateDistance
* <p>Sets the value of the {@link Titanium.Geolocation.Android.LocationProvider#property-minUpdateDistance} property.</p>
* @param {Number} minUpdateDistance
<p>New value for the property.</p>
*/
/**
* @property name
* @type String
* <p>Type of location provider: {@link Titanium.Geolocation#property-PROVIDER_GPS PROVIDER_GPS},
{@link Titanium.Geolocation#property-PROVIDER_NETWORK PROVIDER_NETWORK}, or
{@link Titanium.Geolocation#property-PROVIDER_PASSIVE PROVIDER_PASSIVE}.</p>
*/
/**
* @property minUpdateTime
* @type Number
* <p>Limits the frequency of location updates to no more than one per <code>minUpdateTime</code> seconds.</p>
*/
/**
* @property minUpdateDistance
* @type Number
* <p>Don't send a location update unless the location has changed at least <code>minUpdateDistance</code>
meters since the previous update.</p>
*/
/**
* @class Titanium.Geolocation.Android.LocationRule
* @platform android 2.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Android/LocationRule.yml
* <p>A location rule to filter the results returned by location providers.</p>
* @description <p>All of the properties are optional.</p>
<p>See {@link Titanium.Geolocation.Android} for details on using <code>LocationProviders</code> to
manually configure location updates.</p>
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.Geolocation.Android.LocationRule#property-name} property.</p>
* @returns {String}
*/
/**
* @method setName
* <p>Sets the value of the {@link Titanium.Geolocation.Android.LocationRule#property-name} property.</p>
* @param {String} name
<p>New value for the property.</p>
*/
/**
* @method getAccuracy
* <p>Gets the value of the {@link Titanium.Geolocation.Android.LocationRule#property-accuracy} property.</p>
* @returns {Number}
*/
/**
* @method setAccuracy
* <p>Sets the value of the {@link Titanium.Geolocation.Android.LocationRule#property-accuracy} property.</p>
* @param {Number} accuracy
<p>New value for the property.</p>
*/
/**
* @method getMinAge
* <p>Gets the value of the {@link Titanium.Geolocation.Android.LocationRule#property-minAge} property.</p>
* @returns {Number}
*/
/**
* @method setMinAge
* <p>Sets the value of the {@link Titanium.Geolocation.Android.LocationRule#property-minAge} property.</p>
* @param {Number} minAge
<p>New value for the property.</p>
*/
/**
* @method getMaxAge
* <p>Gets the value of the {@link Titanium.Geolocation.Android.LocationRule#property-maxAge} property.</p>
* @returns {Number}
*/
/**
* @method setMaxAge
* <p>Sets the value of the {@link Titanium.Geolocation.Android.LocationRule#property-maxAge} property.</p>
* @param {Number} maxAge
<p>New value for the property.</p>
*/
/**
* @property [name=]
* @type String
* <p>If specified, this rule only applies to updates generated
by the specified provider. If <code>null</code>, this rule applies to all updates.</p>
* @description <p>Can be {@link Titanium.Geolocation#property-PROVIDER_GPS PROVIDER_GPS},
{@link Titanium.Geolocation#property-PROVIDER_NETWORK PROVIDER_NETWORK}, or
{@link Titanium.Geolocation#property-PROVIDER_PASSIVE PROVIDER_PASSIVE}.</p>
*/
/**
* @property accuracy
* @type Number
* <p>Minimum accuracy required for a location update.</p>
* @description <p>Accuracy is expressed as the maximum allowable error, in meters. To pass this rule,
an update must have an accuracy value equal to or lower than this value.</p>
*/
/**
* @property minAge
* @type Number
* <p>Controls the frequency of location updates.</p>
* @description <p>Do not forward an update unless at least <code>minAge</code> milliseconds have passed since the last
good location update (that is, the last update from any provider that generated a
<code>location</code> event).</p>
*/
/**
* @property maxAge
* @type Number
* <p>Controls the freshness of location updates. Do not forward an update
unless it is newer than <code>maxAge</code> milliseconds.</p>
*/
/**
* @class Titanium.Geolocation
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml
* <p>The top level Geolocation module. The Geolocation module is used for accessing device location based information.</p>
* @description <p>This module combines two sets of features:</p>
<ul>
<li><p>Location services. Determining the location of the device.</p></li>
<li><p>Geocoding and reverse geocoding. Converting geographic coordinates into
addresses, and converting addresses into geographic coordinates.</p></li>
</ul>
<p>Using location services can have a significant impact on a device's battery life,
so it's important to use them in the most efficient manner possible. Power consumption
is strongly influenced by the accuracy and frequency of location updates required by
your application. </p>
<p>The location services systems of the underlying platforms are very different, so there
are significant implementation differences between the platforms.</p>
<p>The basic methods of requesting location information and receiving location updates
are essentially the same on all platforms. However, the method of configuring the
accuracy and frequency of location updates is different for each platform.</p>
<h4>Getting Location Information</h4>
<p>There are two ways to get location information:</p>
<ul>
<li><p>Make a one-time request with {@link Titanium.Geolocation#method-getCurrentPosition getCurrentPosition}.</p></li>
<li><p>Register to receive location updates by adding an event listener for the
{@link Titanium.Geolocation#event-location location} event.</p></li>
</ul>
<p><strong>NOTE:</strong> Location services stay enabled for as long as a listener is registered for the
<code>location</code> event, so be sure to remove the event listener when you do not require
location updates.</p>
<h4>Configurating Location Updates on iOS</h4>
<p>In iOS, the accuracy (and power consumption) of location services is primarily
determined by the {@link Titanium.Geolocation#property-accuracy accuracy} setting. This can be set
to one of the following values:</p>
<ul>
<li>{@link Titanium.Geolocation#property-ACCURACY_BEST ACCURACY_BEST} (highest accuracy and power consumption)</li>
<li>{@link Titanium.Geolocation#property-ACCURACY_HIGH ACCURACY_HIGH}</li>
<li>{@link Titanium.Geolocation#property-ACCURACY_NEAREST_TEN_METERS ACCURACY_NEAREST_TEN_METERS} </li>
<li>{@link Titanium.Geolocation#property-ACCURACY_HUNDRED_METERS ACCURACY_HUNDRED_METERS} </li>
<li>{@link Titanium.Geolocation#property-ACCURACY_KILOMETER ACCURACY_KILOMETER} </li>
<li>{@link Titanium.Geolocation#property-ACCURACY_LOW ACCURACY_LOW}</li>
<li>{@link Titanium.Geolocation#property-ACCURACY_THREE_KILOMETERS ACCURACY_THREE_KILOMETERS} (lowest
accuracy and power consumption).</li>
<li>{@link Titanium.Geolocation#property-ACCURACY_BEST_FOR_NAVIGATION ACCURACY_BEST_FOR_NAVIGATION}
(Available in iOS 6.0 and above)</li>
</ul>
<p>Based on the accuracy you choose, iOS uses its own logic to select location providers
and filter location updates to provide location updates that meet your accuracy
requirements.</p>
<p>You can further limit power consumption on iOS by setting the
{@link Titanium.Geolocation#property-distanceFilter distanceFilter} property to eliminate position
updates when the user is not moving.</p>
<p>For iOS 8 and later, add either the
<a href="https://developer.apple.com/library/prerelease/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW26"><code>NSLocationWhenInUseUsageDescription</code></a>
or
<a href="https://developer.apple.com/library/prerelease/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW18"><code>NSLocationAlwaysUsageDescription</code></a>
key to the iOS plist section of the project's <code>tiapp.xml</code> file.</p>
<pre><code><ti:app>
<ios>
<plist>
<dict>
<key>NSLocationAlwaysUsageDescription</key>
<string>
Specify the reason for accessing the user's location information.
This appears in the alert dialog when asking the user for permission to
access their location.
</string>
</dict>
</plist>
</ios>
</ti:app>
</code></pre>
<h4>Configurating Location Updates on Android</h4>
<p>Prior to Titanium Mobile 2.0, Titanium attempted to follow the iOS model on Android,
but this didn't fit the native Android model well. In Release 2.0, three different
location service modes are supported on Android: <em>simple</em>, <em>manual</em>, and <em>legacy</em>.</p>
<ul>
<li><p><em>Simple mode</em> provides a compromise mode that provides adaquate support for
undemanding location applications without requiring developers to
write a lot of Android-specific code. To use simple mode:</p>
<ol><li><p>Leave the {@link Titanium.Geolocation.Android#property-manualMode} flag set to <code>false</code> (the
default value).</p></li>
<li><p>Set the {@link Titanium.Geolocation#property-accuracy accuracy} property to
either {@link Titanium.Geolocation#property-ACCURACY_HIGH ACCURACY_HIGH} or
{@link Titanium.Geolocation#property-ACCURACY_LOW ACCURACY_LOW}.</p></li></ol></li>
<li><p><em>Manual mode</em> gives developers low-level control of location updates, including
enabling individual location providers and filtering updates, for the best
combination of accuracy and battery life. </p>
<p>Manual mode is used when the {@link Titanium.Geolocation.Android#property-manualMode} flag is set
to <code>true</code>. In manual mode, the <code>accuracy</code> property is not used, and all
configuration is done through the {@link Titanium.Geolocation.Android} module.</p></li>
<li><p><em>Legacy mode</em> is the mode that existed prior to 2.0. Legacy mode is
used when the <code>manualMode</code> flag is <code>false</code> and the <code>accuracy</code> property is
set to one of the iOS <code>ACCURACY</code> constants:</p>
<ul><li>{@link Titanium.Geolocation#property-ACCURACY_BEST ACCURACY_BEST} (highest accuracy and power consumption)</li>
<li>{@link Titanium.Geolocation#property-ACCURACY_NEAREST_TEN_METERS ACCURACY_NEAREST_TEN_METERS} </li>
<li>{@link Titanium.Geolocation#property-ACCURACY_HUNDRED_METERS ACCURACY_HUNDRED_METERS} </li>
<li>{@link Titanium.Geolocation#property-ACCURACY_KILOMETER ACCURACY_KILOMETER} </li>
<li>{@link Titanium.Geolocation#property-ACCURACY_THREE_KILOMETERS ACCURACY_THREE_KILOMETERS} (lowest
accuracy and power consumption). </li></ul>
<p>This mode is deprecated and should not be used for new development. </p>
<p>In this mode, the specified <code>accuracy</code> value determines the
<em>minimum distance between location updates</em>. If <code>accuracy</code> is set to
<code>ACCURACY_BEST</code>, no distance filter is used on updates.</p>
<p>In legacy mode, only a single location provider (GPS, network, or passive) is
enabled at a time. You can specify a the location provider using the
{@link Titanium.Geolocation#property-preferredProvider preferredProvider} property.</p>
<p>You can also specifying a desired update frequency using the
{@link Titanium.Geolocation#property-frequency frequency} property. The <code>preferredProvider</code>
and <code>frequency</code> properties are not used in any other mode.</p></li>
</ul>
<h4>Configuring Location Updates on Mobile Web</h4>
<p>Location services on Mobile Web operate similarly to the <em>simple mode</em> operations on
Android. Setting {@link Titanium.Geolocation#property-accuracy accuracy} property to
{@link Titanium.Geolocation#property-ACCURACY_HIGH ACCURACY_HIGH} yeilds the best available location
updates, with the hightest power consumption.
Using {@link Titanium.Geolocation#property-ACCURACY_LOW ACCURACY_LOW} provides lower-quality location
updates with lower power consumption.</p>
<p>In addition to the accuracy setting, there are several Mobile Web-specific settings.
See {@link Titanium.Geolocation.MobileWeb} for details.</p>
<h4>Using the Compass</h4>
<p>Both iOS and Android support a receiving heading updates from a hardware compass, if available.
On Mobile Web, heading updates are supported if the browser supports this feature.
Currently, this support is only available on Mobile Safari.</p>
<p>Check the {@link Titanium.Geolocation#property-hasCompass hasCompass} property to see if the current
device supports a compass.</p>
<p>To retrieve compass readings, you can either use
{@link Titanium.Geolocation#method-getCurrentHeading getCurrentHeading} as shown in the
previous example, or add a listener for the
{@link Titanium.Geolocation#event-heading heading} event, as shown below:</p>
<pre><code>var compassHandler = function(e) {
if (e.success === undefined || e.success) {
Ti.API.info("Heading: " + e.heading.magneticHeading);
}
}
Ti.Geolocation.addEventListener("heading", compassHandler);
</code></pre>
<p>Note that Android does not include a <code>success</code> property in the <code>heading</code> event.
Heading events are only generated on Android when heading data is available. So if
<code>success</code> is undefined, we assume that the event contains valid compass data.</p>
<p>To obtain true heading data for the compass (as opposed to magnetic heading data),
a current location fix is required. See the notes on
{@link HeadingData#property-trueHeading trueHeading} for more information.</p>
<p>As with location updates, the application should unregister for heading updates
when it is no longer being used, or when it goes into the background. Use
<code>removeEventListener</code> to stop heading updates:</p>
<pre><code>Ti.Geolocation.removeEventListener('heading', compassHandler);
</code></pre>
<p>Finally, note that neither the Android emulator nor the iOS simulator provide
compass support. Compass code must be tested on physical devices.</p>
<h4>Geocoding Services</h4>
<p>The module provides two methods, {@link Titanium.Geolocation#method-forwardGeocoder forwardGeocoder} and {@link Titanium.Geolocation#method-reverseGeocoder reverseGeocoder}
to convert between geographic coordinates and addresses. These methods map to MapQuest Open Nominatim Search Service.</p>
<p>While this API has the advantage that it has no daily usage limits, please note that the data backing this API is crowd sourced and might not return
proper values for valid addresses and geographic coordinates.</p>
<p>If geocoding services are essential component of the application, developers are encouraged to use commercial geocoding providers.</p>
*/
/**
* @event calibration
* <p>Fired when the device detects interface and requires calibration.</p>
* @description <p>When this event is fired, the OS calibration UI is being displayed to the end user.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event heading
* <p>Fired when an heading update is received.</p>
* @param {String} (android iphone ipad) code
<p>If <code>success</code> is false, the error code if available.</p>
* @param {Boolean} (android iphone ipad) success
<p>Indicate if the heading event was successfully received.</p>
* @param {String} (android iphone ipad) error
<p>If <code>success</code> is false, a string describing the error.</p>
* @param {HeadingData} heading
<p>Dictionary object containing the heading data.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event location
* <p>Fired when a location update is received.</p>
* @param {Number} code
<p>if <code>success</code> is false, the error code if available.</p>
* @param {Boolean} success
<p>Indicates if location data was successfully retrieved.</p>
* @param {LocationProviderDict} (android) provider
<p>If <code>success</code> is true, object describing the location provider generating this update.</p>
* @param {LocationCoordinates} coords
<p>If <code>success</code> is true, actual location data for this update.</p>
* @param {String} error
<p>If <code>success</code> is false, a string describing the error.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event locationupdatepaused
* <p>Fired when location updates are paused by the OS. Available in iOS 6.0 and later.</p>
* @description <p>This event is fired when {@link Titanium.Geolocation#property-pauseLocationUpdateAutomatically pauseLocationUpdateAutomatically}
is set to <code>true</code> and if the OS detects that the device's location is not changing,
causing it to pause the delivery of updates in order to shut down the appropriate
hardware and save power.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @event locationupdateresumed
* <p>Fired when location manager is resumed by the OS. Available in iOS 6.0 and later.</p>
* @description <p>When location updates are paused and need to be resumed (perhaps because the user
is moving again), this event is fired to let the app know that it is about to
begin the delivery of those updates again.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @event authorization
* <p>Fired when changes are made to the authorization status for location services. Available in iOS 8.0 and later.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>This event is fired whenever the application's ability to use location services changes.
Changes can occur because the user allowed or denied the use of location services for the app or the system as a whole.</p>
* @param {Number} authorizationStatus
<p>New authorization status for the application.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_ALWAYS}
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_AUTHORIZED}
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_DENIED}
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_RESTRICTED}
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_UNKNOWN}
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_WHEN_IN_USE}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @method forwardGeocoder
* <p>Resolves an address to a location.</p>
* @param {String} address
<p>address to resolve.</p>
* @param {Callback<ForwardGeocodeResponse>} callback
<p>Function to invoke on success or failure.</p>
*/
/**
* @method getCurrentHeading
* <p>Retrieves the current compass heading.</p>
* @param {Callback<HeadingResponse>} callback
<p>Function to invoke on success or failure of obtaining the current heading.</p>
*/
/**
* @method getCurrentPosition
* <p>Retrieves the last known location from the device.</p>
* @description <p>On Android, the radios are not turned on to update the location, and a cached
location is used.</p>
<p>On iOS the radios <strong>may</strong> be used if the location is too "old". </p>
* @param {Callback<LocationResults>} callback
<p>Function to invoke on success or failure of obtaining the current location.</p>
*/
/**
* @method reverseGeocoder
* <p>Tries to resolve a location to an address.</p>
* @description <p>The callback receives a {@link ReverseGeocodeResponse} object. If the request
is successful, the object includes one or more addresses that are possible matches
for the requested coordinates.</p>
* @param {Number} latitude
<p>Latitude to search, specified in decimal degrees.</p>
* @param {Number} longitude
<p>Longitude to search, specified in decimal degrees.</p>
* @param {Callback<ReverseGeocodeResponse>} callback
<p>Function to invoke on success or failure.</p>
*/
/**
* @method hasLocationPermissions
* <p>Returns <code>true</code> if the app has location access.</p>
* @param {Number} authorizationType
<p>Types of geolocation's authorizations. This is an iOS 8 and above only parameter and is ignored on
Android and iOS 7.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_ALWAYS}
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_WHEN_IN_USE}
</ul></p>
* @returns {Boolean}
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform windowsphone 5.1.0
*/
/**
* @method requestLocationPermissions
* <p>Requests for location access.</p>
* @description <p>On Android, the request view will show if the permission is not accepted by the user, and the user did
not check the box "Never ask again" when denying the request. If the user checks the box "Never ask again,"
the user has to manually enable the permission in device settings. If the user asks for permissions or
tries to get unauthorized location information, then the app should call the request method to show
the permission settings. This method requests <code>Manifest.permission.ACCESS_FINE_LOCATION</code> on Android.
If you require other permissions, you can also use {@link Titanium.Android#method-requestPermissions}.</p>
<p>In iOS 8, Apple introduced the Info.plist keys <code>NSLocationWhenInUseUsageDescription</code> and <code>NSLocationAlwaysUsageDescription</code>
that are used to display an own description while requesting location permissions. In addition to this method, you need to
include one of these keys (based on how your location updates should behave) or the application will crash if your app does not.
Check the <a href="https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html">Apple docs</a> for more information.</p>
* @param {Number} authorizationType
<p>Types of geolocation's authorizations. This is an iOS only parameter and is ignored on Android.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_ALWAYS}
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_WHEN_IN_USE}
</ul></p>
* @param {Callback<LocationAuthorizationResponse>} callback
<p>Function to call upon user decision to grant location access.</p>
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform windowsphone 5.1.0
*/
/**
* @method getFrequency
* <p>Gets the value of the {@link Titanium.Geolocation#property-frequency} property.</p>
* @deprecated 2.0.0 Android legacy mode operation is deprecated. For new development, use
either simple mode or manual mode. See "Configurating Location Updates on Android"
in the main description of this class for more information.
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setFrequency
* <p>Sets the value of the {@link Titanium.Geolocation#property-frequency} property.</p>
* @deprecated 2.0.0 Android legacy mode operation is deprecated. For new development, use
either simple mode or manual mode. See "Configurating Location Updates on Android"
in the main description of this class for more information.
* @param {Number} frequency
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getPreferredProvider
* <p>Gets the value of the {@link Titanium.Geolocation#property-preferredProvider} property.</p>
* @deprecated 2.0.0 Android legacy mode operation is deprecated. For new development, use
either simple mode or manual mode. See "Configurating Location Updates on Android"
in the main description of this class for more information.
* @returns {String}
* @platform android 0.8
*/
/**
* @method setPreferredProvider
* <p>Sets the value of the {@link Titanium.Geolocation#property-preferredProvider} property.</p>
* @deprecated 2.0.0 Android legacy mode operation is deprecated. For new development, use
either simple mode or manual mode. See "Configurating Location Updates on Android"
in the main description of this class for more information.
* @param {String} preferredProvider
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getPurpose
* <p>Gets the value of the {@link Titanium.Geolocation#property-purpose} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setPurpose
* <p>Sets the value of the {@link Titanium.Geolocation#property-purpose} property.</p>
* @param {String} purpose
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getShowCalibration
* <p>Gets the value of the {@link Titanium.Geolocation#property-showCalibration} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setShowCalibration
* <p>Sets the value of the {@link Titanium.Geolocation#property-showCalibration} property.</p>
* @param {Boolean} showCalibration
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getTrackSignificantLocationChange
* <p>Gets the value of the {@link Titanium.Geolocation#property-trackSignificantLocationChange} property.</p>
* @returns {Boolean}
* @platform iphone 2.1.2
* @platform ipad 2.1.2
*/
/**
* @method setTrackSignificantLocationChange
* <p>Sets the value of the {@link Titanium.Geolocation#property-trackSignificantLocationChange} property.</p>
* @param {Boolean} trackSignificantLocationChange
<p>New value for the property.</p>
* @platform iphone 2.1.2
* @platform ipad 2.1.2
*/
/**
* @method getAllowsBackgroundLocationUpdates
* <p>Gets the value of the {@link Titanium.Geolocation#property-allowsBackgroundLocationUpdates} property.</p>
* @returns {Boolean}
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @method setAllowsBackgroundLocationUpdates
* <p>Sets the value of the {@link Titanium.Geolocation#property-allowsBackgroundLocationUpdates} property.</p>
* @param {Boolean} allowsBackgroundLocationUpdates
<p>New value for the property.</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @method getActivityType
* <p>Gets the value of the {@link Titanium.Geolocation#property-activityType} property.</p>
* @returns {Number}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method setActivityType
* <p>Sets the value of the {@link Titanium.Geolocation#property-activityType} property.</p>
* @param {Number} activityType
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getPauseLocationUpdateAutomatically
* <p>Gets the value of the {@link Titanium.Geolocation#property-pauseLocationUpdateAutomatically} property.</p>
* @returns {Boolean}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method setPauseLocationUpdateAutomatically
* <p>Sets the value of the {@link Titanium.Geolocation#property-pauseLocationUpdateAutomatically} property.</p>
* @param {Boolean} pauseLocationUpdateAutomatically
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getAccuracy
* <p>Gets the value of the {@link Titanium.Geolocation#property-accuracy} property.</p>
* @returns {Number}
*/
/**
* @method setAccuracy
* <p>Sets the value of the {@link Titanium.Geolocation#property-accuracy} property.</p>
* @param {Number} accuracy
<p>New value for the property.</p>
*/
/**
* @method getDistanceFilter
* <p>Gets the value of the {@link Titanium.Geolocation#property-distanceFilter} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setDistanceFilter
* <p>Sets the value of the {@link Titanium.Geolocation#property-distanceFilter} property.</p>
* @param {Number} distanceFilter
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getHeadingFilter
* <p>Gets the value of the {@link Titanium.Geolocation#property-headingFilter} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setHeadingFilter
* <p>Sets the value of the {@link Titanium.Geolocation#property-headingFilter} property.</p>
* @param {Number} headingFilter
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getHasCompass
* <p>Gets the value of the {@link Titanium.Geolocation#property-hasCompass} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 2.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method getLocationServicesAuthorization
* <p>Gets the value of the {@link Titanium.Geolocation#property-locationServicesAuthorization} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setLocationServicesAuthorization
* <p>Sets the value of the {@link Titanium.Geolocation#property-locationServicesAuthorization} property.</p>
* @param {Number} locationServicesAuthorization
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getLocationServicesEnabled
* <p>Gets the value of the {@link Titanium.Geolocation#property-locationServicesEnabled} property.</p>
* @returns {Boolean}
*/
/**
* @method getLastGeolocation
* <p>Gets the value of the {@link Titanium.Geolocation#property-lastGeolocation} property.</p>
* @returns {String}
* @platform android 3.1.2
* @platform iphone 3.1.2
* @platform ipad 3.1.2
* @platform windowsphone 4.1.0
*/
/**
* @property frequency
* @type Number
* <p>Requested frequency for location updates, in milliseconds.</p>
* @deprecated 2.0.0 Android legacy mode operation is deprecated. For new development, use
either simple mode or manual mode. See "Configurating Location Updates on Android"
in the main description of this class for more information.
* @description <p>Setting a frequency value enables legacy location mode on Android.
Note that only a single provider can be active at one time in legacy mode.</p>
<p>Note that the frequency value is used as a guideline: there are no guarantees
that the device will provide updates at the specified frequency.</p>
<p>A lower frequency value generally increases power consumption.
A value of 0 means that updates should be generated as quickly as possible.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [preferredProvider={@link Titanium.Geolocation#property-PROVIDER_NETWORK}]
* @type String
* <p>Determines the preferred location provider.</p>
* @deprecated 2.0.0 Android legacy mode operation is deprecated. For new development, use
either simple mode or manual mode. See "Configurating Location Updates on Android"
in the main description of this class for more information.
* @description <p>Setting a preferred provider enables legacy location mode on Android.
Note that only a single provider can be active at one time in legacy mode.</p>
<p>The preferred provider affects power consumption. In general, <code>PROVIDER_GPS</code>
requires the most power, and <code>PROVIDER_PASSIVE</code> requires the least.</p>
<p>If <code>undefined</code>, the preferred provider is auto-detected.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Geolocation#property-PROVIDER_GPS}
<li> {@link Titanium.Geolocation#property-PROVIDER_NETWORK}
<li> {@link Titanium.Geolocation#property-PROVIDER_PASSIVE}
</ul></p>
* @platform android 0.8
*/
/**
* @property purpose
* @type String
* <p>Text to display in the permission dialog when requesting location
services.</p>
* <p> <b>Requires:</b>
iOS 5.0 and earlier
</p>
* @description <p>This property informs the end user why location services are being requested by
the application. This property is <strong>required</strong> starting in iOS 4.0.
deprecated for >= iOS6, include the <code>NSLocationUsageDescription</code> key with your
description in tiapp.xml instead.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [showCalibration=true]
* @type Boolean
* <p>Determines whether the compass calibration UI is shown if needed.</p>
* @description <p>Set to <code>false</code> to disable display of the compass calibration UI. This may result
in invalid heading data. </p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [trackSignificantLocationChange=false]
* @type Boolean
* <p>Indicates if the location changes should be updated only when a significant change
in location occurs.</p>
* @description <p>The trackSignificantLocationChange service offers a low-power location service for
devices with cellular radios.This service is available only in iOS 4.0 and later.
This service offers a significant power savings and provides accuracy that is good
enough for most applications. It uses the device's cellular radio to determine the
user's location and report changes in that location, allowing the system to manage
power usage much more aggressively than it could otherwise. This service is also
capable of waking up an application that is currently suspended or not running in
order to deliver new location data.</p>
* @platform iphone 2.1.2
* @platform ipad 2.1.2
*/
/**
* @property [allowsBackgroundLocationUpdates=true]
* @type Boolean
* <p>Determines if the app can do background location updates.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>When <code>UIBackgroundModes</code> include <code>location</code> in tiapp.xml, this property is
set to <code>true</code> by default. Available in iOS 9.0 and later.</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property [activityType={@link Titanium.Geolocation#property-ACTIVITYTYPE_OTHER}]
* @type Number
* <p>The type of user activity to be associated with the location updates. Available in iOS 6.0 and later.</p>
* @description <p>The information in this property is used as a cue to determine when location
updates may be automatically paused. Pausing updates gives the system the
opportunity to save power in situations where the user's location is not likely
to be changing. For example, if the activity type is
{@link Titanium.Geolocation#property-ACTIVITYTYPE_AUTOMOTIVE_NAVIGATION ACTIVITYTYPE_AUTOMOTIVE_NAVIGATION}
and no location changes have occurred recently, the radios might be powered down
until movement is detected again. </p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Geolocation#property-ACTIVITYTYPE_AUTOMOTIVE_NAVIGATION}
<li> {@link Titanium.Geolocation#property-ACTIVITYTYPE_FITNESS}
<li> {@link Titanium.Geolocation#property-ACTIVITYTYPE_OTHER}
<li> {@link Titanium.Geolocation#property-ACTIVITYTYPE_OTHER_NAVIGATION}
</ul></p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property [pauseLocationUpdateAutomatically=false]
* @type Boolean
* <p>Indicates whether the location updates may be paused. Available in iOS 6.0 and later.</p>
* @description <p>Allowing the location updates to be paused can improve battery life on the
target device without sacrificing location data. When this property is set to YES,
the location updates are paused (and powers down the appropriate hardware) at
times when the location data is unlikely to change. For example, if the user stops
for food while using a navigation app, the location manager might pause updates for
a period of time. You can help the determination of when to pause location updates
by assigning a value to the {@link Titanium.Geolocation#property-activityType activityType} property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property ACCURACY_BEST
* @type Number
* @readonly
* <p>Use with {@link Titanium.Geolocation#property-accuracy accuracy} to request the best
accuracy available.</p>
* @description <p>Using this value results in the most accurate location updates, and the highest
battery usage.</p>
<p>Using this value on Android enables <em>legacy mode</em> operation, which is not
recommended. </p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ACCURACY_BEST_FOR_NAVIGATION
* @type Number
* @readonly
* <p>Use with {@link Titanium.Geolocation#property-accuracy accuracy} to request highest possible
accuracy and combine it with additional sensor data.</p>
* @description <p>Using this value is intended for use in navigation applications that require
precise position information at all times and are intended to be used only while
the device is plugged in.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @property ACCURACY_HUNDRED_METERS
* @type Number
* @readonly
* <p>Use with {@link Titanium.Geolocation#property-accuracy accuracy} to request location
updates accurate to the nearest 100 meters.</p>
* @description <p>Using this value on Android enables <em>legacy mode</em> operation, which is not
recommended. </p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ACCURACY_KILOMETER
* @type Number
* @readonly
* <p>Use with {@link Titanium.Geolocation#property-accuracy accuracy} to request location
updates accurate to the nearest kilometer.</p>
* @description <p>Using this value on Android enables <em>legacy mode</em> operation, which is not
recommended. </p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ACCURACY_NEAREST_TEN_METERS
* @type Number
* @readonly
* <p>Use with {@link Titanium.Geolocation#property-accuracy accuracy} to request location
updates accurate to the nearest 10 meters.</p>
* @description <p>Using this value on Android enables <em>legacy mode</em> operation, which is not
recommended. </p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ACCURACY_THREE_KILOMETERS
* @type Number
* @readonly
* <p>Use with {@link Titanium.Geolocation#property-accuracy accuracy} to request location
updates accurate to the nearest three kilometers.</p>
* @description <p>Using this value on Android enables <em>legacy mode</em> operation, which is not
recommended. </p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ACCURACY_HIGH
* @type Number
* @readonly
* <p>Use with {@link Titanium.Geolocation#property-accuracy accuracy} to request more
accurate location updates with higher battery usage.</p>
* @description <p>Using this value on Android enables <em>simple mode</em> operation.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property ACCURACY_LOW
* @type Number
* @readonly
* <p>Use with {@link Titanium.Geolocation#property-accuracy accuracy} to request less
accurate location updates with lower battery usage.</p>
* @description <p>Using this value on Android enables <em>simple mode</em> operation.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property ACTIVITYTYPE_AUTOMOTIVE_NAVIGATION
* @type String
* @readonly
* <p>The location data is used for tracking location changes to the automobile specifically during vehicular navigation.</p>
* @description <p>Used with {@link Titanium.Geolocation#property-activityType activityType}. This activity might
cause location updates to be paused only when the vehicle does not move for an
extended period of time. Available in iOS 6.0 and later.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @property ACTIVITYTYPE_FITNESS
* @type String
* @readonly
* <p>The location data is used for tracking any pedestrian-related activity.</p>
* @description <p>Used with {@link Titanium.Geolocation#property-activityType activityType}. This activity might
cause location updates to be paused only when the user does not move a significant
distance over a period of time.Available in iOS 6.0 and later.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @property ACTIVITYTYPE_OTHER
* @type String
* @readonly
* <p>The location data is being used for an unknown activity.</p>
* @description <p>Used with {@link Titanium.Geolocation#property-activityType activityType}. Available in iOS 6.0 and later.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @property ACTIVITYTYPE_OTHER_NAVIGATION
* @type String
* @readonly
* <p>The location data is used for tracking movements of other types of vehicular
navigation that are not automobile related.</p>
* @description <p>Used with {@link Titanium.Geolocation#property-activityType activityType}. You would use this
to track navigation by boat, train, or plane. Do not use this type for pedestrian
navigation tracking. This activity might cause location updates to be paused only
when the vehicle does not move a significant distance over a period of time.
Available in iOS 6.0 and later.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @property AUTHORIZATION_ALWAYS
* @type Number
* @readonly
* <p>A {@link Titanium.Geolocation#property-locationServicesAuthorization locationServicesAuthorization} value
indicating that the application is authorized to start location services at any time. This authorization
includes the use of all location services, including monitoring regions and significant location changes.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
* @platform windowsphone 4.1.0
*/
/**
* @property AUTHORIZATION_AUTHORIZED
* @type Number
* @readonly
* <p>A {@link Titanium.Geolocation#property-locationServicesAuthorization locationServicesAuthorization} value
indicating that the application is authorized to use location services.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property AUTHORIZATION_DENIED
* @type Number
* @readonly
* <p>A {@link Titanium.Geolocation#property-locationServicesAuthorization locationServicesAuthorization} value
indicating that the application is not authorized to use location services, <em>or</em>
location services are disabled.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property AUTHORIZATION_RESTRICTED
* @type Number
* @readonly
* <p>A {@link Titanium.Geolocation#property-locationServicesAuthorization locationServicesAuthorization} value
indicating that the application is not authorized to use location servies <em>and</em>
the user cannot change this application's status.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property AUTHORIZATION_UNKNOWN
* @type Number
* @readonly
* <p>A {@link Titanium.Geolocation#property-locationServicesAuthorization locationServicesAuthorization} value
indicating that the authorization state is unknown.</p>
* @description <p>This value is always returned if the device is running an iOS release prior to 4.2.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property AUTHORIZATION_WHEN_IN_USE
* @type Number
* @readonly
* <p>A {@link Titanium.Geolocation#property-locationServicesAuthorization locationServicesAuthorization} value
indicating that the application is authorized to start most location services only while running in the foreground.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
* @platform windowsphone 4.1.0
*/
/**
* @property ERROR_DENIED
* @type Number
* @readonly
* <p>Error code indicating that the user denied access to the location service.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ERROR_HEADING_FAILURE
* @type Number
* @readonly
* <p>Error code indicating that the heading could not be determined.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ERROR_LOCATION_UNKNOWN
* @type Number
* @readonly
* <p>Error code indicating that the user's location could not be determined.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ERROR_NETWORK
* @type Number
* @readonly
* <p>Error code indicating that the network was unavailable.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ERROR_REGION_MONITORING_DELAYED
* @type Number
* @readonly
* <p>Error code indicating that region monitoring is delayed.</p>
* <p> <b>Requires:</b>
iOS 4.0 and later
</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ERROR_REGION_MONITORING_DENIED
* @type Number
* @readonly
* <p>Error code indicating that region monitoring is denied.</p>
* <p> <b>Requires:</b>
iOS 4.0 and later
</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ERROR_REGION_MONITORING_FAILURE
* @type Number
* @readonly
* <p>Error code indicating a region monitoring failure.</p>
* <p> <b>Requires:</b>
iOS 4.0 and later
</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ERROR_TIMEOUT
* @type Number
* @readonly
* <p>Error indicating a timeout.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property PROVIDER_GPS
* @type String
* @readonly
* <p>Specifies the GPS location provider.</p>
* @description <p>Used with {@link Titanium.Geolocation#property-preferredProvider preferredProvider},
{@link Titanium.Geolocation.Android.LocationProvider LocationProvider.name},
{@link Titanium.Geolocation.Android.LocationRule LocationRule.provider}.</p>
<p>In general, the GPS provider has the highest power consumption and the
highest accuracy, but this may vary. In some circumstances, the network
provider may be more reliable.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property PROVIDER_NETWORK
* @type String
* @readonly
* <p>Specifies the network location provider.</p>
* @description <p>Used with {@link Titanium.Geolocation#property-preferredProvider preferredProvider},
{@link Titanium.Geolocation.Android.LocationProvider LocationProvider.name},
{@link Titanium.Geolocation.Android.LocationRule LocationRule.provider}.</p>
<p>Generally requires less power than the GPS provider and provides less accurate
results, but may produce very accurate results in densely-populated areas
with many cell towers and WiFi networks.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property PROVIDER_PASSIVE
* @type String
* @readonly
* <p>Specifies the passive location provider.</p>
* @description <p>Used with {@link Titanium.Geolocation#property-preferredProvider preferredProvider},
{@link Titanium.Geolocation.Android.LocationProvider LocationProvider.name},
{@link Titanium.Geolocation.Android.LocationRule LocationRule.provider}.</p>
<p>This provider only uses cached location information, so it does not use
any power, but makes no guarantee that the location results are recent.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property accuracy
* @type Number
* <p>Specifies the requested accuracy for location updates.</p>
* @description <p>For basic location updates on all platforms, set <code>accuracy</code> to either:</p>
<ul>
<li>{@link Titanium.Geolocation#property-ACCURACY_HIGH ACCURACY_HIGH} for higher-quality location
updates, with the higher power consumption.</li>
<li>{@link Titanium.Geolocation#property-ACCURACY_LOW ACCURACY_LOW} for lower-quality location
updates with lower power consumption.</li>
</ul>
<p>For finer-grained control on iOS, specify one of <code>ACCURACY_BEST</code>,
<code>ACCURACY_NEAREST_TEN_METERS</code>, <code>ACCURACY_HUNDRED_METERS</code>, <code>ACCURACY_KILOMETER</code>, or
<code>ACCURACY_THREE_KILOMETERS</code>. </p>
<p>For finer-grained control on Android, use <em>manual mode</em>, instead of specifing an accuracy.
This mode requires more active management on the part of the application, but it
is recommended to maximize accuracy and battery life.
See {@link Titanium.Geolocation.Android} for details on using manual mode.</p>
<p>Note that for backwards compatibility, Android supports using the iOS accuracy constants.
This usage is deprecated. Applications using one of the iOS constants should
migrate to using <code>ACCURACY_HIGH</code>, <code>ACCURACY_LOW</code>, or Android manual mode.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Geolocation#property-ACCURACY_BEST}
<li> {@link Titanium.Geolocation#property-ACCURACY_BEST_FOR_NAVIGATION}
<li> {@link Titanium.Geolocation#property-ACCURACY_HUNDRED_METERS}
<li> {@link Titanium.Geolocation#property-ACCURACY_KILOMETER}
<li> {@link Titanium.Geolocation#property-ACCURACY_NEAREST_TEN_METERS}
<li> {@link Titanium.Geolocation#property-ACCURACY_THREE_KILOMETERS}
<li> {@link Titanium.Geolocation#property-ACCURACY_HIGH}
<li> {@link Titanium.Geolocation#property-ACCURACY_LOW}
</ul></p>
*/
/**
* @property [distanceFilter=0]
* @type Number
* <p>The minimum change of position (in meters) before a 'location' event is fired.</p>
* @description <p>If set to 0, distance filtering is disabled, meaning that location events are
generated continuously.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property [headingFilter=0 (No limit on heading updates)]
* @type Number
* <p>Minimum heading change (in degrees) before a <code>heading</code> event is fired.</p>
* @description <p>Set to a value greater than zero to reduce the number of heading events generated.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property hasCompass
* @type Boolean
* @readonly
* <p>Indicates whether the current device supports a compass.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 2.1.0
* @platform windowsphone 4.1.0
*/
/**
* @property locationServicesAuthorization
* @type Number
* <p>Returns an authorization constant indicating if the application has access to location services.</p>
* <p> <b>Requires:</b>
iOS 4.2 and later
</p>
* @description <p>Always returns <code>AUTHORIZATION_UNKNOWN</code> on pre-4.2 devices. </p>
<p>If <code>locationServicesAuthorization</code> is <code>AUTHORIZATION_RESTRICTED</code>, you should not
attempt to re-authorize: this will lead to issues.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_ALWAYS}
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_AUTHORIZED}
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_DENIED}
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_RESTRICTED}
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_UNKNOWN}
<li> {@link Titanium.Geolocation#property-AUTHORIZATION_WHEN_IN_USE}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property locationServicesEnabled
* @type Boolean
* @readonly
* <p>Indicates if the user has enabled or disabled location services for the device (not the application).</p>
* @description <p>This method returns <code>true</code> if <em>any</em> location provider is enabled.</p>
<p>On Android OS 2.2 and above, there is a new, "passive" location provider that is enabled
at all times, even when the user disables both the GPS and Network location providers.
Therefore, this method always returns <code>true</code> on these devices.</p>
*/
/**
* @property lastGeolocation
* @type String
* @readonly
* <p>JSON representation of the last geolocation received.</p>
* @description <p>LastEvent is the JSON version of the last geolocation sent by the OS. This does not
trigger a geolocation attempt, nor wait for such. If no geolocation has happened,
this value may be null or undefined.</p>
* @platform android 3.1.2
* @platform iphone 3.1.2
* @platform ipad 3.1.2
* @platform windowsphone 4.1.0
*/
/**
* @class LocationResults
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml
* <p>Argument passed to the {@link Titanium.Geolocation#method-getCurrentPosition getCurrentPosition} callback.</p>
*/
/**
* @property provider
* @type LocationProviderDict
* <p>If <code>success</code> is true, object describing the location provider generating this update.</p>
* @platform android 0.8
*/
/**
* @property coords
* @type LocationCoordinates
* <p>If <code>success</code> is true, actual location data for this update.</p>
*/
/**
* @class LocationCoordinates
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml
* <p>Simple object holding the data for a location update.</p>
*/
/**
* @property latitude
* @type Number
* <p>Latitude of the location update, in decimal degrees.</p>
*/
/**
* @property longitude
* @type Number
* <p>Longitude of the location update, in decimal degrees.</p>
*/
/**
* @property altitude
* @type Number
* <p>Altitude of the location update, in meters.</p>
*/
/**
* @property accuracy
* @type Number
* <p>Accuracy of the location update, in meters.</p>
*/
/**
* @property altitudeAccuracy
* @type Number
* <p>Vertical accuracy of the location update, in meters.</p>
*/
/**
* @property heading
* @type Number
* <p>Compass heading, in degrees. May be unknown if device is not moving. On
iOS, a negative value indicates that the heading data is not valid.</p>
*/
/**
* @property speed
* @type Number
* <p>Current speed in meters/second. On iOS, a negative value indicates that the
heading data is not valid.</p>
*/
/**
* @property timestamp
* @type Number
* <p>Timestamp for this location update, in milliseconds.</p>
*/
/**
* @property floor
* @type LocationCoordinatesFloor
* <p>The floor of the building on which the user is located. Available in iOS 8.0 and later.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @class LocationCoordinatesFloor
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml
* <p>Simple object holding floor of the building on which the user is located.
In places where floor information can be determined.</p>
*/
/**
* @property level
* @type Number
* <p>The logical floor of the building.</p>
* @description <p>Level values represent logical levels above or below ground level and are not
intended to correspond to any numbering scheme in use by the building itself.
The ground floor of a building is always represented by the value 0. Floors
above the ground floor are represented by positive integers, so a value of 1
represents the floor above ground level, a value of 2 represents two floors
above ground level, and so on. Floors below the ground floor are represented
by corresponding negative integers, with a value of -1 representing the floor
immediately below ground level and so on.</p>
*/
/**
* @class ForwardGeocodeResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml
* <p>Simple object returned in the callback from the
{@link Titanium.Geolocation#method-forwardGeocoder forwardGeocoder} method.</p>
<p>Note that Android includes a number of extra fields.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded.</p>
* @description <p>Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Will be undefined if <code>success</code> is <code>true</code>.</p>
*/
/**
* @property code
* @type Number
* <p>Error code. Returns 0 if <code>success</code> is <code>true</code>.</p>
* @description <p>Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.1
*/
/**
* @property accuracy
* @type Number
* <p>Estimated accuracy of the geocoding, in meters.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property longitude
* @type String
* <p>Longitude of the geocoded address.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 3.1.1
*/
/**
* @property latitude
* @type String
* <p>Latitude of the geocoded address.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 3.1.1
*/
/**
* @property street
* @type String
* <p>Street name, without street address.</p>
* @platform android 0.8
*/
/**
* @property street1
* @type String
* <p>Street name.</p>
* @platform android 0.8
*/
/**
* @property city
* @type String
* <p>City name.</p>
* @platform android 0.8
*/
/**
* @property region1
* @type String
* <p>First line of region.</p>
* @platform android 0.8
*/
/**
* @property region2
* @type String
* <p>Not used.</p>
* @platform android 0.8
*/
/**
* @property postalCode
* @type String
* <p>Postal code.</p>
* @platform android 0.8
*/
/**
* @property country
* @type String
* <p>Country name.</p>
* @platform android 0.8
*/
/**
* @property countryCode
* @type String
* <p>Country code.</p>
* @platform android 0.8
*/
/**
* @property country_code
* @type String
* <p>Country code. Same as <code>countryCode</code>.</p>
* @platform android 0.8
*/
/**
* @property displayAddress
* @type String
* <p>Display address. Identical to <code>address</code>.</p>
* @platform android 0.8
*/
/**
* @property address
* @type String
* <p>Full address.</p>
* @platform android 0.8
*/
/**
* @class HeadingResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml
* <p>Argument passed to the {@link Titanium.Geolocation#method-getCurrentHeading getCurrentHeading} callback.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates a successful operation.</p>
* @description <p>Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Will be undefined if <code>success</code> is <code>true</code>.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property code
* @type Number
* <p>Error code.</p>
* @description <p>Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property heading
* @type HeadingData
* <p>If <code>success</code> is true, the actual heading data.</p>
*/
/**
* @class HeadingData
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml
* <p>Simple object holding compass heading data.</p>
*/
/**
* @property accuracy
* @type Number
* <p>Accuracy of the compass heading, in platform-specific units.</p>
* @description <p>On iOS, accuracy is returned as a maximum deviation in degrees. For example,
a value of 10 means the heading is plus or minus degrees from the actual value.
A negative value indicates the compass heading is invalid; for example,
if there is magnetic interference, or if the compass is not calibrated.</p>
<p>On Mobile Web, compass is currently supported only on iOS, and returns the same
value as iOS native.</p>
<p>On Android, the value is set to either 1 (low accuracy), 2 (medium accuracy) or 3
(high accuracy). No specific definition of these accuracy values is supplied.</p>
*/
/**
* @property magneticHeading
* @type Number
* <p>Declination in degrees from magnetic North.</p>
*/
/**
* @property trueHeading
* @type Number
* <p>Declination in degrees from true North.</p>
* @description <p>Calculating the true heading requires correcting the magnetic declination based on
the device's current location. So <code>trueHeading</code> can only be calculated if the device
has a fairly recent location fix. If you want to obtain the true heading, you
should register for location updates as well as compass updates. The location fix
does not need to be very accurate.</p>
<p>On Android, <code>trueHeading</code> is <code>undefined</code> if a recent location fix is not available.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property timestamp
* @type Number
* <p>Timestamp for the heading data, in milliseconds.</p>
*/
/**
* @property x
* @type Number
* <p>Raw geomagnetic data for the X axis.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property y
* @type Number
* <p>Raw geomagnetic data for the Y axis.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property z
* @type Number
* <p>Raw geomagnetic data for the Z axis.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @class LocationProviderDict
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml
* <p>Simple object describing a location provider.</p>
* @description <p>The <code>accuracy</code> and <code>power</code> values correspond to constants defined in the
Android API. See
<a href="http://developer.android.com/reference/android/location/Criteria.html">android.location.Criteria</a>
in the Android API Reference.</p>
<p>These values are generalizations. In general, a provider with coarse accuracy will
provide less accurate results than a provider with fine accuracy, and a provider with
high power requirements will use more battery power than a provider with low power
requirements.</p>
*/
/**
* @property accuracy
* @type Number
* <p>Accuracy of the location provider, either fine (1) or coarse (2).</p>
*/
/**
* @property name
* @type String
* <p>Name of the location provider.</p>
*/
/**
* @property power
* @type Number
* <p>Power consumption for this provider, either low (1), medium (2), or high (3).</p>
*/
/**
* @class ReverseGeocodeResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml
* <p>Simple object returned in the callback from the
{@link Titanium.Geolocation#method-reverseGeocoder reverseGeocoder} method.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Will be undefined if <code>success</code> is <code>true</code>.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property code
* @type Number
* <p>Error code. Returns 0 if <code>success</code> is <code>true</code>.</p>
* @description <p>Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property places
* @type GeocodedAddress[]
* <p>An array of reverse-geocoded addresses matching the requested location.</p>
*/
/**
* @class GeocodedAddress
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml
* <p>Simple object representing a place, returned in the callback from the
{@link Titanium.Geolocation#method-reverseGeocoder reverseGeocoder} method.</p>
*/
/**
* @property street
* @type String
* <p>Street name, without street address.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property street1
* @type String
* <p>Street name.</p>
* @platform android 0.8
*/
/**
* @property city
* @type String
* <p>City name.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property region1
* @type String
* <p>First line of region.</p>
* @platform android 0.8
*/
/**
* @property region2
* @type String
* <p>Not used.</p>
* @platform android 0.8
*/
/**
* @property postalCode
* @type String
* <p>Postal code. On iOS, use <code>zipcode</code>.</p>
* @platform android 0.8
*/
/**
* @property zipcode
* @type String
* <p>Postal code. On Android, use <code>postalCode</code>.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property country
* @type String
* <p>Country name.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property countryCode
* @type String
* <p>Country code. On iOS, use <code>country_code</code>.</p>
* @platform android 0.8
*/
/**
* @property country_code
* @type String
* <p>Country code. Same as <code>country_code</code>.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property longitude
* @type String
* <p>Longitude of the geocoded point.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property latitude
* @type String
* <p>Latitude of the geocoded point.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property displayAddress
* @type String
* <p>Display address. Identical to <code>address</code>.</p>
* @platform android 0.8
*/
/**
* @property address
* @type String
* <p>Full address.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @class LocationAuthorizationResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @class Titanium.Geolocation.MobileWeb
* @platform mobileweb 2.0.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/MobileWeb/MobileWeb.yml
* <p>The Mobile Web specific geolocation capabilities.</p>
*/
/**
* @method getLocationTimeout
* <p>Gets the value of the {@link Titanium.Geolocation.MobileWeb#property-locationTimeout} property.</p>
* @returns {Number}
*/
/**
* @method setLocationTimeout
* <p>Sets the value of the {@link Titanium.Geolocation.MobileWeb#property-locationTimeout} property.</p>
* @param {Number} locationTimeout
<p>New value for the property.</p>
*/
/**
* @method getMaximumLocationAge
* <p>Gets the value of the {@link Titanium.Geolocation.MobileWeb#property-maximumLocationAge} property.</p>
* @returns {Number}
*/
/**
* @method setMaximumLocationAge
* <p>Sets the value of the {@link Titanium.Geolocation.MobileWeb#property-maximumLocationAge} property.</p>
* @param {Number} maximumLocationAge
<p>New value for the property.</p>
*/
/**
* @method getMaximumHeadingAge
* <p>Gets the value of the {@link Titanium.Geolocation.MobileWeb#property-maximumHeadingAge} property.</p>
* @returns {Number}
*/
/**
* @method setMaximumHeadingAge
* <p>Sets the value of the {@link Titanium.Geolocation.MobileWeb#property-maximumHeadingAge} property.</p>
* @param {Number} maximumHeadingAge
<p>New value for the property.</p>
*/
/**
* @method getForwardGeocoderTimeout
* <p>Gets the value of the {@link Titanium.Geolocation.MobileWeb#property-forwardGeocoderTimeout} property.</p>
* @returns {Number}
*/
/**
* @method setForwardGeocoderTimeout
* <p>Sets the value of the {@link Titanium.Geolocation.MobileWeb#property-forwardGeocoderTimeout} property.</p>
* @param {Number} forwardGeocoderTimeout
<p>New value for the property.</p>
*/
/**
* @method getReverseGeocoderTimeout
* <p>Gets the value of the {@link Titanium.Geolocation.MobileWeb#property-reverseGeocoderTimeout} property.</p>
* @returns {Number}
*/
/**
* @method setReverseGeocoderTimeout
* <p>Sets the value of the {@link Titanium.Geolocation.MobileWeb#property-reverseGeocoderTimeout} property.</p>
* @param {Number} reverseGeocoderTimeout
<p>New value for the property.</p>
*/
/**
* @property [locationTimeout=Infinity]
* @type Number
* <p>The time within which location requests must succeed, in milliseconds.</p>
*/
/**
* @property [maximumLocationAge=0]
* @type Number
* <p>The maximum age of cached locations acceptible for location requests, in milliseconds.</p>
*/
/**
* @property [maximumHeadingAge=1000]
* @type Number
* <p>The maximum age of cached locations acceptible for heading requests, in milliseconds.</p>
*/
/**
* @property forwardGeocoderTimeout
* @type Number
* <p>The time within which forward geocoder requests must succeed, in milliseconds.</p>
*/
/**
* @property reverseGeocoderTimeout
* @type Number
* <p>The time within which reverse geocoder requests must succeed, in milliseconds.</p>
*/
/**
* @class Titanium.Gesture
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Gesture/Gesture.yml
* <p>The Gesture module is responsible for high-level device gestures such as orientation changes
and shake gestures.</p>
*/
/**
* @event orientationchange
* <p>Fired when the device orientation changes.</p>
* @description <p>On Android, note that the application must have a heavyweight window or tab group open
in order to receive the <code>orientationchange</code> event. It is not necessary for the heavyweight
window to be the topmost window.</p>
<p>Almost all real-world applications will have a heavyweight window or a tab group. This is
only likely to be an issue if you create a test case or test application that adds an
orientation change listener from <code>app.js</code> without opening a heavyweight window. </p>
<p>Android and Mobile Web do not report the "reverse" orientations,
<code>UPSIDE_PORTRAIT</code> and <code>LANDSCAPE_RIGHT</code>. These are reported as
<code>PORTRAIT</code> and <code>LANDSCAPE_LEFT</code>, respectively. </p>
* @param {Number} orientation
<p>Orientation of the current window.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-PORTRAIT}
<li> {@link Titanium.UI#property-UPSIDE_PORTRAIT}
<li> {@link Titanium.UI#property-LANDSCAPE_LEFT}
<li> {@link Titanium.UI#property-LANDSCAPE_RIGHT}
<li> {@link Titanium.UI#property-FACE_DOWN}
<li> {@link Titanium.UI#property-FACE_UP}
<li> {@link Titanium.UI#property-UNKNOWN}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event shake
* <p>Fired when the device is shaken.</p>
* @description <p>A shake gesture consists of a series of quick accelerations, and is represented by a series
of shake events. </p>
<p>The <code>timestamp</code> property represents the interval between shake events. It is measured in
milliseconds on Android and Mobile Web, and in seconds on iOS.</p>
<p>Note that Mobile Web detect shake gestures using the device accelerometer, if the device
and browser support this. This event cannot be generated on Mobile Web in the iOS simulator.
The simulator's <strong>Shake Gesture</strong> menu item generates a native shake event, but does not
generate accelerometer events to the browser.</p>
* @param {Number} timestamp
<p>Time interval since previous shake event. On iOS, this value is 0 for the first shake
event in a series.</p>
* @param {Number} x
<p>Acceleration along the X axis, in Gs.</p>
* @param {Number} y
<p>Acceleration along the Y axis, in Gs.</p>
* @param {Number} z
<p>Acceleration along the Z axis, in Gs.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getLandscape
* <p>Gets the value of the {@link Titanium.Gesture#property-landscape landscape} property.</p>
* @returns {Boolean}
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getPortrait
* <p>Gets the value of the {@link Titanium.Gesture#property-portrait portrait} property.</p>
* @returns {Boolean}
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method isFaceDown
* <p>Returns whether the current window is considered face down by the device.</p>
* @description <p>Returns <code>true</code> if face down else returns <code>false</code>.</p>
* @returns {Boolean}
* @platform windowsphone 4.1.0
*/
/**
* @method isFaceUp
* <p>Returns whether the current window is considered face up by the device.</p>
* @description <p>Returns <code>true</code> if face up else returns <code>false</code>.</p>
* @returns {Boolean}
* @platform windowsphone 4.1.0
*/
/**
* @method isLandscape
* <p>Returns whether current window is considered landscape by the device.</p>
* @description <p>Value returns <code>true</code> if in landscape, and <code>false</code> otherwise.</p>
* @returns {Boolean}
*/
/**
* @method isPortrait
* <p>Returns whether current window is considered portrait by the device.</p>
* @description <p>Value returns <code>true</code> if in portrait, and <code>false</code> otherwise.</p>
* @returns {Boolean}
*/
/**
* @method getOrientation
* <p>Gets the value of the {@link Titanium.Gesture#property-orientation} property.</p>
* @returns {Number}
*/
/**
* @property orientation
* @type Number
* @readonly
* <p>Orientation of the current window.</p>
* @description <p>Value may be one of the group of {@link Titanium.UI} orientation constants,
{@link Titanium.UI#property-PORTRAIT},
{@link Titanium.UI#property-UPSIDE_PORTRAIT},
{@link Titanium.UI#property-LANDSCAPE_LEFT},
{@link Titanium.UI#property-LANDSCAPE_RIGHT},
{@link Titanium.UI#property-FACE_UP},
{@link Titanium.UI#property-FACE_DOWN},
or {@link Titanium.UI#property-UNKNOWN}. </p>
<p>On iOS, returns the current orientation of the <em>device</em>, regardless of the screen
orientation. To determine the current screen orientation on iOS, use
{@link Titanium.UI#property-orientation}. </p>
<p>On Android and Mobile Web, returns the orientation of the current window, and never reports
the "reverse" orientations (<code>LANDSCAPE_RIGHT</code> and <code>UPSIDE_PORTRAIT</code>). </p>
<p>For Mobile Web, the orientation reported by <code>Gesture.orientation</code> and
{@link Titanium.UI.Window#property-orientation Window.orientation} is always the same, and corresponds to
the orientation of the browser window. </p>
<p>To set the <em>allowable</em> orientations for a window, see {@link Titanium.UI.Window#property-orientationModes}.</p>
*/
/**
* @property landscape
* @type Boolean
* @readonly
* <p>Indicates whether current window is considered landscape by the device.</p>
* @description <p>Value is <code>true</code> if in landscape, and <code>false</code> otherwise. </p>
<p>On iOS, use {@link Titanium.Gesture#method-isLandscape isLandscape}.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property portrait
* @type Boolean
* @readonly
* <p>Indicates whether current window is considered portrait by the device.</p>
* @description <p>Value is <code>true</code> if in portrait, and <code>false</code> otherwise. </p>
<p>On iOS, use {@link Titanium.Gesture#method-isPortrait isPortrait}.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.IOStream
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/IOStream.yml
* <p>IOStream is the interface that all stream types implement.</p>
* @description <p>See the {@link Titanium.Stream} module for related utility methods that support asynchronous
I/O.</p>
* <h3>Examples</h3>
<h4>Write Data to a Stream</h4>
<p>This example demonstrates writing data to a stream.</p>
<pre><code>var outBuffer = Ti.createBuffer({data: "write me"});
// stream object could be socket, file, buffer or blob
var outStream = Ti.Stream.createStream({mode: Ti.Stream.MODE_WRITE});
var bytesWritten = outStream.write(outBuffer); // writes entire buffer to stream
Ti.API.info("Bytes written:" + bytesWritten); // should be 8
bytesWritten = outStream.write(outBuffer, 2, 5); // only writes "ite m" to stream
Ti.API.info("Bytes written:" + bytesWritten); // should be 5
</code></pre><h4>Read Data From a Stream</h4>
<p>This shows a simple example of reading data from a stream, one buffer full at a
time. </p>
<pre><code>var size = 0;
// read data one buffer full at a time
while ((size = instream.read(buffer)) > -1) {
// do something with the data here ...
Ti.API.info("Read " + size + " bytes.");
}
</code></pre><h4>Read Data With Offset and Length</h4>
<p>This example shows how to read data from a stream into a buffer. We assume that
the <code>inStream</code> variable holds a previously initialized stream that contains the
string, "World Titanium".</p>
<pre><code>var inBuffer = Ti.createBuffer({ value: "Hello [ ]" });
// Read the first 6 bytes from the stream to the buffer, starting at position 10.
var bytesRead = inStream.read(inBuffer, 10, 6);
Ti.API.info("Bytes read: " + bytesRead);
Ti.API.info(inBuffer.toString());
// Read the next 8 bytes from the stream to the buffer, starting at position 8.
bytesRead = inStream.read(inBuffer, 8, 8);
Ti.API.info("Bytes read: " + bytesRead);
Ti.API.info(inBuffer.toString());
</code></pre>
<p>The second <code>read</code> overwrites the data from the first <code>read</code>, so the output looks
like this:</p>
<pre><code>[INFO] Bytes read: 6
[INFO] Hello [ World ]
[INFO] Bytes read: 8
[INFO] Hello [ Titanium ]
</code></pre>
*/
/**
* @method read
* <p>Reads data from this stream into a buffer.</p>
* @description <p>If <code>offset</code> and <code>length</code> are specified, data is written into the buffer starting at
position <code>offset</code>. Data is read from this stream until one of the following occurs:</p>
<ul>
<li>the end of this stream is reached</li>
<li>the end of the buffer is reached</li>
<li>a total of <code>length</code> bytes have been read from the stream</li>
</ul>
<p>If <code>offset</code> and <code>length</code> are omitted, data is written starting at the beginning
of the buffer.</p>
<p>Returns the number of bytes read, or -1 if the end of stream was reached before
any data was read.</p>
<p>Throws an exception on error. For example, if the <code>offset</code> value is past
the last byte of <code>buffer</code>. </p>
<p>This method is synchronous. To perform an asynchronous read on an <code>IOStream</code>, use
{@link Titanium.Stream#method-read}.</p>
* @param {Titanium.Buffer} buffer
<p>Buffer to read stream data into.</p>
* @param {Number} offset (optional)
<p>Offset into the buffer to start writing stream data.
If specified, <code>length</code> must also be specified.</p>
* @param {Number} length (optional)
<p>Maximum number of bytes to read.
If specified, <code>offset</code> must also be specified.</p>
* @returns {Number}Number of bytes read.
*/
/**
* @method write
* <p>Writes data from a buffer to this stream.</p>
* @description <p>If <code>offset</code> and <code>length</code> are specified, data is read from the buffer starting at
<code>offset</code>. Bytes are read from the buffer and written to the stream until:</p>
<ul>
<li>the end of the buffer is reached</li>
<li><code>length</code> bytes have been written</li>
<li>the stream returns an error</li>
</ul>
<p>If <code>offset</code> and <code>length</code> are omitted, all of the data in the buffer is written to
this stream.</p>
<p>Returns the number of bytes actually written.</p>
<p>Throws an exception if an error is encountered.</p>
* @param {Titanium.Buffer} buffer
<p>Buffer to write to this stream.</p>
* @param {Number} offset (optional)
<p>Offset in the buffer of the first byte to write to the stream.
If specified, <code>length</code> must also be specified.</p>
* @param {Number} length (optional)
<p>Maximum number of bytes to write to the stream.
If specified, <code>offset</code> must also be specified.</p>
* @returns {Number}Number of bytes written.
*/
/**
* @method isWritable
* <p>Indicates whether this stream is writable.</p>
* @returns {Boolean}True if stream is writable, false otherwise.
*/
/**
* @method isReadable
* <p>Indicates whether this stream is readable.</p>
* @returns {Boolean}True if stream is readable, false otherwise.
*/
/**
* @method close
* <p>Closes this stream.</p>
* @description <p>Throws an exception on error.</p>
*/
/**
* @class Titanium.Locale
* @platform android 1.5
* @platform iphone 1.5
* @platform ipad 1.5
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Locale/Locale.yml
* <p>The top level Locale module.</p>
* @description <p>The <code>Locale</code> module works with localization files to which are generated during compilation
into the operating system specific localization formats. The <code>Locale</code> module provides
locale-specific strings which can be referenced at runtime. Additionally, the module
contains a few methods and properties for querying device locale information.</p>
<p>The macro <code>L</code> can be used as an alias for the {@link Titanium.Locale#method-getString} method.</p>
*/
/**
* @method formatTelephoneNumber
* <p>Formats a telephone number according to the current system locale.</p>
* @param {String} number
<p>Phone number.</p>
* @returns {String}
* @platform android 1.5
*/
/**
* @method getCurrencyCode
* <p>Returns the ISO 3-letter currency code for the specified locale.</p>
* @description <p>This method returns one of the ISO 4217 currency codes. For example,
<code>getCurrencyCode('en-US')</code> returns <code>USD</code>. See the <code>xe.com</code> website
<a href="http://www.xe.com/iso4217.php#section2">Currency List</a> section of the <code>www.xe.com</code> website for
reference.</p>
* @param {String} locale
<p>Locale, as a combination of ISO 2-letter language and country codes. For example,
<code>en-US</code> or <code>en-GB</code>. See the
<a href="http://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1</a> and
<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements">ISO 3166-1 alpha-2</a>
sections of wikipedia for reference.</p>
* @returns {String}
* @platform android 1.5
* @platform iphone 1.5
* @platform ipad 1.5
* @platform windowsphone 4.1.0
*/
/**
* @method getCurrencySymbol
* <p>Returns the currency symbol for the specified currency code.</p>
* @description <p>This method returns one of the international currency symbols. For example,
<code>getCurrencySymbol('USD')</code> returns <code>$</code>. See the
<a href="http://www.xe.com/symbols.php#section2">Currency Symbols</a> section of the
<code>www.xe.com</code> website for reference.</p>
* @param {String} currencyCode
<p>Currency, as an ISO 3-letter code. For example, <code>USD</code> or <code>GBP</code>. See the
<a href="http://www.xe.com/iso4217.php#section2">Currency List</a> section of the <code>www.xe.com</code> website for
reference.</p>
* @returns {String}
* @platform android 1.5
* @platform iphone 1.5
* @platform ipad 1.5
* @platform windowsphone 4.1.0
*/
/**
* @method getLocaleCurrencySymbol
* <p>Returns the currency symbol for the specified locale.</p>
* @description <p>This method returns one of the international currency symbols. For example,
<code>getLocaleCurrencySymbol('en-US')</code> returns <code>$</code>. See the
<a href="http://www.xe.com/symbols.php#section2">Currency Symbols</a> section of the
<code>www.xe.com</code> website for reference.</p>
* @param {String} locale
<p>Locale, as a combination of ISO 2-letter language and country codes. For example,
<code>en-US</code> or <code>en-GB</code>. See the
<a href="http://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1</a> and
<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements">ISO 3166-1 alpha-2</a>
sections of wikipedia for reference.</p>
* @returns {String}
* @platform android 1.5
* @platform iphone 1.5
* @platform ipad 1.5
* @platform windowsphone 4.1.0
*/
/**
* @method getString
* <p>Returns a string, localized according to the current system locale using the appropriate
<code>/i18n/LANG/strings.xml</code> localization file.</p>
* @description <p>This method is functionaly identical to its alias {@link Global#method-L}. For example,
<code>Ti.Locale.getString('thisKey', 'missing key')</code> produces the same result as
<code>L('thisKey', 'missing key')</code>.</p>
<p>When using with {@link Global.String#method-format} to localize a phrase with multiple string
substitution placeholders, add the <code>formatted="false"</code> directive to the relevant
<code>strings.xml</code> element. See example for a demonstration.</p>
* <h3>Examples</h3>
<h4>String Localization Demonstration</h4>
<p>Localize two strings, "hello" and "goodbye" (using the keys "greeting" and "signoff")
for English and Spanish system locales. </p>
<p>Note: use the device's system settings to change locales and test this code.</p>
<h4><code>/i18n/en/strings.xml</code></h4>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="phrase" formatted="false">You say %2$s and I say %1$s!</string>
<string name="greeting">hello</string>
<string name="signoff">goodbye</string>
</resources>
</code></pre>
<h4><code>/i18n/es/strings.xml</code></h4>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="phrase" formatted="false">You say %2$s and I say %1$s!</string>
<string name="greeting">hola</string>
<string name="signoff">adios</string>
</resources>
</code></pre>
<h4><code>/Resources/app.js</code></h4>
<pre><code>var i18nMissingMsg = '<no translation available>';
// for English locales, displays "You say goodbye and I say hello!"
// for Spanish locales, displays "You say adios and I say hola!"
Ti.API.info('You say ' + Ti.Locale.getString('signoff', i18nMissingMsg) + ' and I say ' + Ti.Locale.getString('greeting', i18nMissingMsg) + '!');
// uses alias L() instead of Ti.Locale.getString()
// formatted="false" is used in the strings.xml element for multiple string substitution
// for English locales, displays "You say goodbye and I say hello!"
// for Spanish locales, displays "You say adios and I say hola!"
Ti.API.info(String.format(L('phrase'), L('greeting', i18nMissingMsg), L('signoff', i18nMissingMsg)));
</code></pre>
* @param {String} key
<p>Key of string.</p>
* @param {String} hint (optional)
<p>Text to return if key does not exist in the localization file.</p>
* @returns {String}
*/
/**
* @method setLanguage
* <p>Sets the current language of the application.</p>
* @description <p>This property holds a value such as <code>en</code> or <code>fr</code>. See the
<a href="http://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1</a> section of wikipedia for reference.</p>
<p>On Android you can also specify combination of a ISO 2-letter language and country codes. For example,
<code>en-US</code> or <code>en-GB</code>. See the <a href="http://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1</a> and
<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements">ISO 3166-1 alpha-2</a>
sections of wikipedia for reference.</p>
* @param {String} language
<p>The specified ISO 639-1 code.</p>
* @platform android 1.5
* @platform iphone 1.5
* @platform ipad 1.5
* @platform windowsphone 4.1.0
*/
/**
* @method getCurrentCountry
* <p>Gets the value of the {@link Titanium.Locale#property-currentCountry} property.</p>
* @returns {String}
*/
/**
* @method getCurrentLanguage
* <p>Gets the value of the {@link Titanium.Locale#property-currentLanguage} property.</p>
* @returns {String}
*/
/**
* @method getCurrentLocale
* <p>Gets the value of the {@link Titanium.Locale#property-currentLocale} property.</p>
* @returns {String}
*/
/**
* @property currentCountry
* @type String
* @readonly
* <p>Country of the current system locale, as an ISO 2-letter code.</p>
* @description <p>This property holds a value such as <code>US</code> or <code>GB</code>. See the
<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements">ISO 3166-1 alpha-2</a>
country codes section of wikipedia for reference.</p>
*/
/**
* @property currentLanguage
* @type String
* @readonly
* <p>Language of the current system locale, as an ISO 2-letter code.</p>
* @description <p>This property holds a value such as <code>en</code> or <code>fr</code>. See the
<a href="http://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1</a> section of wikipedia for reference.</p>
*/
/**
* @property currentLocale
* @type String
* @readonly
* <p>Current system locale, as a combination of ISO 2-letter language and country codes.</p>
* @description <p>This property holds a value such as <code>en-US</code> or <code>en-GB</code>.
See the <a href="http://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1</a> and
<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements">ISO 3166-1 alpha-2</a>
sections of wikipedia for reference.</p>
*/
/**
* @class Titanium.Map.Annotation
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Map/Annotation.yml
* <p>Represents a labeled point of interest on the map that the user can click on.</p>
* @deprecated 3.2.0 For new Android applications or to use Google Maps v2, use the [ti.map add-on module](Modules.Map).
For the iOS platform, use the [ti.map add-on module](Modules.Map). Support for the
`Titanium.Map` module on iOS was removed in Release 3.2.0.
For all other platforms, continue to use this module.
* @description <p>The <code>Annotation</code> object gives you low-level control over annotations that can be added to
{@link Titanium.Map.View map view}. An annotation must have its <code>latitude</code> and <code>longitude</code>
properties set to appear on a map.</p>
<p>An annotation can also have a title, a subtitle, and two inset buttons or views on the left
and right side of the title. All of these items are optional.</p>
<p>The controls on the left and right side of the annotation can be specified in one of two
ways:</p>
<ul>
<li><p>To display an image, set the {@link Titanium.Map.Annotation#property-leftButton leftButton} or
{@link Titanium.Map.Annotation#property-rightButton rightButton} property to an image URL. (On
iOS, you can also use a {@link Titanium.UI.iPhone.SystemButton SystemButton} constant
to use one of the native system button icons.) </p></li>
<li><p>To add another type of view to the annotation, set the
{@link Titanium.Map.Annotation#property-leftView leftView} or
{@link Titanium.Map.Annotation#property-rightView rightView} property to a {@link Titanium.UI.View View}
object.</p></li>
</ul>
<p><code>leftButton</code> and <code>leftView</code> are mutually exclusive, as are <code>rightButton</code> and
<code>rightView</code>. </p>
<p>An annotation has two states: selected and deselected. A deselected annotation
is marked by a pin image. When the user selects the pin, the full annotation is
displayed.</p>
<p>You can specify a custom image for the map pin by setting the
{@link Titanium.Map.Annotation#property-image image} property. </p>
<p>When the user clicks on an annotation, a <code>click</code> event is generated. </p>
<p>On iOS, You can add a click event listener to a specific annotation, or add a
click event listener to the map view to receive click events from all annotations
on the map.</p>
<p>On Android, you must add the click event listener to the map view; the annotation
itself does not generate these events. </p>
<p>Use the {@link Titanium.Map#method-createAnnotation} method to create an annotation.</p>
*/
/**
* @event click
* <p>Fired when the user selects, deselects, or clicks on this annotation.</p>
* @description <p>This event is not currently supported on Android. Register for the
{@link Titanium.Map.View#event-click click} event on the map view to receive
events when any of the map's annotations are clicked.</p>
<p>This event is fired in two circumstances:</p>
<ul>
<li>If the user clicks on an annotation.</li>
<li>The user deselects an annotation.</li>
</ul>
<p>On iOS, the user deselects an annotation by clicking in the map view outside of
the annotation. On Android, the user deselects an annotation by clicking on the
annotation pin.</p>
<p>The <code>click</code> event includes a value, <code>clicksource</code>, which describes the part of the
annotation that was clicked. Note that the possible values for <code>clicksource</code> differ between
platforms.</p>
<p>On iOS, if the user clicks on the pin or annotation, the <code>clicksource</code> is one of:
<code>pin</code>, <code>annotation</code>, <code>leftButton</code>, <code>rightButton</code>, <code>leftView</code>, <code>rightView</code>,
<code>title</code>, or <code>subtitle</code>. If the user deselects the annotation by clicking elsewhere
in the map view, <code>clicksource</code> is <code>null</code>.</p>
* @param {Number} index
<p>Index of the annotation in the map view's {@link Titanium.Map.View#property-annotations annotations} array.</p>
* @param {String} title
<p>Title of the annotation.</p>
* @param {Titanium.Map.View} map
<p>The map view instance that this annotation belongs to.</p>
* @param {String} clicksource
<p>Source of the click event, such as <code>pin</code>, or <code>leftButton</code>.</p>
* @param {Titanium.Map.Annotation} annotation
<p>Annotation source object.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getAnimate
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-animate} property.</p>
* @returns {Boolean}
*/
/**
* @method setAnimate
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-animate} property.</p>
* @param {Boolean} animate
<p>New value for the property.</p>
*/
/**
* @method getCanShowCallout
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-canShowCallout} property.</p>
* @returns {Boolean}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setCanShowCallout
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-canShowCallout} property.</p>
* @param {Boolean} canShowCallout
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getCenterOffset
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-centerOffset} property.</p>
* @returns {Point}
* @platform iphone 3.1.2
* @platform ipad 3.1.2
*/
/**
* @method setCenterOffset
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-centerOffset} property.</p>
* @param {Point} centerOffset
<p>New value for the property.</p>
* @platform iphone 3.1.2
* @platform ipad 3.1.2
*/
/**
* @method getCustomView
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-customView} property.</p>
* @returns {Titanium.UI.View}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method setCustomView
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-customView} property.</p>
* @param {Titanium.UI.View} customView
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getDraggable
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-draggable} property.</p>
* @returns {Boolean}
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method setDraggable
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-draggable} property.</p>
* @param {Boolean} draggable
<p>New value for the property.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method getImage
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-image} property.</p>
* @returns {String/Titanium.Blob}
*/
/**
* @method setImage
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-image} property.</p>
* @param {String/Titanium.Blob} image
<p>New value for the property.</p>
*/
/**
* @method getLatitude
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-latitude} property.</p>
* @returns {Number}
*/
/**
* @method setLatitude
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-latitude} property.</p>
* @param {Number} latitude
<p>New value for the property.</p>
*/
/**
* @method getLongitude
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-longitude} property.</p>
* @returns {Number}
*/
/**
* @method setLongitude
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-longitude} property.</p>
* @param {Number} longitude
<p>New value for the property.</p>
*/
/**
* @method getLeftButton
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-leftButton} property.</p>
* @returns {Number/String}
*/
/**
* @method setLeftButton
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-leftButton} property.</p>
* @param {Number/String} leftButton
<p>New value for the property.</p>
*/
/**
* @method getLeftView
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-leftView} property.</p>
* @returns {Titanium.UI.View}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setLeftView
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-leftView} property.</p>
* @param {Titanium.UI.View} leftView
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getPinImage
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-pinImage} property.</p>
* @deprecated 1.4 Use <Titanium.Map.Annotation.image> instead.
* @returns {String}
* @platform android 0.9
*/
/**
* @method setPinImage
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-pinImage} property.</p>
* @deprecated 1.4 Use <Titanium.Map.Annotation.image> instead.
* @param {String} pinImage
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getPincolor
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-pincolor} property.</p>
* @returns {Number}
*/
/**
* @method setPincolor
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-pincolor} property.</p>
* @param {Number} pincolor
<p>New value for the property.</p>
*/
/**
* @method getRightButton
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-rightButton} property.</p>
* @returns {Number/String}
*/
/**
* @method setRightButton
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-rightButton} property.</p>
* @param {Number/String} rightButton
<p>New value for the property.</p>
*/
/**
* @method getRightView
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-rightView} property.</p>
* @returns {Titanium.UI.View}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setRightView
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-rightView} property.</p>
* @param {Titanium.UI.View} rightView
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getSubtitle
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-subtitle} property.</p>
* @returns {String}
*/
/**
* @method setSubtitle
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-subtitle} property.</p>
* @param {String} subtitle
<p>New value for the property.</p>
*/
/**
* @method getSubtitleid
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-subtitleid} property.</p>
* @returns {String}
*/
/**
* @method setSubtitleid
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-subtitleid} property.</p>
* @param {String} subtitleid
<p>New value for the property.</p>
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getTitleid
* <p>Gets the value of the {@link Titanium.Map.Annotation#property-titleid} property.</p>
* @returns {String}
*/
/**
* @method setTitleid
* <p>Sets the value of the {@link Titanium.Map.Annotation#property-titleid} property.</p>
* @param {String} titleid
<p>New value for the property.</p>
*/
/**
* @property animate
* @type Boolean
* <p>Boolean to indicate whether the pin should animate when dropped.</p>
* @description <p>Must be set before the annotation is added to the map view.</p>
*/
/**
* @property canShowCallout
* @type Boolean
* <p>Defines whether the annotation view is able to display extra information in a callout bubble.</p>
* @description <p>When this is set to true, the annotation view shows the callout bubble on selection. Set this to false to disabled
the showing of the callout bubble on selection. This must be set before the annotation is added to the map.</p>
<p>If this value is undefined, the value is treated as <strong>explicit true</strong>. </p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property centerOffset
* @type Point
* <p>Defines a center offset point for the annotation.</p>
* @description <p>By default, the center point of an annotation view is placed at the coordinate point of the associated annotation.
Use this property to reposition the annotation view as needed.
Positive offset values move the annotation view down and to the right, while negative values move it up and to the left.</p>
* @platform iphone 3.1.2
* @platform ipad 3.1.2
*/
/**
* @property customView
* @type Titanium.UI.View
* <p>Defines a custom view to be used by the annotation.</p>
* @description <p>A custom View to display for the annotation. <strong>User interaction is disabled on the view.</strong>
No view interaction events (click, touchstart etc) will be fired.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property [draggable=false]
* @type Boolean
* <p>Determines whether the pin can be dragged by the user.</p>
* @description <p>Must be set before the annotation is added to the map view.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property [image=If not specified, a standard map pin image is used.]
* @type String/Titanium.Blob
* <p>Image to use for the the pin.</p>
* @description <p>The image can be specified using a local URL or an image <code>Blob</code>. This is ignored if the customView property is set.</p>
*/
/**
* @property latitude
* @type Number
* <p>Latitude of the annotation, in decimal degrees.</p>
*/
/**
* @property longitude
* @type Number
* <p>Longitude of the annotation, in decimal degrees.</p>
*/
/**
* @property leftButton
* @type Number/String
* <p>Left button image on the annotation, specified as an image URL or an iOS
button constant.</p>
* @description <p>On iOS, you can specify a system button icon using one of the
{@link Titanium.UI.iPhone.SystemButton SystemButton} constants:</p>
<pre><code>myAnnotation.leftButton = Titanium.UI.iPhone.SystemButton.INFO_LIGHT;
</code></pre>
<p>Mutually exclusive with <code>leftView</code>.</p>
*/
/**
* @property leftView
* @type Titanium.UI.View
* <p>Left view that is displayed on the annotation.</p>
* @description <p>Mutually exclusive with <code>leftButton</code>.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property pinImage
* @type String
* <p>Image for the pin instead of the default image.</p>
* @deprecated 1.4 Use <Titanium.Map.Annotation.image> instead.
* @platform android 0.9
*/
/**
* @property pincolor
* @type Number
* <p>Pin color. Specify one of: {@link Titanium.Map#property-ANNOTATION_GREEN}, {@link Titanium.Map#property-ANNOTATION_PURPLE}
or {@link Titanium.Map#property-ANNOTATION_RED}.</p>
* @description <p>Pin color is ignored if a custom pin image is specified using {@link Titanium.Map.Annotation#property-image}.</p>
*/
/**
* @property rightButton
* @type Number/String
* <p>Right button image on the annotation, specified as an image URL or an iOS
button constant.</p>
* @description <p>On iOS, you can specify a system button icon using one of the
{@link Titanium.UI.iPhone.SystemButton SystemButton} constants.</p>
<p>Mutually exclusive with <code>rightView</code>.</p>
*/
/**
* @property rightView
* @type Titanium.UI.View
* <p>Right view that is displayed on the annotation.</p>
* @description <p>Mutually exclusive with <code>rightButton</code>.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property subtitle
* @type String
* <p>Secondary title of the annotation view.</p>
*/
/**
* @property subtitleid
* @type String
* <p>Key in the locale file to use for the subtitle property.</p>
*/
/**
* @property title
* @type String
* <p>Primary title of the annotation view.</p>
*/
/**
* @property titleid
* @type String
* <p>Key in the locale file to use for the title property.</p>
*/
/**
* @class Titanium.Map
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Map/Map.yml
* <p>The top level Map module. The Map module is used for creating in-application native maps.</p>
* @deprecated 3.2.0 For new iOS and Android applications use the <a href="#!/api/Modules.Map">ti.map add-on module</a>.
Support for the `Titanium.Map` module in iOS and Android was removed in Release 3.2.0.
For all other platforms, continue to use this module.
* @description <h4>Android Platform Notes</h4>
<p>This module provides native map support using Google Maps API v1. As of March 3, 2013,
Google is no longer issuing Google Maps API v1 keys and this module can no longer be used to
support native maps on Android unless you have these keys.</p>
<p>For new Android applications, use the {@link Modules.Map ti.map add-on module}
to add native maps support for your application. If you have an application that still uses the old keys,
you can either transition to the new module or continue using the built-in Titanium.Maps module.</p>
<h4>iOS Platform Notes</h4>
<p>Since Release 3.2.0, support for this module was removed. Use the {@link Modules.Map ti.map add-on module}.</p>
* <h3>Examples</h3>
<h4>Map Example</h4>
<p>This is a basic map example that places a custom annotation on the map, and
listens for click events on the annotation. </p>
<p>In this example, a custom property (<code>myid</code>) is added to the annotation object.
While adding custom members to a Titanium object is not generally recommended,
in this case it provides a mechanism for uniquely identifying an annotation. This
can be useful, for example, if the annotations are dynamically generated
and it is not practical to identify them by title.</p>
<pre><code>var win = Titanium.UI.createWindow();
var mountainView = Titanium.Map.createAnnotation({
latitude:37.390749,
longitude:-122.081651,
title:"Appcelerator Headquarters",
subtitle:'Mountain View, CA',
pincolor:Titanium.Map.ANNOTATION_RED,
animate:true,
leftButton: '../images/appcelerator_small.png',
myid:1 // Custom property to uniquely identify this annotation.
});
var mapview = Titanium.Map.createView({
mapType: Titanium.Map.STANDARD_TYPE,
region: {latitude:37.390749, longitude:-122.081651,
latitudeDelta:0.01, longitudeDelta:0.01},
animate:true,
regionFit:true,
userLocation:true,
annotations:[mountainView]
});
win.add(mapview);
// Handle click events on any annotations on this map.
mapview.addEventListener('click', function(evt) {
Ti.API.info("Annotation " + evt.title + " clicked, id: " + evt.annotation.myid);
// Check for all of the possible names that clicksouce
// can report for the left button/view.
if (evt.clicksource == 'leftButton' || evt.clicksource == 'leftPane' ||
evt.clicksource == 'leftView') {
Ti.API.info("Annotation " + evt.title + ", left button clicked.");
}
});
win.open();
// For the iOS platform, wait for the complete event to ensure the region is set
if (Ti.Platform.name == 'iPhone OS') {
mapview.addEventListener('complete', function(evt){
mapview.region = {
latitude:37.390749, longitude:-122.081651,
latitudeDelta:0.01, longitudeDelta:0.01
};
});
}
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<p>index.xml:</p>
<pre><code><Alloy>
<Window id="win">
<!-- Note the ns attribute is used to change the default namespace. -->
<View id="mapview" ns="Ti.Map" onClick="doClick" onComplete="setRegion"
animate="true" regionFit="true" userLocation="true"
mapType="Ti.Map.STANDARD_TYPE" >
<Annotation id="mountainView"
latitude="37.390749" longitude="-122.081651"
title="Appcelerator Headquarters" subtitle="Mountain View, CA"
pincolor="Titanium.Map.ANNOTATION_RED"
leftButton="/images/appcelerator_small.png"
myid="1"/>
<!-- Place other child views here, such as an ImageView to add an overlay. -->
</View>
</Window>
</Alloy>
</code></pre>
<p>index.js:</p>
<pre><code>function doClick(evt){
Ti.API.info("Annotation " + evt.title + " clicked, id: " + evt.annotation.myid);
// Check for all of the possible names that clicksouce
// can report for the left button/view.
if (evt.clicksource == 'leftButton' || evt.clicksource == 'leftPane' ||
evt.clicksource == 'leftView') {
Ti.API.info("Annotation " + evt.title + ", left button clicked.");
}
};
function setRegion(evt) {
// For the iOS platform, wait for the complete event to ensure the region is set
if (OS_IOS) {
$.mapview.region = {
latitude:37.390749, longitude:-122.081651,
latitudeDelta:0.01, longitudeDelta:0.01
};
}
}
// These parameters can also be defined in the TSS file.
$.mapview.annotations = [$.mountainView];
$.mapview.region = {latitude:37.390749, longitude:-122.081651, latitudeDelta:0.01, longitudeDelta:0.01};
$.win.open
</code></pre>
*/
/**
* @method createAnnotation
* <p>Creates and returns an instance of {@link Titanium.Map.Annotation}.</p>
* @deprecated 3.2.0 For new Android applications or to use Google Maps v2, use the [ti.map add-on module](Modules.Map).
For the iOS platform, use the [ti.map add-on module](Modules.Map). Support for the
`Titanium.Map` module on iOS was removed in Release 3.2.0.
For all other platforms, continue to use this module.
* @param {Dictionary<Titanium.Map.Annotation>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Map.Annotation} except those marked not-creation or read-only.</p>
* @returns {Titanium.Map.Annotation}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method createView
* <p>Creates and returns an instance of {@link Titanium.Map.View}.</p>
* @deprecated 3.2.0 For new iOS and Android applications use the <a href="#!/api/Modules.Map">ti.map add-on module</a>.
Support for the `Titanium.Map` module in iOS and Android was removed in Release 3.2.0.
For all other platforms, continue to use this module.
* @param {Dictionary<Titanium.Map.View>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Map.View} except those marked not-creation or read-only.</p>
* @returns {Titanium.Map.View}
*/
/**
* @property ANNOTATION_DRAG_STATE_NONE
* @type Number
* @readonly
* <p>Used in the {@link Titanium.Map.View#event-pinchangedragstate pinchangedragstate} event
to indicate that the annotation is not being dragged.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property ANNOTATION_DRAG_STATE_START
* @type Number
* @readonly
* <p>Used in the {@link Titanium.Map.View#event-pinchangedragstate pinchangedragstate} event
to indicate that the user started dragging the annotation.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property ANNOTATION_DRAG_STATE_DRAG
* @type Number
* @readonly
* <p>Used in the {@link Titanium.Map.View#event-pinchangedragstate pinchangedragstate} event
to indicate that the user moved the annotation.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property ANNOTATION_DRAG_STATE_CANCEL
* @type Number
* @readonly
* <p>Used in the {@link Titanium.Map.View#event-pinchangedragstate pinchangedragstate} event
to indicate that the user canceled the drag action.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property ANNOTATION_DRAG_STATE_END
* @type Number
* @readonly
* <p>Used in the {@link Titanium.Map.View#event-pinchangedragstate pinchangedragstate} event
to indicate that the user finished moving the annotation.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property ANNOTATION_GREEN
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to green via the
{@link Titanium.Map.Annotation#property-pincolor} property.</p>
*/
/**
* @property ANNOTATION_PURPLE
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to purple via the
{@link Titanium.Map.Annotation#property-pincolor} property.</p>
*/
/**
* @property ANNOTATION_RED
* @type Number
* @readonly
* <p>Color constant used to set a map annotation to red via the
{@link Titanium.Map.Annotation#property-pincolor} property.</p>
*/
/**
* @property HYBRID_TYPE
* @type Number
* @readonly
* <p>Used with {@link Titanium.Map.View#property-mapType mapType} to display a satellite image of the area with road and road name information layered on top.</p>
* @description <p>On Android, <code>HYBRID_TYPE</code> produces a road map that looks like
{@link Titanium.Map#property-STANDARD_TYPE STANDARD_TYPE}, and does not include a satellite
image. This is a known issue
(<a href="https://jira.appcelerator.org/browse/TIMOB-9673">TIMOB-9673</a>).</p>
<p>Use {@link Titanium.Map#property-SATELLITE_TYPE SATELLITE_TYPE} to specify a hybrid-type map on
Android.</p>
*/
/**
* @property SATELLITE_TYPE
* @type Number
* @readonly
* <p>Used with {@link Titanium.Map.View#property-mapType mapType} to display satellite imagery of the area.</p>
* @description <p>The Android Google Maps API does not support displaying satellite imagery
<em>without</em> roads and names, so specifying <code>SATELLITE_TYPE</code> on Android produces
the same results as {@link Titanium.Map#property-HYBRID_TYPE HYBRID_TYPE} on other platforms.</p>
*/
/**
* @property STANDARD_TYPE
* @type Number
* @readonly
* <p>Used with {@link Titanium.Map.View#property-mapType mapType} to display a street map that shows the position of all roads and some road names.</p>
*/
/**
* @property TERRAIN_TYPE
* @type Number
* @readonly
* <p>Used with {@link Titanium.Map.View#property-mapType mapType} to display the terrain that shows the position of all roads and some road names.</p>
* @platform mobileweb 1.8
*/
/**
* @class Titanium.Map.View
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Map/View.yml
* <p>Map view is used for embedding native mapping capabilities as a view in your application.</p>
* @deprecated 3.2.0 For new iOS and Android applications use the <a href="#!/api/Modules.Map">ti.map add-on module</a>.
Support for the `Titanium.Map` module in iOS and Android was removed in Release 3.2.0.
For all other platforms, continue to use this module.
* @description <p>With native maps, you can control the mapping location, the type of map, the zoom level
and you can add custom annotations directly to the map. Once the map view is
displayed, the user can pan and zoom the map using the native control gestures.</p>
<p>Use the {@link Titanium.Map#method-createView} method to create a map view.</p>
<p>All latitude and longitude values are specified in decimal degrees. Values in degrees,
minutes and seconds (DMS) must be converted to decimal degrees before being passed to
the map view.</p>
<p>You can add {@link Titanium.Map.Annotation Annotation} objects to the map to mark points of
interest. An annotation has two states: selected and deselected. A deselected annotation
is marked by a pin image. When selected, the full annotation is displayed, typically
including a title, an optional subtitle, and one or more images.</p>
<h4>Android Platform Notes</h4>
<p>On Android, this module requires a Google Maps API v1 key. As of March 3, 2013,
Google is no longer issuing Maps API v1 keys. If you want to add native maps support
to your Android application, you need to use the {@link Modules.Map ti.map add-on module}.</p>
<p>Android supports only a <strong>single</strong> map view per application. This limitation is
imposed by Android, not by Titanium. Attempting to add a second map view results in
an exception being thrown.</p>
<p>If you have a Maps API v1 key, edit your <code>tiapp.xml</code> file and add your new key as the
value for the <code>ti.android.google.map.api.key.production</code> property.</p>
<p>A development API key is included in the default <code>tiapp.xml</code> file. You can use this
key for development and testing as long as you are building your application with the
default Titanium development keystore.</p>
<h4>iOS Platform Notes</h4>
<p>Since Release 3.2.0, use the {@link Modules.Map ti.map add-on module}. Support for this module was
removed.</p>
<p>On iOS, you cannot call any methods on a map view until it has been added to a view.</p>
<p>In addition to annotations, iOS supports adding routes to a map view, using
{@link Titanium.Map.View#method-addRoute addRoute}.</p>
<h4>Mobile Web Platform Notes</h4>
<p>For Mobile Web, the default map provider is Google. Google Maps does not require you to obtain an API key,
however it is encouraged that you use an API key so that you can monitor your Maps API usage. You can sign
up for the Maps API key on the Google Code web site:</p>
<ul>
<li><a href="https://developers.google.com/maps/signup">developers.google.com/maps/signup</a></li>
</ul>
<p>If you get a Maps API key, edit your <code>tiapp.xml</code> file and add your new key as the
value for the <code><mobileweb><map><apikey></code> tag.</p>
<pre><code><mobileweb>
<map>
<apikey>[key goes here]</apikey>
</map>
</mobileweb>
</code></pre>
*/
/**
* @event longclick
* @hide
* <p>Fired when the device detects a long click.</p>
* @description <p>A long click is generated by touching and holding on the touchscreen or holding down the
trackball button. </p>
<p>The event occurs before the finger/button is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>As the trackball can fire this event, it is not intended to return the <code>x</code> and <code>y</code>
coordinates of the touch, even when it is generated by the touchscreen. </p>
<p>A <code>longclick</code> blocks a <code>click</code>, meaning that a <code>click</code> event will not fire when a
<code>longclick</code> listener exists.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event click
* <p>Fired when the user selects, deselects, or clicks on an annotation.</p>
* @description <p>Note that the <code>click</code> event is not fired every time the user clicks on the map.
It is fired in two circumstances:</p>
<ul>
<li>If the user clicks on an annotation.</li>
<li>The user deselects an annotation.</li>
</ul>
<p>On iOS, the user deselects an annotation by clicking in the map view outside of
the annotation. On Android, if {@link Titanium.Map.View#property-hideAnnotationWhenTouchMap hideAnnotationWhenTouchMap}
is set to true, the user deselects an annotation by clicking in the map view outside of
the annotation. Otherwise, the user deselects an annotation by clicking on the
annotation pin.</p>
<p>The <code>click</code> event includes a value, <code>clicksource</code>, which describes the part of the
annotation that was clicked. Note that the possible values for <code>clicksource</code> differ between
platforms.</p>
<p>On iOS, if the user clicks on the pin or annotation, the <code>clicksource</code> is one of:
<code>pin</code>, <code>annotation</code>, <code>leftButton</code>, <code>rightButton</code>, <code>leftView</code>, <code>rightView</code>,
<code>title</code>, or <code>subtitle</code>. If the user deselects the annotation by clicking elsewhere
in the map view, <code>clicksource</code> is <code>null</code>.</p>
<p>On Android, the <code>clicksource</code> can be one of <code>pin</code>, <code>title</code>,
<code>subtitle</code>, <code>leftPane</code>, or <code>rightPane</code>. If the user deselects an
annotation by clicking on the pin, <code>clicksource</code> is <code>pin</code>. If the user deselects the
annotation by clicking elsewhere in the map view, <code>clicksource</code> is <code>null</code>.</p>
* @param {Number} (iphone ipad mobileweb) index
<p>the annotation index.</p>
* @param {String} title
<p>Title of the annotation.</p>
* @param {String} (android mobileweb) subtitle
<p>Subtitle of the annotation.</p>
* @param {Titanium.Map.View} (iphone ipad mobileweb) map
<p>The map view instance.</p>
* @param {String} clicksource
<p>Source of the click event, such as <code>pin</code>, or <code>leftButton</code>.</p>
* @param {Titanium.Map.Annotation} annotation
<p>Annotation source object.</p>
* @param {Number} (android mobileweb) latitude
<p>Latitude of the clicked annotation.</p>
* @param {Number} (android mobileweb) longitude
<p>Longitude of the clicked annotation.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event longpress
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.1.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event focus
* @hide
* <p>Fired when the view element gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event complete
* <p>Fired when the map completes loading.</p>
* @param {Boolean} success
<p>Indicates a successful operation. Returns <code>true</code>.</p>
* @param {String} error
<p>Error message, if any returned. Will be undefined.</p>
* @param {Number} code
<p>Error code. Error code will be 0.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event error
* <p>Fired when the map receives a mapping error.</p>
* @param {Boolean} success
<p>Indicates a successful operation. Returns <code>false</code>.</p>
* @param {String} error
<p>Error message, if any returned. May be undefined.</p>
* @param {Number} code
<p>Error code.
If the error was generated by the operating system, that system's error value
is used. Otherwise, this value will be -1.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event loading
* <p>Fired when the map begins loading.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event pinchangedragstate
* <p>Fired when the user interacts with a draggable annotation.</p>
* @param {Titanium.Map.Annotation} annotation
<p>Annotation being dragged.</p>
* @param {Titanium.Map.View} map
<p>This map view.</p>
* @param {String} title
<p>Annotation title.</p>
* @param {Number} index
<p>Index of the annotation.</p>
* @param {Number} newState
<p>New drag state for the annotation, one of
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_NONE ANNOTATION_DRAG_STATE_NONE},
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_START ANNOTATION_DRAG_STATE_START},
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_DRAG ANNOTATION_DRAG_STATE_DRAG},
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_CANCEL ANNOTATION_DRAG_STATE_CANCEL} or
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_END ANNOTATION_DRAG_STATE_END}.</p>
* @param {Number} oldState
<p>Previous drag state for the annotation, one of
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_NONE ANNOTATION_DRAG_STATE_NONE},
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_START ANNOTATION_DRAG_STATE_START},
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_DRAG ANNOTATION_DRAG_STATE_DRAG},
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_CANCEL ANNOTATION_DRAG_STATE_CANCEL} or
{@link Titanium.Map#property-ANNOTATION_DRAG_STATE_END ANNOTATION_DRAG_STATE_END}.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @event regionChanged
* <p>Fired when the mapping region changes.</p>
* @deprecated 3.0.0 Please use <Titanium.Map.View.regionchanged> instead.
* @param {Number} longitude
<p>Longitude value for the center point of the map, in decimal degrees.</p>
* @param {Number} latitudeDelta
<p>The amount of north-to-south distance displayed on the map, measured in decimal degrees.</p>
* @param {Number} longitudeDelta
<p>The amount of east-to-west distance displayed on the map, measured in decimal degrees.</p>
* @param {Number} latitude
<p>Latitude value for the center point of the map, in decimal degrees.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event regionchanged
* <p>Fired when the mapping region changes.</p>
* @param {Number} longitude
<p>Longitude value for the center point of the map, in decimal degrees.</p>
* @param {Number} latitudeDelta
<p>The amount of north-to-south distance displayed on the map, measured in decimal degrees.</p>
* @param {Number} longitudeDelta
<p>The amount of east-to-west distance displayed on the map, measured in decimal degrees.</p>
* @param {Number} latitude
<p>Latitude value for the center point of the map, in decimal degrees.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
*/
/**
* @method addAnnotation
* <p>Adds a new annotation to the map.</p>
* @param {Dictionary<Titanium.Map.Annotation>/Titanium.Map.Annotation} annotation
<p>Either a dictionary of properties for the annotation or a {@link Titanium.Map.Annotation} instance.</p>
*/
/**
* @method addAnnotations
* <p>Adds one or more new annotations to the map.</p>
* @param {Array<Titanium.Map.Annotation>/Array<Dictionary<Titanium.Map.Annotation>>} annotations
<p>Array of {@link Titanium.Map.Annotation Annotation} objects, or an array of
dictionaries describing of properties for the annotation.</p>
*/
/**
* @method addRoute
* <p>Adds a route to the map.</p>
* @param {MapRouteType} route
<p>Simple dictionary object describing the route.</p>
* @platform android 2.1.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method deselectAnnotation
* <p>Deselects the specified annotation, so the main annotation is hidden and only
a pin image is shown.</p>
* @param {String/Titanium.Map.Annotation} annotation
<p>Annotation to deselect, identified by an annotation title or a {@link Titanium.Map.Annotation} reference.</p>
*/
/**
* @method removeAllAnnotations
* <p>Removes all annotations from the map.</p>
*/
/**
* @method removeAnnotation
* <p>Removes an existing annotation from the map.</p>
* @param {String/Titanium.Map.Annotation} annotation
<p>Annotation to remove, identified by an annotation title or a {@link Titanium.Map.Annotation} reference.</p>
*/
/**
* @method removeAnnotations
* <p>Removes one or more existing annotations from the map.</p>
* @description <p>Annotations can be identified by title or by a {@link Titanium.Map.Annotation}
reference.</p>
* @param {Array<String>/Array<Titanium.Map.Annotation>} annotations
<p>Array of annotations to remove.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method removeRoute
* <p>Remove a previously added route.</p>
* @param {MapRouteType} route
<p>Same route object passed to {@link Titanium.Map.View#method-addRoute addRoute}.</p>
* @platform android 2.1.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method selectAnnotation
* <p>Selects the annoation, showing the full annotation.</p>
* @param {String/Titanium.Map.Annotation} annotation
<p>Annotation to show, identified by an annotation title or a {@link Titanium.Map.Annotation} reference.</p>
*/
/**
* @method setLocation
* <p>Sets the map location and zoom level.</p>
* @description <p>Location is set using a simple dictionary object, described in {@link MapLocationType}.
For example:</p>
<pre><code> myMapView.setLocation({
latitude:37.337681, longitude:-122.038193, animate:true,
latitudeDelta:0.04, longitudeDelta:0.04});
</code></pre>
* @param {MapLocationType} location
<p>Dictionary specifying the location and the zoom level for the map.</p>
*/
/**
* @method setMapType
* <p>Sets the type of map (satellite, hybrid, or standard).</p>
* @param {Number} mapType
<p>Map type constant, either {@link Titanium.Map#property-STANDARD_TYPE}, {@link Titanium.Map#property-SATELLITE_TYPE} or
{@link Titanium.Map#property-HYBRID_TYPE}.</p>
*/
/**
* @method zoom
* <p>Zooms in or out of the map.</p>
* @description <p>Zooms in or out by specifying a relative zoom level. A positive value increases
the current zoom level and a negative value decreases the zoom level.</p>
<p>Each increase in zoom level increases the magnification by a factor of two.</p>
* @param {Number} level
<p>Relative zoom level (positive to zoom in, negative to zoom out).</p>
*/
/**
* @method getAnimate
* <p>Gets the value of the {@link Titanium.Map.View#property-animate} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setAnimate
* <p>Sets the value of the {@link Titanium.Map.View#property-animate} property.</p>
* @param {Boolean} animate
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getAnimated
* <p>Gets the value of the {@link Titanium.Map.View#property-animated} property.</p>
* @returns {Boolean}
* @platform mobileweb 1.8
*/
/**
* @method setAnimated
* <p>Sets the value of the {@link Titanium.Map.View#property-animated} property.</p>
* @param {Boolean} animated
<p>New value for the property.</p>
* @platform mobileweb 1.8
*/
/**
* @method getAnnotations
* <p>Gets the value of the {@link Titanium.Map.View#property-annotations} property.</p>
* @returns {Titanium.Map.Annotation[]}
*/
/**
* @method setAnnotations
* <p>Sets the value of the {@link Titanium.Map.View#property-annotations} property.</p>
* @param {Array<Titanium.Map.Annotation>} annotations
<p>New value for the property.</p>
*/
/**
* @method getHideAnnotationWhenTouchMap
* <p>Gets the value of the {@link Titanium.Map.View#property-hideAnnotationWhenTouchMap} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
*/
/**
* @method setHideAnnotationWhenTouchMap
* <p>Sets the value of the {@link Titanium.Map.View#property-hideAnnotationWhenTouchMap} property.</p>
* @param {Boolean} hideAnnotationWhenTouchMap
<p>New value for the property.</p>
* @platform android 3.0.0
*/
/**
* @method getMapType
* <p>Gets the value of the {@link Titanium.Map.View#property-mapType} property.</p>
* @returns {Number}
*/
/**
* @method setMapType
* <p>Sets the value of the {@link Titanium.Map.View#property-mapType} property.</p>
* @param {Number} mapType
<p>New value for the property.</p>
*/
/**
* @method getRegion
* <p>Gets the value of the {@link Titanium.Map.View#property-region} property.</p>
* @returns {MapRegionType}
*/
/**
* @method setRegion
* <p>Sets the value of the {@link Titanium.Map.View#property-region} property.</p>
* @param {MapRegionType} region
<p>New value for the property.</p>
*/
/**
* @method getRegionFit
* <p>Gets the value of the {@link Titanium.Map.View#property-regionFit} property.</p>
* @returns {Boolean}
*/
/**
* @method setRegionFit
* <p>Sets the value of the {@link Titanium.Map.View#property-regionFit} property.</p>
* @param {Boolean} regionFit
<p>New value for the property.</p>
*/
/**
* @method getUserLocation
* <p>Gets the value of the {@link Titanium.Map.View#property-userLocation} property.</p>
* @returns {Boolean}
*/
/**
* @method setUserLocation
* <p>Sets the value of the {@link Titanium.Map.View#property-userLocation} property.</p>
* @param {Boolean} userLocation
<p>New value for the property.</p>
*/
/**
* @method getLatitudeDelta
* <p>Gets the value of the {@link Titanium.Map.View#property-latitudeDelta} property.</p>
* @returns {Number}
* @platform android 3.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @method getLongitudeDelta
* <p>Gets the value of the {@link Titanium.Map.View#property-longitudeDelta} property.</p>
* @returns {Number}
* @platform android 3.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @property animate
* @type Boolean
* <p>Indicates if changes to the mapping region should be animated.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property animated
* @type Boolean
* <p>Indicates if changes to the mapping region should be animated.</p>
* @platform mobileweb 1.8
*/
/**
* @property annotations
* @type Titanium.Map.Annotation[]
* <p>An array of annotations to add to the map.</p>
* @description <p>There is no guarantee that the order of elements in the <code>annotations</code> property will be
maintained when creating, adding or deleting annotations from the Ti.Map.View object.
If the application depends on the annotations being in a set order, it should keep
references to all of the annotations in a separate array.</p>
*/
/**
* @property [hideAnnotationWhenTouchMap=false]
* @type Boolean
* <p>Hide the annotation when clicking in the map view outside of the annotation.</p>
* @description <p>If 'false', the user deselects an annotation by clicking on the annotation pin.
If 'true', the user deselects an annotation by clicking in the map view outside of the annotation.</p>
* @platform android 3.0.0
*/
/**
* @property mapType
* @type Number
* <p>Map type, either: {@link Titanium.Map#property-STANDARD_TYPE}, {@link Titanium.Map#property-SATELLITE_TYPE} or {@link Titanium.Map#property-HYBRID_TYPE}.</p>
*/
/**
* @property region
* @type MapRegionType
* <p>A dictionary specifying the location and zoom level of the map.</p>
<p>On the iOS platform, this property can only be set after the map view is loaded.
To ensure this property is set when the application starts, wait for the
[complete][Titanium.UI.Map-event-complete] event.</p>
*/
/**
* @property regionFit
* @type Boolean
* <p>Boolean indicating if the map region should be modified
to fit the map view's aspect ratio.</p>
* @description <p>If <code>true</code>, the specified region is modified to fit the aspect ratio of the
map view, while remaining centered on the same point.</p>
*/
/**
* @property userLocation
* @type Boolean
* <p>Boolean indicating if the user's current device location should be shown on the
map.</p>
* @description <p>If <code>true</code>, the user's location is marked with a pin. </p>
*/
/**
* @property latitudeDelta
* @type Number
* @readonly
* <p>The amount of north-to-south distance displayed on the map, measured in decimal degrees.</p>
* @platform android 3.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @property longitudeDelta
* @type Number
* @readonly
* <p>The amount of east-to-west distance displayed on the map, measured in decimal degrees.</p>
* @platform android 3.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @class MapRegionType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Map/View.yml
* <p>Simple object representing a map location and zoom level.</p>
*/
/**
* @property longitude
* @type Number
* <p>Longitude value for the center point of the map, in decimal degrees.</p>
*/
/**
* @property latitude
* @type Number
* <p>Latitude value for the center point of the map, in decimal degrees.</p>
*/
/**
* @property longitudeDelta
* @type Number
* <p>The amount of east-to-west distance displayed on the map, measured in decimal degrees.</p>
*/
/**
* @property latitudeDelta
* @type Number
* <p>The amount of north-to-south distance displayed on the map, measured in decimal degrees.</p>
*/
/**
* @class MapLocationType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Map/View.yml
* <p>Simple object used as an argument to {@link Titanium.Map.View#method-setLocation setLocation}.</p>
*/
/**
* @property longitude
* @type Number
* <p>Longitude value for the center point of the map, in decimal degrees.</p>
*/
/**
* @property latitude
* @type Number
* <p>Latitude value for the center point of the map, in decimal degrees.</p>
*/
/**
* @property longitudeDelta
* @type Number
* <p>The amount of east-to-west distance displayed on the map, measured in decimal degrees.</p>
*/
/**
* @property latitudeDelta
* @type Number
* <p>The amount of north-to-south distance displayed on the map, measured in decimal degrees.</p>
*/
/**
* @property animate
* @type Boolean
* <p>Set to <code>true</code> to animate the move to the new location.</p>
*/
/**
* @property regionFit
* @type Boolean
* <p>If <code>true</code>, the specified region is modified to fit the aspect ratio of the
map view, while remaining centered on <code>latitude</code>,<code>longitude</code>.</p>
*/
/**
* @class MapRouteType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Map/View.yml
* <p>Simple object defining a map route.</p>
*/
/**
* @property name
* @type String
* <p>Route name.</p>
*/
/**
* @property points
* @type MapPointType[]
* <p>Array of map points making up the route.</p>
*/
/**
* @property color
* @type String
* <p>Color to use when drawing the route, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property width
* @type Number
* <p>Line width to use when drawing the route.</p>
*/
/**
* @class MapPointType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Map/View.yml
* <p>Simple object representing a point on the map.</p>
*/
/**
* @property longitude
* @type Number
* <p>Longitude value of the map point, in decimal degrees.</p>
*/
/**
* @property latitude
* @type Number
* <p>Latitude value of the map point, in decimal degrees.</p>
*/
/**
* @class Titanium.Media.Android
* @platform android 1.7.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Android/Android.yml
* <p>Android-specific media-related functionality.</p>
*/
/**
* @method scanMediaFiles
* <p>Scans newly created or downloaded media files to make them available to other
Android media providers, such as the Gallery.</p>
* @description <p>Android scans media files for inclusion in the Gallery and other media providers.
Use this method to force an immediate scan of particular files, such as
newly-created or downloaded resources.</p>
<p>See <a href="http://developer.android.com/reference/android/media/MediaScannerConnection.html">MediaScannerConnection in the Android API Reference</a>.</p>
* @param {Array<String>} paths
<p>Array of paths to the files you want to scan.</p>
* @param {Array<String>} mimeTypes
<p>Array of MIME types for the files in the paths parameter. If <code>null</code>, MIME type will
be inferred from the file names.</p>
* @param {Callback<MediaScannerResponse>} callback
<p>Function to call when each file is done being scanned. </p>
*/
/**
* @method setSystemWallpaper
* <p>Set the system homescreen wallpaper.</p>
* @description <p>The image to use as the wallpaper must be passed as a {@link Titanium.Blob}. You can
create a <code>Blob</code> from an image file by calling {@link Titanium.Filesystem.File#method-read File.read}.
You can also use the {@link Titanium.Media#method-openPhotoGallery}
or {@link Titanium.Media#method-showCamera} methods to allow users to select an existing photo
or take a new one.</p>
* @param {Titanium.Blob} image
<p>Image to use as the wallpaper, as a <code>Blob</code> object.</p>
* @param {Boolean} scale
<p>If <code>true</code>, the image is scaled to fit the width of the system wallpaper. If
<code>false</code>, the image is not scaled.</p>
*/
/**
* @class MediaScannerResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Android/Android.yml
* <p>Simple object passed to the {@link Titanium.Media.Android#method-scanMediaFiles scanMediaFiles} callback.</p>
* @description <p>The callback is called once per scanned file.</p>
*/
/**
* @property path
* @type String
* <p>Path to the media file that was scanned.</p>
*/
/**
* @property uri
* @type String
* <p>URI to the file if it was scanned and added to the media library, or <code>null</code>
if the file was not added.</p>
*/
/**
* @class Titanium.Media.AudioPlayer
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/AudioPlayer.yml
* <p>An audio player object used for streaming audio to the device, and low-level control of the audio playback.</p>
* @description <p>On Android, when you are done playing a given audio file, you must call the
{@link Titanium.Media.AudioPlayer#method-release release} method to stop buffering audio data and
release associated system resources.</p>
<p>On iOS, you can control how the audio stream interacts with other system sounds
by setting {@link Titanium.Media#property-audioSessionMode}.</p>
<p>Use the {@link Titanium.Media#method-createAudioPlayer} method to create an audio player.</p>
* <h3>Examples</h3>
<h4>Audio Streaming</h4>
<p>The following example demonstrates using the <code>AudioPlayer</code> object to stream audio.</p>
<pre><code>var win = Titanium.UI.createWindow({
title:'Audio Test',
backgroundColor:'#fff',
layout: 'vertical'
});
var startStopButton = Titanium.UI.createButton({
title:'Start/Stop Streaming',
top:10,
width:200,
height:40
});
var pauseResumeButton = Titanium.UI.createButton({
title:'Pause/Resume Streaming',
top:10,
width:200,
height:40,
enabled:false
});
win.add(startStopButton);
win.add(pauseResumeButton);
// allowBackground: true on Android allows the
// player to keep playing when the app is in the
// background.
var audioPlayer = Ti.Media.createAudioPlayer({
url: 'www.example.com/podcast.mp3',
allowBackground: true
});
startStopButton.addEventListener('click',function() {
// When paused, playing returns false.
// If both are false, playback is stopped.
if (audioPlayer.playing || audioPlayer.paused)
{
audioPlayer.stop();
pauseResumeButton.enabled = false;
if (Ti.Platform.name === 'android')
{
audioPlayer.release();
}
}
else
{
audioPlayer.start();
pauseResumeButton.enabled = true;
}
});
pauseResumeButton.addEventListener('click', function() {
if (audioPlayer.paused) {
audioPlayer.start();
}
else {
audioPlayer.pause();
}
});
audioPlayer.addEventListener('progress',function(e) {
Ti.API.info('Time Played: ' + Math.round(e.progress) + ' milliseconds');
});
audioPlayer.addEventListener('change',function(e)
{
Ti.API.info('State: ' + e.description + ' (' + e.state + ')');
});
win.addEventListener('close',function() {
audioPlayer.stop();
if (Ti.Platform.osname === 'android')
{
audioPlayer.release();
}
});
win.open();
</code></pre>
*/
/**
* @event change
* <p>Fired when the state of the playback changes.</p>
* @description <p>This event can be generated by programmatic events, such as pausing or stopping the audio,
and also by external events, such as the current state of network buffering.</p>
* @param {Number} state
<p>Current state of playback.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media.AudioPlayer#property-STATE_BUFFERING}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_INITIALIZED}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_PAUSED}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_PLAYING}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_STARTING}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_STOPPED}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_STOPPING}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_WAITING_FOR_DATA}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_WAITING_FOR_QUEUE}
</ul></p>
* @param {String} description
<p>Text description of the state of playback.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event complete
* <p>Fired when the audio has finished playing.</p>
* @param {Boolean} success
<p>Indicates if the sound was played successfully.
Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
* @param {String} error
<p>Error message, if any returned. Will be undefined if <code>success</code> is <code>true</code>.</p>
* @param {Number} code
<p>Error code.
Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event error
* <p>Fired when there's an error.</p>
* @param {String} error
<p>Error message.</p>
* @param {Number} code
<p>Error code. Different between android and iOS.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @event progress
* <p>Fired once per second with the current progress during playback.</p>
* @param {String} progress
<p>Current progress, in milliseconds.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method release
* <p>Stops buffering audio data and releases audio resources.</p>
* @description <p>On Android, this method should be called when you are done streaming a given
audio object, to release underlying resources, including buffered data.</p>
* @platform android 0.9
*/
/**
* @method getAudioSessionId
* <p>Returns the audio session id.</p>
* @returns {Number}
* @platform android 5.4.0
*/
/**
* @method stateDescription
* <p>Converts a {@link Titanium.Media.AudioPlayer#property-state state} value into a text description
suitable for display.</p>
* @param {Number} state
<p>State value to convert.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method isPaused
* <p>Returns the value of the {@link Titanium.Media.AudioPlayer#property-paused paused} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method isPlaying
* <p>Returns the value of the {@link Titanium.Media.AudioPlayer#property-playing playing} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method pause
* <p>Pauses audio playback.</p>
* @description <p>On iOS, the <code>pause</code> call operates as a toggle. If the stream is already paused,
calling <code>pause</code> again resumes playing the stream.</p>
<p>On Android, the <code>pause</code> call does nothing if the stream is already paused.</p>
<p>On both platforms, calling {@link Titanium.Media.AudioPlayer#method-start start} on a paused
stream resumes play.</p>
*/
/**
* @method play
* <p>Starts or resumes audio playback.</p>
* @description <p>This method is identical to {@link Titanium.Media.AudioPlayer#method-start start}.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method start
* <p>Starts or resumes audio playback.</p>
*/
/**
* @method stop
* <p>Stops audio playback.</p>
*/
/**
* @method getPaused
* <p>Returns the value of the {@link Titanium.Media.AudioPlayer#property-paused paused} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setPaused
* <p>Sets the value of the {@link Titanium.Media.AudioPlayer#property-paused paused} property.</p>
* @description <p>On iOS, this method can be used to pause and unpause playback. For portability,
it is preferable to use the {@link Titanium.Media.AudioPlayer#method-pause pause} and
{@link Titanium.Media.AudioPlayer#method-start start} methods instead.</p>
* @param {Boolean} paused
<p>Pass <code>true</code> to pause the current playback temporarily, <code>false</code> to unpause it.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getPlaying
* <p>Returns the value of the {@link Titanium.Media.AudioPlayer#property-playing playing} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getAllowBackground
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-allowBackground} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setAllowBackground
* <p>Sets the value of the {@link Titanium.Media.AudioPlayer#property-allowBackground} property.</p>
* @param {Boolean} allowBackground
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getAutoplay
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-autoplay} property.</p>
* @returns {Boolean}
* @platform windowsphone 4.1.0
*/
/**
* @method setAutoplay
* <p>Sets the value of the {@link Titanium.Media.AudioPlayer#property-autoplay} property.</p>
* @param {Boolean} autoplay
<p>New value for the property.</p>
* @platform windowsphone 4.1.0
*/
/**
* @method getBitRate
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-bitRate} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBitRate
* <p>Sets the value of the {@link Titanium.Media.AudioPlayer#property-bitRate} property.</p>
* @param {Number} bitRate
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getDuration
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-duration} property.</p>
* @returns {Number}
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @method getIdle
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-idle} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getPaused
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-paused} property.</p>
* @returns {Boolean}
*/
/**
* @method setPaused
* <p>Sets the value of the {@link Titanium.Media.AudioPlayer#property-paused} property.</p>
* @param {Boolean} paused
<p>New value for the property.</p>
*/
/**
* @method getPlaying
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-playing} property.</p>
* @returns {Boolean}
*/
/**
* @method getProgress
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-progress} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getState
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-state} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-url} property.</p>
* @returns {String}
*/
/**
* @method setUrl
* <p>Sets the value of the {@link Titanium.Media.AudioPlayer#property-url} property.</p>
* @param {String} url
<p>New value for the property.</p>
*/
/**
* @method getVolume
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-volume} property.</p>
* @returns {Number}
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method setVolume
* <p>Sets the value of the {@link Titanium.Media.AudioPlayer#property-volume} property.</p>
* @param {Number} volume
<p>New value for the property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method getWaiting
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-waiting} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBufferSize
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-bufferSize} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBufferSize
* <p>Sets the value of the {@link Titanium.Media.AudioPlayer#property-bufferSize} property.</p>
* @param {Number} bufferSize
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getTime
* <p>Gets the value of the {@link Titanium.Media.AudioPlayer#property-time} property.</p>
* @returns {Number}
* @platform android 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @method setTime
* <p>Sets the value of the {@link Titanium.Media.AudioPlayer#property-time} property.</p>
* @param {Number} time
<p>New value for the property.</p>
* @platform android 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @property STATE_BUFFERING
* @type Number
* @readonly
* <p>Audio data is being buffered from the network.</p>
*/
/**
* @property STATE_INITIALIZED
* @type Number
* @readonly
* <p>Audio playback is being initialized.</p>
*/
/**
* @property STATE_PAUSED
* @type Number
* @readonly
* <p>Playback is paused.</p>
*/
/**
* @property STATE_PLAYING
* @type Number
* @readonly
* <p>Audio playback is active.</p>
*/
/**
* @property STATE_STARTING
* @type Number
* @readonly
* <p>Audio playback is starting.</p>
*/
/**
* @property STATE_STOPPED
* @type Number
* @readonly
* <p>Audio playback is stopped.</p>
*/
/**
* @property STATE_STOPPING
* @type Number
* @readonly
* <p>Audio playback is stopping.</p>
*/
/**
* @property STATE_WAITING_FOR_DATA
* @type Number
* @readonly
* <p>Player is waiting for audio data from the network.</p>
*/
/**
* @property STATE_WAITING_FOR_QUEUE
* @type Number
* @readonly
* <p>Player is waiting for audio data to fill the queue.</p>
*/
/**
* @property [allowBackground=false]
* @type Boolean
* @creationOnly
* <p>Boolean to indicate if audio should continue playing even if the associated
Android {@link Titanium.Android.Activity Activity} is paused.</p>
* @description <p>Setting <code>allowBackground</code> to <code>true</code> allows the audio to continue playing, for
example, if the application is in the background.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property autoplay
* @type Boolean
* <p>Indicates if the audio should automatically start playback.</p>
* @platform windowsphone 4.1.0
*/
/**
* @property bitRate
* @type Number
* <p>Bit rate of the current playback stream.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property duration
* @type Number
* @readonly
* <p>Estimated duration in milliseconds of the file being played.</p>
* @description <p>May return <code>0</code> when playing a live stream.</p>
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @property idle
* @type Boolean
* @readonly
* <p>Boolean indicating if the player is idle.</p>
* @description <p><code>true</code> if the player is in the initialized state: that is, not playing, paused,
or waiting for data.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property paused
* @type Boolean
* <p>Boolean indicating if audio playback is paused.</p>
*/
/**
* @property playing
* @type Boolean
* @readonly
* <p>Boolean indicating if audio is currently playing.</p>
* @description <p>Returns <code>false</code> if playback is stopped or paused.</p>
*/
/**
* @property progress
* @type Number
* @readonly
* <p>Current playback progress, in milliseconds.</p>
* @description <p>Returns zero if <code>bitRate</code> has not yet been detected.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property state
* @type Number
* @readonly
* <p>Current state of playback, specified using one of the <code>STATE</code> constants defined on this object.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media.AudioPlayer#property-STATE_BUFFERING}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_INITIALIZED}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_PAUSED}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_PLAYING}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_STARTING}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_STOPPED}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_STOPPING}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_WAITING_FOR_DATA}
<li> {@link Titanium.Media.AudioPlayer#property-STATE_WAITING_FOR_QUEUE}
</ul></p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property url
* @type String
* <p>URL for the audio stream.</p>
*/
/**
* @property volume
* @type Number
* <p>Volume of the audio, from 0.0 (muted) to 1.0 (loudest).</p>
* @description <p>This setting controls the volume of the sound relative to the overall
volume setting for the device.</p>
<p>On iOS, to adjust the volume of the device, set the <code>volume</code> property of
{@link Titanium.Media#property-appMusicPlayer} and set the {@link Titanium.Media#property-audioSessionMode} property
to either {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_AMBIENT},
{@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_SOLO_AMBIENT},
or {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_PLAYBACK}.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform windowsphone 4.1.0
*/
/**
* @property waiting
* @type Boolean
* @readonly
* <p>Boolean indicating if the playback is waiting for audio data from the network.</p>
* @description <p>This property is <code>true</code> if the player is in any of the waiting states, including
buffering, starting, waiting for data, and waiting for queue.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property bufferSize
* @type Number
* <p>Size of the buffer used for streaming, in bytes.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property time
* @type Number
* <p>Current playback position of the audio.</p>
* @description <p>Time is reported in milliseconds.</p>
* @platform android 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.Media.AudioRecorder
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/AudioRecorder.yml
* <p>An audio recorder object used for recording audio from the device microphone.</p>
* @description <p>Use the {@link Titanium.Media#method-createAudioRecorder} method to create an audio recorder. </p>
*/
/**
* @method pause
* <p>Pauses the current audio recording.</p>
*/
/**
* @method resume
* <p>Resumes a paused recording.</p>
*/
/**
* @method start
* <p>Starts an audio recording.</p>
*/
/**
* @method stop
* <p>Stops the current audio recording and returns the recorded audio file.</p>
* @returns {Titanium.Filesystem.File}
*/
/**
* @method getCompression
* <p>Gets the value of the {@link Titanium.Media.AudioRecorder#property-compression} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setCompression
* <p>Sets the value of the {@link Titanium.Media.AudioRecorder#property-compression} property.</p>
* @param {Number} compression
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getFormat
* <p>Gets the value of the {@link Titanium.Media.AudioRecorder#property-format} property.</p>
* @returns {Number}
*/
/**
* @method setFormat
* <p>Sets the value of the {@link Titanium.Media.AudioRecorder#property-format} property.</p>
* @param {Number} format
<p>New value for the property.</p>
*/
/**
* @method getPaused
* <p>Gets the value of the {@link Titanium.Media.AudioRecorder#property-paused} property.</p>
* @returns {Boolean}
*/
/**
* @method getRecording
* <p>Gets the value of the {@link Titanium.Media.AudioRecorder#property-recording} property.</p>
* @returns {Boolean}
*/
/**
* @method getStopped
* <p>Gets the value of the {@link Titanium.Media.AudioRecorder#property-stopped} property.</p>
* @returns {Boolean}
*/
/**
* @property [compression={@link Titanium.Media#property-AUDIO_FORMAT_LINEAR_PCM}]
* @type Number
* <p>Audio compression to be used for the recording.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-AUDIO_FORMAT_AAC}
<li> {@link Titanium.Media#property-AUDIO_FORMAT_ALAW}
<li> {@link Titanium.Media#property-AUDIO_FORMAT_APPLE_LOSSLESS}
<li> {@link Titanium.Media#property-AUDIO_FORMAT_ILBC}
<li> {@link Titanium.Media#property-AUDIO_FORMAT_IMA4}
<li> {@link Titanium.Media#property-AUDIO_FORMAT_LINEAR_PCM}
<li> {@link Titanium.Media#property-AUDIO_FORMAT_ULAW}
</ul></p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [format={@link Titanium.Media#property-AUDIO_FILEFORMAT_CAF}]
* @type Number
* <p>Audio format to be used for the recording.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-AUDIO_FILEFORMAT_3GP2}
<li> {@link Titanium.Media#property-AUDIO_FILEFORMAT_3GPP}
<li> {@link Titanium.Media#property-AUDIO_FILEFORMAT_AIFF}
<li> {@link Titanium.Media#property-AUDIO_FILEFORMAT_AMR}
<li> {@link Titanium.Media#property-AUDIO_FILEFORMAT_CAF}
<li> {@link Titanium.Media#property-AUDIO_FILEFORMAT_MP3}
<li> {@link Titanium.Media#property-AUDIO_FILEFORMAT_MP4}
<li> {@link Titanium.Media#property-AUDIO_FILEFORMAT_MP4A}
<li> {@link Titanium.Media#property-AUDIO_FILEFORMAT_WAVE}
</ul></p>
*/
/**
* @property paused
* @type Boolean
* @readonly
* <p>Indicates if the audio recorder is paused.</p>
*/
/**
* @property recording
* @type Boolean
* @readonly
* <p>Indicates if the audio recorder is recording.</p>
*/
/**
* @property stopped
* @type Boolean
* @readonly
* <p>Indicates if the audio recorder is stopped.</p>
*/
/**
* @class Titanium.Media.Item
* @platform iphone 1.4.0
* @platform ipad 1.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Item.yml
* <p>A representation of a media item returned by {@link Titanium.Media#method-openMusicLibrary openMusicLibrary} or {@link Titanium.Media#method-queryMusicLibrary queryMusicLibrary}.</p>
* @description <p>This is a read-only object that describes a single media item, not a playlist.
Titanium does not support access to playlists.</p>
<p><code>Item</code> objects cannot be created explicitly. The
{@link Titanium.Media#method-openMusicLibrary openMusicLibrary} returns <code>Item</code> objects in its
<code>success</code> callback function, while {@link Titanium.Media#method-queryMusicLibrary queryMusicLibrary}
returns an array of <code>Item</code> objects.</p>
*/
/**
* @method getAlbumArtist
* <p>Gets the value of the {@link Titanium.Media.Item#property-albumArtist} property.</p>
* @returns {String}
*/
/**
* @method getAlbumTitle
* <p>Gets the value of the {@link Titanium.Media.Item#property-albumTitle} property.</p>
* @returns {String}
*/
/**
* @method getAlbumTrackCount
* <p>Gets the value of the {@link Titanium.Media.Item#property-albumTrackCount} property.</p>
* @returns {Number}
*/
/**
* @method getAlbumTrackNumber
* <p>Gets the value of the {@link Titanium.Media.Item#property-albumTrackNumber} property.</p>
* @returns {Number}
*/
/**
* @method getArtist
* <p>Gets the value of the {@link Titanium.Media.Item#property-artist} property.</p>
* @returns {String}
*/
/**
* @method getArtwork
* <p>Gets the value of the {@link Titanium.Media.Item#property-artwork} property.</p>
* @returns {Titanium.Blob}
*/
/**
* @method getComposer
* <p>Gets the value of the {@link Titanium.Media.Item#property-composer} property.</p>
* @returns {String}
*/
/**
* @method getDiscCount
* <p>Gets the value of the {@link Titanium.Media.Item#property-discCount} property.</p>
* @returns {Number}
*/
/**
* @method getDiscNumber
* <p>Gets the value of the {@link Titanium.Media.Item#property-discNumber} property.</p>
* @returns {Number}
*/
/**
* @method getGenre
* <p>Gets the value of the {@link Titanium.Media.Item#property-genre} property.</p>
* @returns {String}
*/
/**
* @method getIsCompilation
* <p>Gets the value of the {@link Titanium.Media.Item#property-isCompilation} property.</p>
* @returns {Boolean}
*/
/**
* @method getLyrics
* <p>Gets the value of the {@link Titanium.Media.Item#property-lyrics} property.</p>
* @returns {String}
*/
/**
* @method getMediaType
* <p>Gets the value of the {@link Titanium.Media.Item#property-mediaType} property.</p>
* @returns {Number}
*/
/**
* @method getPlayCount
* <p>Gets the value of the {@link Titanium.Media.Item#property-playCount} property.</p>
* @returns {Number}
*/
/**
* @method getPlaybackDuration
* <p>Gets the value of the {@link Titanium.Media.Item#property-playbackDuration} property.</p>
* @returns {Number}
*/
/**
* @method getPodcastTitle
* <p>Gets the value of the {@link Titanium.Media.Item#property-podcastTitle} property.</p>
* @returns {String}
*/
/**
* @method getRating
* <p>Gets the value of the {@link Titanium.Media.Item#property-rating} property.</p>
* @returns {Number}
*/
/**
* @method getSkipCount
* <p>Gets the value of the {@link Titanium.Media.Item#property-skipCount} property.</p>
* @returns {Number}
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.Media.Item#property-title} property.</p>
* @returns {String}
*/
/**
* @property albumArtist
* @type String
* @readonly
* <p>Artist credited for the album containing this item.</p>
*/
/**
* @property albumTitle
* @type String
* @readonly
* <p>Title of the album containing this item.</p>
*/
/**
* @property albumTrackCount
* @type Number
* @readonly
* <p>Number of tracks for the album containing this item.</p>
*/
/**
* @property albumTrackNumber
* @type Number
* @readonly
* <p>Track number for this item.</p>
*/
/**
* @property artist
* @type String
* @readonly
* <p>Artist credited for this item.</p>
*/
/**
* @property artwork
* @type Titanium.Blob
* @readonly
* <p>Image for the item's artwork as a <code>Blob</code> object, or <code>null</code> if no artwork is
available.</p>
*/
/**
* @property composer
* @type String
* @readonly
* <p>Composer of this item.</p>
*/
/**
* @property discCount
* @type Number
* @readonly
* <p>Total number of discs for the album containing this item.</p>
*/
/**
* @property discNumber
* @type Number
* @readonly
* <p>Disc number for this item in the album.</p>
*/
/**
* @property genre
* @type String
* @readonly
* <p>Genre of this item.</p>
*/
/**
* @property isCompilation
* @type Boolean
* @readonly
* <p>True if this item is part of a compilation album.</p>
*/
/**
* @property lyrics
* @type String
* @readonly
* <p>Lyrics for this item.</p>
*/
/**
* @property mediaType
* @type Number
* @readonly
* <p>The type of the media. </p>
* @description <p>At least in theory, a single item can have more than one media type, in which case the
value represents a bitwise-OR of all the applicable media types.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_ALL}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_ANY_AUDIO}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_AUDIOBOOK}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_MUSIC}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_PODCAST}
</ul></p>
*/
/**
* @property playCount
* @type Number
* @readonly
* <p>Number of times the item has been played.</p>
*/
/**
* @property playbackDuration
* @type Number
* @readonly
* <p>Length (in seconds) of this item.</p>
*/
/**
* @property podcastTitle
* @type String
* @readonly
* <p>Title of a podcast item.</p>
* @description <p>Only included if the media type is {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_PODCAST}.</p>
*/
/**
* @property rating
* @type Number
* @readonly
* <p>Rating for this item.</p>
*/
/**
* @property skipCount
* @type Number
* @readonly
* <p>Number of times this item has been skipped.</p>
*/
/**
* @property title
* @type String
* @readonly
* <p>Title of this item.</p>
*/
/**
* @class Titanium.Media
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>The top-level Media module.</p>
* @description <p>The Media module is used to access the device's media-related functionality, such
as using the device's camera and photo gallery, playing media files, or recording
audio or video.
For examples of using the Media APIs, refer to the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Working_with_Media_APIs">Working with Media APIs guide</a>
in addition to the other media submodule API documentation.</p>
*/
/**
* @event cameraready
* <p>Fires when the camera overlay is ready to take pictures.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 6.0.0
*/
/**
* @event linechange
* <p>Fired when an audio line type change is detected.</p>
* @deprecated 3.4.2 Titanium no longer fires this event. Use the <Titanium.Media.routechange> event instead.
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event recordinginput
* <p>Fired when the availablity of recording input changes.</p>
* @deprecated 3.4.2 Titanium no longer fires this event. Use the <Titanium.Media.canRecord> property to check if an input hardware is available.
* @param {Boolean} available
<p>Indicates whether the recording device is available.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event routechange
* <p>Fired when an audio line type change is detected.</p>
* @param {String} reason
<p>The reason for route change.</p>
* @param {RouteDescription} oldRoute
<p>Returns a description of the old route, consisting of zero or more input ports and zero or more output ports.</p>
* @param {RouteDescription} currentRoute
<p>Returns a description of the current route, consisting of zero or more input ports and zero or more output ports.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @event volume
* <p>Fired when the volume output changes.</p>
* @param {Number} volume
<p>New volume level in dB.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method hideMusicLibrary
* <p>Hides the music library.</p>
* @description <p>Must be called after calling {@link Titanium.Media#method-openMusicLibrary openMusicLibrary}
and only when <code>autohide</code> is set to <code>false</code>.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method previewImage
* <p>Displays the given image.</p>
* @param {Dictionary<PreviewImageOptions>} options
<p>Dictionary containing the image and callback functions.</p>
* @platform android 0.8
*/
/**
* @method setOverrideAudioRoute
* <p>Overrides the default audio route when using the {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_PLAY_AND_RECORD} session mode.</p>
* @description <p>By default, when using the {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_PLAY_AND_RECORD} session mode,
the audio output is routed to the speaker in the receiver. This method lets you specify
that audio should be routed to the built-in speaker.</p>
<p>If you override the audio route while audio is playing the changes won't not take effect until the audio is restarted.</p>
* @param {Number} route
<p>The specified audio route.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-AUDIO_SESSION_OVERRIDE_ROUTE_NONE}
<li> {@link Titanium.Media#property-AUDIO_SESSION_OVERRIDE_ROUTE_SPEAKER}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method hasMusicLibraryPermissions
* <p>Returns <code>true</code> if the app has camera access.</p>
* @description <p>Music-library permissions are only needed in iOS 9.3 and later and will be ignored on older
iOS versions. Because of that, the method will return <code>true</code> for devices that run iOS < 9.3.</p>
* @returns {Boolean}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method requestMusicLibraryPermissions
* <p>Request permissions for the native music-library.</p>
* @description <p>Music-library permissions are only needed in iOS 9.3 and later and will be ignored on older
iOS versions. Because of that, the callback will ignore the permission-check and always return
<code>{success: true}</code> for devices that run iOS < 9.3.</p>
<p>Important: On iOS 10, Apple introduced the Info.plist key <code>NSAppleMusicUsageDescription</code> that is used to
display an own description while authorizing the music library. This key is mandatory and the application
will crash if your app does not include the key. Check the <a href="https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html">Apple docs</a>
for more information.</p>
* @param {Callback<RequestMusicLibraryAccessResult>} callback
<p>Function to call upon user decision to grant camera access.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method queryMusicLibrary
* <p>Searches the music library for items matching the specified search predicates.</p>
* @description <p>Use {@link Titanium.Media#method-hasMusicLibraryPermissions} to check the granted permissions and <br>
{@link Titanium.Media#method-requestMusicLibraryPermissions} to request the permissions. This is especially important
when running on an iOS 10 device, because the music-library access will crash without having the privacy-key
<code>NSAppleMusicUsageDescription</code> that is specified in {@link Titanium.Media#method-requestMusicLibraryPermissions}.</p>
* @param {MediaQueryType} query
<p>The query object to extract information from.</p>
* @returns {Titanium.Media.Item[]}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method switchCamera
* <p>Switches between front and rear-facing cameras. Make sure to set one of the below constants to determine
the camera you want to switch to.</p>
* @description <p>In Android, this can only be called when using a custom overlay (see {@link Titanium.Media#method-showCamera}).</p>
* @param {Number} camera
<p>Constant indicating to which camera you want to switch.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-CAMERA_FRONT}
<li> {@link Titanium.Media#property-CAMERA_REAR}
</ul></p>
* @platform android 3.2.0
* @platform iphone 1.8.1
* @platform ipad 1.8.1
*/
/**
* @method hasPhotoGalleryPermissions
* <p>Returns <code>true</code> if the app has photo gallery permissions.</p>
* @returns {Boolean}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method requestPhotoGalleryPermissions
* <p>Requests for photo gallery permissions.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>In iOS 6, Apple introduced the Info.plist key <code>NSPhotoLibraryUsageDescription</code> that is used to display an
own description while authorizing photo gallery permissions. In iOS 10, this key is mandatory when accessing the
photo gallery and the application will crash if your app does not include the key. Check the <a href="https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html">Apple docs</a>
for more information. If the user has, the callback will return the earlier decision. To change the permission the
user needs to change it in the device settings.</p>
<p>This API is available in iOS 8 and later. Earlier versions of iOS, as well as apps that do not include this method,
will present the system-dialog while the dialog is opened with {@link Titanium.Media#method-openPhotoGallery}.</p>
* @param {Callback<RequestPhotoGalleryAccessResult>} callback
<p>Function to call upon user decision to grant camera access.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method requestCameraAccess
* <p>Requests for camera access.</p>
* @deprecated 5.1.0 Please use <Titanium.Media.requestCameraPermissions> instead.
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This method allows the app to request for camera access, before or without the user granting
it in {@link Titanium.Media#method-showCamera}. The request view will only show if user has not yet made
a decision. If he has, the callback will return his earlier decision, and if any changes has
to be made, the user has to change it in the device settings.</p>
* @param {Callback<RequestCameraAccessResult>} callback
<p>Function to call upon user decision to grant camera access.</p>
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method hasAudioPermissions
* <p>Returns <code>true</code> if the app has audio permissions.</p>
* @returns {Boolean}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method requestAudioPermissions
* <p>Request the user's permission for audio recording.</p>
* @description <p>On iOS 7.0, recording audio requires explicit permission from the user. After the user
grants or denies permission, the system remembers the choice for future use in the same app.
If permission is not granted, or if the user has not yet responded to the permission prompt,
any audio recording sessions record only silence.</p>
<p>In addition, Apple introduced the Info.plist key <code>NSMicrophoneUsageDescription</code> that is used to display an
own description while authorizing microphone permissions. In iOS 10, this key is mandatory and the application
will crash if your app does not include the key. Check the <a href="https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html">Apple docs</a>
for more information.</p>
* @param {Callback<MediaAuthorizationResponse>} callback
<p>Callback function to execute when the users responds to the authorization alert.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method beep
* <p>Plays a device beep notification.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method hideCamera
* <p>Hides the device camera UI.</p>
* @description <p>Must be called after calling <code>showCamera</code> and only when <code>autohide</code> is set to <code>false</code>.
This method causes the media capture UI to be hidden.</p>
* @platform android 3.2.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method isMediaTypeSupported
* <p>Returns <code>true</code> if the source supports the specified media type.</p>
* @description <p>You can query whether a given media type is supported by the device's
camera (<code>source</code> == 'camera') or photo library (<code>source</code> == 'photo'). </p>
<p>An additional value, <code>photogallery</code> can be used to query the media
supported by the device's camera roll or saved image album, which is a
subset of the iOS photo library. However, when calling
{@link Titanium.Media#method-openPhotoGallery openPhotoGallery} on iOS, the entire
library is displayed, and there is currently no way to restrict the
gallery to show only the camera roll/saved images album. </p>
* @param {String} source
<p>Media source specified as a string: <code>camera</code> for Camera or <code>photo</code> for Photo Library.</p>
* @param {String} type
<p>Media type to check.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MEDIA_TYPE_PHOTO}
<li> {@link Titanium.Media#property-MEDIA_TYPE_LIVEPHOTO}
<li> {@link Titanium.Media#property-MEDIA_TYPE_VIDEO}
</ul></p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method openMusicLibrary
* <p>Shows the music library and allows the user to select one or more tracks.</p>
* @description <p>If <code>autohide</code> is set to <code>false</code>, you must hide the library explicitly using
{@link Titanium.Media#method-hideMusicLibrary hideMusicLibrary}.</p>
* @param {MusicLibraryOptionsType} options
<p>A dictionary of options as described in {@link MusicLibraryOptionsType}.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method openPhotoGallery
* <p>Opens the photo gallery image picker.</p>
* @description <p>In iOS 6, Apple introduced the Info.plist key <code>NSPhotoLibraryUsageDescription</code> that is used to display an
own description while authorizing gallery permissions. In iOS 10, this key is mandatory and the application
will crash if your app does not include the key. Check the <a href="https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html">Apple docs</a>
for more information. </p>
* @param {PhotoGalleryOptionsType} options
<p>Photo gallery options as described in {@link PhotoGalleryOptionsType}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method saveToPhotoGallery
* <p>Saves media to the device's photo gallery / camera roll.</p>
* @description <p>This operation is asynchronous. The caller can supply callbacks to be triggered when the
save operation completes.</p>
<p>Media can be passed as either a <code>Blob</code> object or a <code>File</code> object. If the <code>media</code> argument
is not one of these types, an error is generated.</p>
<p>Note that when passing a file (or a blob created from a file), the file name must
have the appropriate extension for the data--for example, <code>image.jpg</code> or <code>video1.mov</code> work,
but <code>video1.tmp</code> does not. Currently, the <code>.mp4</code> extension is not supported, but MP4
files may be imported by saving them with the <code>.mov</code> extension.</p>
<p>On Android this method <em>only supports saving images</em> to the device gallery. </p>
* @param {Titanium.Blob/Titanium.Filesystem.File} media
<p>Media to save to the camera roll or media gallery.</p>
* @param {Object} callbacks
<p>Pass a dictionary with the following supported keys: <code>success</code> a function that
will be called when the save succeeds, and <code>error</code> a function that will be
called upon receiving an error.</p>
* @platform android 3.3.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method showCamera
* <p>Shows the camera.</p>
* @description <p>By default, the native camera controls are displayed. To add your own camera controls,
you can add an overlay view by setting the <code>overlay</code> property on the <code>options</code> argument.</p>
<h4>Android Platform Notes</h4>
<p>To suppress the default controls, set <code>autohide</code> to <code>false</code> and then set the
<code>overlay</code> property to a view that contains a control (such as a button) to
take the photo. You must then control the camera explicitly, using
the {@link Titanium.Media#method-takePicture takePicture} and {@link Titanium.Media#method-hideCamera hideCamera}
methods.</p>
<h4>iOS Platform Notes</h4>
<p>To suppress the default controls, set <code>showControls</code> and <code>autohide</code> to <code>false</code>.</p>
<p>If the <code>showControls</code> option is <code>false</code>, you must control the camera explicitly, using
the {@link Titanium.Media#method-takePicture takePicture} and {@link Titanium.Media#method-hideCamera hideCamera}
methods.</p>
<p>Images taken with the camera will not have accurate geolocation data embedded in the images;
the latitude and longitude will be set to '0'. This is not an error, but a limitation which
Apple has put on the camera API.</p>
<p>Important: Use {@link Titanium.Media#method-hasCameraPermissions} and {@link Titanium.Media#method-requestCameraPermissions}
to ask for camera permissions. This is especially important when running on iOS 10 and later, since
the application may crash otherwise.</p>
* @param {CameraOptionsType} options
<p>A dictionary of camera options as described in {@link CameraOptionsType}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method startMicrophoneMonitor
* <p>Starts monitoring the microphone sound level.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method stopMicrophoneMonitor
* <p>Stops monitoring the microphone sound level.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method takePicture
* <p>Uses the device camera to capture a photo.</p>
* @description <p>Must be called after calling <code>showCamera</code> and only when <code>autohide</code> is set to <code>false</code>. </p>
<p>This method causes the media capture device to capture a photo and call the
<code>success</code> callback.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method startVideoCapture
* <p>Starts video capture using the camera specified.</p>
* @platform android 5.4.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method stopVideoCapture
* <p>Stops video capture using the camera specified.</p>
* @platform android 5.4.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method takeScreenshot
* <p>Takes a screen shot of the visible UI on the device.</p>
* @description <p>This method is asynchronous. The screenshot is returned in the callback argument.
The callback argument's <code>media</code> property contains the screenshot image as a
{@link Titanium.Blob Blob} object.</p>
* @param {Callback<ScreenshotResult>} callback
<p>Function to call upon capture.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method vibrate
* <p>Makes the device vibrate.</p>
* @description <p>On Android and Mobile Web, a <code>pattern</code> argument can be provided to specify a
vibration pattern.</p>
<p>The <code>pattern</code> is an array of Number values. Each number in the array is
interpreted as a duration in milliseconds. The first number is the <em>delay</em>
before the pattern starts, and the remaining numbers are interpreted as
alternating periods of on and off times. For example, the following pattern:</p>
<p>[ 0, 500, 100, 500, 100, 500 ] </p>
<p>Would cause the vibration to start immediately (delay = 0), and perform three
long vibrations (500 ms) separated by short pauses (100ms).</p>
<p>On Mobile Web, calling <code>vibrate</code> without a <code>pattern</code> will stop the vibration.</p>
* @param {Array<Number>} pattern (optional)
<p>Array of values identifying a vibrate pattern (only used on Android).</p>
*/
/**
* @method requestAuthorization
* <p>Request the user's permission for audio recording.</p>
* @deprecated 5.1.0 Use <Titanium.Media.requestAudioPermissions> instead.
* @description <p>On iOS 7.0, recording audio requires explicit permission from the user. After the user
grants or denies permission, the system remembers the choice for future use in the same app.
If permission is not granted, or if the user has not yet responded to the permission prompt,
any audio recording sessions record only silence.</p>
<p>In addition, Apple introduced the Info.plist key <code>NSMicrophoneUsageDescription</code> that is used to display an
own description while authorizing microphone permissions. In iOS 10, this key is mandatory and the application
will crash if your app does not include the key. Check the <a href="https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html">Apple docs</a>
for more information.</p>
* @param {Callback<MediaAuthorizationResponse>} callback
<p>Callback function to execute when the users responds to the authorization alert.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
* @platform windowsphone 4.1.0
*/
/**
* @method hasCameraPermissions
* <p>Returns <code>true</code> if the app has camera access.</p>
* @returns {Boolean}
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform windowsphone 5.1.0
*/
/**
* @method requestCameraPermissions
* <p>Requests for camera access.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>On Android, the request view will show if the permission is not accepted by the user, and the user did
not check the box "Never ask again" when denying the request. If the user checks the box "Never ask again,"
the user has to manually enable the permission in device settings.</p>
<p>This method requests <code>Manifest.permission.CAMERA</code> on Android. If you require other permissions, you can also
use {@link Titanium.Android#method-requestPermissions}.</p>
<p>In iOS 6, Apple introduced the Info.plist key <code>NSCameraUsageDescription</code> that is used to display an
own description while authorizing camera permissions. In iOS 10, this key is mandatory when taking a photo
and the application will crash if your app does not include the key. Check the <a href="https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html">Apple docs</a>
for more information. When using the camera to take a video, you also need the <code>NSMicrophoneUsageDescription</code> key.
In addition, the authorization dialog will only show if user has not made a decision, yet.
If the user has, the callback will return the earlier decision. To change the permission the user needs to
change it in the device settings.</p>
* @param {Callback<RequestCameraAccessResult>} callback
<p>Function to call upon user decision to grant camera access.</p>
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform windowsphone 5.1.0
*/
/**
* @method createAudioPlayer
* <p>Creates and returns an instance of {@link Titanium.Media.AudioPlayer}.</p>
* @param {Dictionary<Titanium.Media.AudioPlayer>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Media.AudioPlayer} except those marked not-creation or read-only.</p>
* @returns {Titanium.Media.AudioPlayer}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method createAudioRecorder
* <p>Creates and returns an instance of {@link Titanium.Media.AudioRecorder}.</p>
* @param {Dictionary<Titanium.Media.AudioRecorder>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Media.AudioRecorder} except those marked not-creation or read-only.</p>
* @returns {Titanium.Media.AudioRecorder}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getQUALITY_640x480
* <p>Gets the value of the {@link Titanium.Media#property-QUALITY_640x480} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getQUALITY_IFRAME_1280x720
* <p>Gets the value of the {@link Titanium.Media#property-QUALITY_IFRAME_1280x720} property.</p>
* @returns {Number}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getQUALITY_IFRAME_960x540
* <p>Gets the value of the {@link Titanium.Media#property-QUALITY_IFRAME_960x540} property.</p>
* @returns {Number}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getAudioLineType
* <p>Gets the value of the {@link Titanium.Media#property-audioLineType} property.</p>
* @deprecated 3.4.2 Use <Titanium.Media.currentRoute> instead.
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getAudioSessionMode
* <p>Gets the value of the {@link Titanium.Media#property-audioSessionMode} property.</p>
* @removed 6.0.0 Use <Titanium.Media.audioSessionCategory> instead.
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setAudioSessionMode
* <p>Sets the value of the {@link Titanium.Media#property-audioSessionMode} property.</p>
* @removed 6.0.0 Use <Titanium.Media.audioSessionCategory> instead.
* @param {Number} audioSessionMode
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getCameraAuthorizationStatus
* <p>Gets the value of the {@link Titanium.Media#property-cameraAuthorizationStatus} property.</p>
* @deprecated 5.2.0 Use <Titanium.Media.cameraAuthorization> instead.
* @returns {Number}
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @method getCameraAuthorization
* <p>Gets the value of the {@link Titanium.Media#property-cameraAuthorization} property.</p>
* @returns {Number}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getAppMusicPlayer
* <p>Gets the value of the {@link Titanium.Media#property-appMusicPlayer} property.</p>
* @returns {Titanium.Media.MusicPlayer}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAudioPlaying
* <p>Gets the value of the {@link Titanium.Media#property-audioPlaying} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAudioSessionCategory
* <p>Gets the value of the {@link Titanium.Media#property-audioSessionCategory} property.</p>
* @returns {Number}
* @platform iphone 3.4.2
* @platform ipad 3.4.2
* @platform windowsphone 4.1.0
*/
/**
* @method setAudioSessionCategory
* <p>Sets the value of the {@link Titanium.Media#property-audioSessionCategory} property.</p>
* @param {Number} audioSessionCategory
<p>New value for the property.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
* @platform windowsphone 4.1.0
*/
/**
* @method getAvailableCameras
* <p>Gets the value of the {@link Titanium.Media#property-availableCameras} property.</p>
* @returns {Number[]}
* @platform android 3.2.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAvailableCameraMediaTypes
* <p>Gets the value of the {@link Titanium.Media#property-availableCameraMediaTypes} property.</p>
* @returns {Object[]}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setAvailableCameraMediaTypes
* <p>Sets the value of the {@link Titanium.Media#property-availableCameraMediaTypes} property.</p>
* @param {Array<Object>} availableCameraMediaTypes
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAvailablePhotoGalleryMediaTypes
* <p>Gets the value of the {@link Titanium.Media#property-availablePhotoGalleryMediaTypes} property.</p>
* @returns {Object[]}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setAvailablePhotoGalleryMediaTypes
* <p>Sets the value of the {@link Titanium.Media#property-availablePhotoGalleryMediaTypes} property.</p>
* @param {Array<Object>} availablePhotoGalleryMediaTypes
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAvailablePhotoMediaTypes
* <p>Gets the value of the {@link Titanium.Media#property-availablePhotoMediaTypes} property.</p>
* @returns {Object[]}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setAvailablePhotoMediaTypes
* <p>Sets the value of the {@link Titanium.Media#property-availablePhotoMediaTypes} property.</p>
* @param {Array<Object>} availablePhotoMediaTypes
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAverageMicrophonePower
* <p>Gets the value of the {@link Titanium.Media#property-averageMicrophonePower} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setAverageMicrophonePower
* <p>Sets the value of the {@link Titanium.Media#property-averageMicrophonePower} property.</p>
* @param {Number} averageMicrophonePower
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getCameraFlashMode
* <p>Gets the value of the {@link Titanium.Media#property-cameraFlashMode} property.</p>
* @returns {Number}
* @platform android 3.3.0
* @platform iphone 1.4.0
* @platform ipad 1.4.0
* @platform windowsphone 4.1.0
*/
/**
* @method setCameraFlashMode
* <p>Sets the value of the {@link Titanium.Media#property-cameraFlashMode} property.</p>
* @param {Number} cameraFlashMode
<p>New value for the property.</p>
* @platform android 3.3.0
* @platform iphone 1.4.0
* @platform ipad 1.4.0
* @platform windowsphone 4.1.0
*/
/**
* @method getCanRecord
* <p>Gets the value of the {@link Titanium.Media#property-canRecord} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getCurrentRoute
* <p>Gets the value of the {@link Titanium.Media#property-currentRoute} property.</p>
* @returns {RouteDescription}
* @platform iphone 3.4.2
* @platform ipad 3.4.2
* @platform windowsphone 4.1.0
*/
/**
* @method getIsCameraSupported
* <p>Gets the value of the {@link Titanium.Media#property-isCameraSupported} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getPeakMicrophonePower
* <p>Gets the value of the {@link Titanium.Media#property-peakMicrophonePower} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getSystemMusicPlayer
* <p>Gets the value of the {@link Titanium.Media#property-systemMusicPlayer} property.</p>
* @returns {Titanium.Media.MusicPlayer}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getVolume
* <p>Gets the value of the {@link Titanium.Media#property-volume} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method createSound
* <p>Creates and returns an instance of {@link Titanium.Media.Sound}.</p>
* @param {Dictionary<Titanium.Media.Sound>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Media.Sound} except those marked not-creation or read-only.</p>
* @returns {Titanium.Media.Sound}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method createVideoPlayer
* <p>Creates and returns an instance of {@link Titanium.Media.VideoPlayer}.</p>
* @param {Dictionary<Titanium.Media.VideoPlayer>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Media.VideoPlayer} except those marked not-creation or read-only.</p>
* @returns {Titanium.Media.VideoPlayer}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property AUDIO_FILEFORMAT_3GP2
* @type Number
* @readonly
* <p>Audio file format 3GPP2.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FILEFORMAT_3GPP
* @type Number
* @readonly
* <p>Audio file format 3GPP.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FILEFORMAT_AIFF
* @type Number
* @readonly
* <p>Audio file format Audio Interchange File Format (AIFF).</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FILEFORMAT_AMR
* @type Number
* @readonly
* <p>Audio file format Adaptive Multi-Rate (AMR).</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FILEFORMAT_CAF
* @type Number
* @readonly
* <p>Audio file format Apple Compressed Audio Format (CAF).</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FILEFORMAT_MP3
* @type Number
* @readonly
* <p>Audio file format MP3.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FILEFORMAT_MP4
* @type Number
* @readonly
* <p>Audio file format MP4.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FILEFORMAT_MP4A
* @type Number
* @readonly
* <p>Audio file format MP4A.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FILEFORMAT_WAVE
* @type Number
* @readonly
* <p>Audio file format WAVE.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FORMAT_AAC
* @type Number
* @readonly
* <p>Audio format MPEG4 AAC encoding.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FORMAT_ALAW
* @type Number
* @readonly
* <p>Audio format 8-bit aLaw encoding.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FORMAT_APPLE_LOSSLESS
* @type Number
* @readonly
* <p>Audio format Apple lossless encoding.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FORMAT_ILBC
* @type Number
* @readonly
* <p>Audio format iLBC encoding.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FORMAT_IMA4
* @type Number
* @readonly
* <p>Audio format Apple IMA4 encoding.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FORMAT_LINEAR_PCM
* @type Number
* @readonly
* <p>Audio format 16-bit, linear PCM encoding.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_FORMAT_ULAW
* @type Number
* @readonly
* <p>Audio format 8-bit muLaw encoding.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_HEADPHONES
* @type Number
* @readonly
* <p>Line-type constant for headphones.</p>
* @removed 3.6.0 Deprecated in favor of the `AUDIO_SESSION_PORT` constants defined in <Titanium.Media>.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_HEADPHONES_AND_MIC
* @type Number
* @readonly
* <p>Line-type constant for headphones and microphone.</p>
* @removed 3.6.0 Deprecated in favor of the `AUDIO_SESSION_PORT` constants defined in <Titanium.Media>.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_HEADSET_INOUT
* @type Number
* @readonly
* <p>Line-type constant for headset in/out.</p>
* @removed 3.6.0 Deprecated in favor of the `AUDIO_SESSION_PORT` constants defined in <Titanium.Media>.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_LINEOUT
* @type Number
* @readonly
* <p>Line-type constant for line-out.</p>
* @removed 3.6.0 Deprecated in favor of the `AUDIO_SESSION_PORT` constants defined in <Titanium.Media>.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_MICROPHONE
* @type Number
* @readonly
* <p>Line-type constant for microphone.</p>
* @removed 3.6.0 Deprecated in favor of the `AUDIO_SESSION_PORT` constants defined in <Titanium.Media>.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_MUTED
* @type Number
* @readonly
* <p>Line-type constant indicated mute switch is on.</p>
* @removed 3.6.0 Deprecated in favor of the `AUDIO_SESSION_PORT` constants defined in <Titanium.Media>.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_RECEIVER_AND_MIC
* @type Number
* @readonly
* <p>Line-type constant indicating receiver and microphone.</p>
* @removed 3.6.0 Deprecated in favor of the `AUDIO_SESSION_PORT` constants defined in <Titanium.Media>.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_SESSION_CATEGORY_AMBIENT
* @type String
* @readonly
* <p>For long-duration sounds such as rain, car engine noise, and so on.</p>
* @description <p>Also used for for 'play along' style applications, such a virtual piano that a
user plays over iPod audio.</p>
<p>See also: {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_SOLO_AMBIENT AUDIO_SESSION_CATEGORY_SOLO_AMBIENT}.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_CATEGORY_PLAYBACK
* @type String
* @readonly
* <p>Session mode for playing recorded music or other sounds that are central to the successful use of your application.</p>
* @description <p>When using this mode, your application audio continues with the Ring/Silent switch set
to silent or when the screen locks. This property normally disallows mixing iPod audio
with application audio.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_CATEGORY_PLAY_AND_RECORD
* @type String
* @readonly
* <p>Session mode for recording (input) and playback (output) of audio, such as for a VOIP (voice over IP) application.</p>
* @description <p>This category is appropriate for simultaneous recording and playback, and also for
applications that record and play back but not simultaneously. If you want to ensure
that sounds such as Messages alerts do not play while your application is recording,
use {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_RECORD} instead. This category normally
disallows mixing iPod audio with application audio.</p>
<p>In this mode, by default audio playback is routed to the speaker in the iPhone receiver. To have audio playback through the iPhone speaker, use {@link Titanium.Media#method-setOverrideAudioRoute}.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_CATEGORY_RECORD
* @type String
* @readonly
* <p>Session mode for recording audio; it silences playback audio.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_CATEGORY_SOLO_AMBIENT
* @type String
* @readonly
* <p>Session mode for long-duration sounds such as rain, car engine noise, and so on.</p>
* @description <p>When you use this category, audio from built-in applications, such as the iPod,
is silenced. Your audio is silenced when the Ring/Silent switch is set to <code>silent</code>
or when the screen locks.</p>
<p>To use long-duration sounds without silencing built-in applications,
see {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_AMBIENT AUDIO_SESSION_CATEGORY_AMBIENT}.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_MODE_AMBIENT
* @type Number
* @readonly
* <p>For long-duration sounds such as rain, car engine noise, and so on.</p>
* @removed 6.0.0 Deprecated in favor of the `AUDIO_SESSION_CATEGORY` constants defined in <Titanium.Media>.
* @description <p>Also used for for 'play along' style applications, such a virtual piano that a
user plays over iPod audio.</p>
<p>See also: {@link Titanium.Media#property-AUDIO_SESSION_MODE_SOLO_AMBIENT AUDIO_SESSION_MODE_SOLO_AMBIENT}.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_SESSION_MODE_PLAYBACK
* @type Number
* @readonly
* <p>Session mode for playing recorded music or other sounds that are central to the successful use of your application.</p>
* @removed 6.0.0 Deprecated in favor of the `AUDIO_SESSION_CATEGORY` constants defined in <Titanium.Media>.
* @description <p>When using this mode, your application audio continues with the Ring/Silent switch set
to silent or when the screen locks. This property normally disallows mixing iPod audio
with application audio.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_SESSION_MODE_PLAY_AND_RECORD
* @type Number
* @readonly
* <p>Session mode for recording (input) and playback (output) of audio, such as for a VOIP (voice over IP) application.</p>
* @removed 6.0.0 Deprecated in favor of the `AUDIO_SESSION_CATEGORY` constants defined in <Titanium.Media>.
* @description <p>This category is appropriate for simultaneous recording and playback, and also for
applications that record and play back but not simultaneously. If you want to ensure
that sounds such as Messages alerts do not play while your application is recording,
use {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_RECORD} instead. This category normally
disallows mixing iPod audio with application audio.</p>
<p>In this mode, by default audio playback is routed to the speaker in the iPhone receiver. To have audio playback through the iPhone speaker, use {@link Titanium.Media#method-setOverrideAudioRoute}.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_SESSION_MODE_RECORD
* @type Number
* @readonly
* <p>Session mode for recording audio; it silences playback audio.</p>
* @removed 6.0.0 Deprecated in favor of the `AUDIO_SESSION_CATEGORY_*` constants defined in <Titanium.Media>.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_SESSION_MODE_SOLO_AMBIENT
* @type Number
* @readonly
* <p>Session mode for long-duration sounds such as rain, car engine noise, and so on.</p>
* @deprecated 3.4.2 Deprecated in favor of the `AUDIO_SESSION_CATEGORY` constants defined in <Titanium.Media>.
* @description <p>When you use this category, audio from built-in applications, such as the iPod,
is silenced. Your audio is silenced when the Ring/Silent switch is set to <code>silent</code>
or when the screen locks.</p>
<p>To use long-duration sounds without silencing built-in applications,
see {@link Titanium.Media#property-AUDIO_SESSION_MODE_AMBIENT AUDIO_SESSION_MODE_AMBIENT}.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_SESSION_OVERRIDE_ROUTE_NONE
* @type Number
* @readonly
* <p>Constant that specifies audio should output to the default audio route. See {@link Titanium.Media#method-setOverrideAudioRoute} for more information.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_SESSION_OVERRIDE_ROUTE_SPEAKER
* @type Number
* @readonly
* <p>Constant that specifies audio should output to the speaker. See {@link Titanium.Media#method-setOverrideAudioRoute} for more information.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_SESSION_PORT_LINEIN
* @type String
* @readonly
* <p>Constant for line level input on a dock connector. This is an input port.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_BUILTINMIC
* @type String
* @readonly
* <p>Constant for built-in microphone on an iOS device. This is an input port.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_HEADSETMIC
* @type String
* @readonly
* <p>Constant for microphone on a wired headset. This is an input port.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_LINEOUT
* @type String
* @readonly
* <p>Constant for line level output on a dock connector. This is an output port.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_HEADPHONES
* @type String
* @readonly
* <p>Constant for headphone or headset output. This is an output port.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_BLUETOOTHA2DP
* @type String
* @readonly
* <p>Constant for output on a Bluetooth A2DP device. This is an output port.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_BUILTINRECEIVER
* @type String
* @readonly
* <p>Constant for the speaker you hold to your ear when on a phone call. This is an output port.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_BUILTINSPEAKER
* @type String
* @readonly
* <p>Constant for built-in speaker on an iOS device. This is an output port.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_HDMI
* @type String
* @readonly
* <p>Constant for output via High-Definition Multimedia Interface. This is an output port</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_AIRPLAY
* @type String
* @readonly
* <p>Constant for output on a remote Air Play device. This is an output port.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_BLUETOOTHHFP
* @type String
* @readonly
* <p>Constant for input or output on a Bluetooth Hands-Free Profile device. This can be both an input and output port.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_USBAUDIO
* @type String
* @readonly
* <p>Constant for input or output on a Universal Serial Bus device. This can be both an input and output port.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_BLUETOOTHLE
* @type String
* @readonly
* <p>Constant for output on a Bluetooth Low Energy device. This is an output port. This is available on iOS7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SESSION_PORT_CARAUDIO
* @type String
* @readonly
* <p>Constant for Input or output via Car Audio. This can be both an input and output port. This is available on iOS7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
*/
/**
* @property AUDIO_SPEAKER
* @type Number
* @readonly
* <p>Line-type constant for speaker output.</p>
* @deprecated 3.4.2 Deprecated in favor of the `AUDIO_SESSION_PORT` constants defined in <Titanium.Media>.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_UNAVAILABLE
* @type Number
* @readonly
* <p>Line-type constant indicating that audio is unavailable.</p>
* @removed 3.6.0 Deprecated in favor of the `AUDIO_SESSION_PORT` constants defined in <Titanium.Media>.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUDIO_UNKNOWN
* @type Number
* @readonly
* <p>Line-type constant indicating that line-type is unknown or not determined.</p>
* @removed 3.6.0 Deprecated in favor of the `AUDIO_SESSION_PORT` constants defined in <Titanium.Media>.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property CAMERA_FLASH_AUTO
* @type Number
* @readonly
* <p>Constant specifying to have the device determine to use the flash or not.</p>
* @platform android 3.3.0
* @platform iphone 1.4.0
* @platform ipad 1.4.0
*/
/**
* @property CAMERA_FLASH_OFF
* @type Number
* @readonly
* <p>Constant specifying to never fire the flash.</p>
* @platform android 3.3.0
* @platform iphone 1.4.0
* @platform ipad 1.4.0
*/
/**
* @property CAMERA_FLASH_ON
* @type Number
* @readonly
* <p>Constant specifying to always fire the flash.</p>
* @platform android 3.3.0
* @platform iphone 1.4.0
* @platform ipad 1.4.0
*/
/**
* @property CAMERA_FRONT
* @type Number
* @readonly
* <p>Constant specifying the front camera.</p>
* @platform android 3.2.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property CAMERA_REAR
* @type Number
* @readonly
* <p>Constant indicating the rear camera.</p>
* @platform android 3.2.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property CAMERA_AUTHORIZATION_AUTHORIZED
* @type Number
* @readonly
* <p>Constant specifying that app is authorized to use camera. This is available on iOS7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property CAMERA_AUTHORIZATION_DENIED
* @type Number
* @readonly
* <p>Constant specifying that app is denied usage of camera. This is available on iOS7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property CAMERA_AUTHORIZATION_RESTRICTED
* @type Number
* @readonly
* <p>Constant specifying that app is restricted from using camera. This is available on iOS7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property CAMERA_AUTHORIZATION_NOT_DETERMINED
* @type Number
* @readonly
* <p>Constant specifying that app is not yet authorized to use camera. This is available on iOS7 and later.</p>
* @deprecated 5.2.0 Use <Titanium.Media.CAMERA_AUTHORIZATION_UNKNOWN> instead.
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property CAMERA_AUTHORIZATION_UNKNOWN
* @type Number
* @readonly
* <p>Constant specifying that app is not yet authorized to use camera. This is available on iOS7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property DEVICE_BUSY
* @type Number
* @readonly
* <p>Constant for media device busy error.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property MEDIA_TYPE_PHOTO
* @type String
* @readonly
* <p>Media type constant for photo media.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property MEDIA_TYPE_LIVEPHOTO
* @type String
* @readonly
* <p>Media type constant for live photo media.</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property MEDIA_TYPE_VIDEO
* @type String
* @readonly
* <p>Media type constant for video media.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property MUSIC_MEDIA_TYPE_ALL
* @type Number
* @readonly
* <p>Music library media containing any type of content.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_MEDIA_TYPE_ANY_AUDIO
* @type Number
* @readonly
* <p>Music library media containing any type of audio content.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_MEDIA_TYPE_AUDIOBOOK
* @type Number
* @readonly
* <p>Music library media containing audiobook content.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_MEDIA_TYPE_MUSIC
* @type Number
* @readonly
* <p>Music library media containing music content.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_MEDIA_TYPE_PODCAST
* @type Number
* @readonly
* <p>Music library media containing podcast content.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_MEDIA_GROUP_TITLE
* @type Number
* @readonly
* <p>Constant for grouping query results by title.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_MEDIA_GROUP_ALBUM
* @type Number
* @readonly
* <p>Constant for grouping query results by album.</p>
* <p><b>Constant value:</b>1</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_MEDIA_GROUP_ARTIST
* @type Number
* @readonly
* <p>Constant for grouping query results by artist.</p>
* <p><b>Constant value:</b>2</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_MEDIA_GROUP_ALBUM_ARTIST
* @type Number
* @readonly
* <p>Constant for grouping query results by album and artist.</p>
* <p><b>Constant value:</b>3</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_MEDIA_GROUP_COMPOSER
* @type Number
* @readonly
* <p>Constant for grouping query results by composer.</p>
* <p><b>Constant value:</b>4</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_MEDIA_GROUP_GENRE
* @type Number
* @readonly
* <p>Constant for grouping query results by genre.</p>
* <p><b>Constant value:</b>5</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_MEDIA_GROUP_PLAYLIST
* @type Number
* @readonly
* <p>Constant for grouping query results by playlist.</p>
* <p><b>Constant value:</b>6</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_MEDIA_GROUP_PODCAST_TITLE
* @type Number
* @readonly
* <p>Constant for grouping query results by podcast title.</p>
* <p><b>Constant value:</b>7</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_REPEAT_ALL
* @type Number
* @readonly
* <p>Constant for "Repeat All" setting.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_REPEAT_DEFAULT
* @type Number
* @readonly
* <p>Constant for user's default repeat setting.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_REPEAT_NONE
* @type Number
* @readonly
* <p>Constant for "No Repeat" setting.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_REPEAT_ONE
* @type Number
* @readonly
* <p>Constant for "Repeat one item" setting.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_SHUFFLE_ALBUMS
* @type Number
* @readonly
* <p>Constant for shuffling complete albums setting.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_SHUFFLE_DEFAULT
* @type Number
* @readonly
* <p>Constant for user's default shuffle setting.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_SHUFFLE_NONE
* @type Number
* @readonly
* <p>Constant for "no shuffle" setting.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_SHUFFLE_SONGS
* @type Number
* @readonly
* <p>Constant for shuffling songs setting.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_STATE_INTERRUPTED
* @type Number
* @readonly
* <p>Constant for interrupted state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_STATE_PAUSED
* @type Number
* @readonly
* <p>Constant for paused state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_STATE_PLAYING
* @type Number
* @readonly
* <p>Constant for playing state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_STATE_SEEK_BACKWARD
* @type Number
* @readonly
* <p>Constant for backward seek state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_STATE_SEEK_FORWARD
* @type Number
* @readonly
* <p>Constant for forward seek state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property MUSIC_PLAYER_STATE_STOPPED
* @type Number
* @readonly
* <p>Constant for stopped state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property NO_CAMERA
* @type Number
* @readonly
* <p>Constant for media no camera error.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property NO_VIDEO
* @type Number
* @readonly
* <p>Constant for media no video error.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property QUALITY_HIGH
* @type Number
* @readonly
* <p>Media type constant for high-quality video recording.</p>
* @description <p>Recorded files are suitable for on-device playback and for wired transfer to the
Desktop using Image Capture; they are likely to be too large for transfer using Wi-Fi.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property QUALITY_LOW
* @type Number
* @readonly
* <p>Media type constant for low-quality video recording.</p>
* @description <p>Recorded files can usually be transferred over the cellular network.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property QUALITY_MEDIUM
* @type Number
* @readonly
* <p>Media type constant for medium-quality video recording.</p>
* @description <p>Recorded files can usually be transferred using Wi-Fi. This is the default video
quality setting.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property QUALITY_640x480
* @type Number
* @readonly
* <p>Media type constant for medium-quality video recording.</p>
* @description <p>If recording, specifies that you want to use VGA-quality video recording (pixel dimensions
of 640x480).</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property QUALITY_IFRAME_1280x720
* @type Number
* @readonly
* <p>Media type constant for medium-quality video recording.</p>
* @description <p>If recording, specifies that you want to use 1280x720 iFrame format.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property QUALITY_IFRAME_960x540
* @type Number
* @readonly
* <p>Media type constant for medium-quality video recording.</p>
* @description <p>If recording, specifies that you want to use 960x540 iFrame format.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property UNKNOWN_ERROR
* @type Number
* @readonly
* <p>Constant for unknown media error.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_CONTROL_DEFAULT
* @type Number
* @readonly
* <p>Constant for default video controls.</p>
* @description <p>Used in conjunction with the
{@link Titanium.Media.VideoPlayer#property-mediaControlStyle mediaControlStyle} property
of {@link Titanium.Media.VideoPlayer}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_CONTROL_EMBEDDED
* @type Number
* @readonly
* <p>Constant for video controls for an embedded view.</p>
* @description <p>Used in conjunction with the
{@link Titanium.Media.VideoPlayer#property-mediaControlStyle mediaControlStyle} property
of {@link Titanium.Media.VideoPlayer}.</p>
<p>On Android, this constant has the same effect as VIDEO_CONTROL_DEFAULT. Video controls may
only be shown or hidden. </p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_CONTROL_FULLSCREEN
* @type Number
* @readonly
* <p>Constant for fullscreen video controls.</p>
* @description <p>Used in conjunction with the
{@link Titanium.Media.VideoPlayer#property-mediaControlStyle mediaControlStyle} property
of {@link Titanium.Media.VideoPlayer}.</p>
<p>On iOS, use VIDEO_CONTROL_FULLSCREEN when creating a video player that occupies the entire
screen, that is, the parent window should be a fullscreen window
({@link Titanium.UI.Window#property-fullscreen fullscreen} set to <code>true</code>) and the video player should
occupy the entirety of the parent window.</p>
<p>If the user clicks the <strong>Done</strong> button in the fullscreen control bar, the video player
pauses playback and generates a {@link Titanium.Media.VideoPlayer#event-complete complete} event. </p>
<p>Note that if you create a video player that does <em>not</em> occupy the entire screen, and later
switch to fullscreen mode, the video controls are switched automatically. That is, if
<code>mediaControlStyle</code> is set to VIDEO_CONTROL_DEFAULT or VIDEO_CONTROL_EMBEDDED, it is
automatically switched to the fullscreen controls when the player enters fullscreen mode.
This is true whether the user initiates the mode switch by clicking the fullscreen button
in the embedded controls, or if you programmatically switch to full screen mode (by setting
the <code>fullscreen</code> property to true). </p>
<p>On Android, this constant has the same effect as VIDEO_CONTROL_DEFAULT. Video controls may
only be shown or hidden. </p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_CONTROL_HIDDEN
* @type Number
* @readonly
* <p>Constant for video controls hidden.</p>
* @description <p>Used in conjunction with the
{@link Titanium.Media.VideoPlayer#property-mediaControlStyle mediaControlStyle} property
of {@link Titanium.Media.VideoPlayer}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_CONTROL_NONE
* @type Number
* @readonly
* <p>Constant for no video controls.</p>
* @description <p>Used in conjunction with the
{@link Titanium.Media.VideoPlayer#property-mediaControlStyle mediaControlStyle} property
of {@link Titanium.Media.VideoPlayer}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_CONTROL_VOLUME_ONLY
* @type Number
* @readonly
* <p>Constant for video controls volume only.</p>
* @removed 6.0.0 Use <Titanium.Media.VIDEO_CONTROL_EMBEDDED> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_FINISH_REASON_PLAYBACK_ENDED
* @type Number
* @readonly
* <p>Video playback ended normally.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_FINISH_REASON_PLAYBACK_ERROR
* @type Number
* @readonly
* <p>Video playback ended abnormally.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_FINISH_REASON_USER_EXITED
* @type Number
* @readonly
* <p>Video playback ended by user action (such as clicking the <code>Done</code> button).</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_LOAD_STATE_PLAYABLE
* @type Number
* @readonly
* <p>Current media is playable.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_LOAD_STATE_PLAYTHROUGH_OK
* @type Number
* @readonly
* <p>Playback will be automatically started in this state when <code>autoplay</code> is true.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_LOAD_STATE_STALLED
* @type Number
* @readonly
* <p>Playback will be automatically paused in this state, if started.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_LOAD_STATE_UNKNOWN
* @type Number
* @readonly
* <p>Current load state is not known.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_MEDIA_TYPE_AUDIO
* @type Number
* @readonly
* <p>A audio type of media in the movie returned by {@link Titanium.Media.VideoPlayer} <code>mediaTypes</code> property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_MEDIA_TYPE_NONE
* @type Number
* @readonly
* <p>An unknown type of media in the movie returned by {@link Titanium.Media.VideoPlayer} <code>mediaTypes</code> property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_MEDIA_TYPE_VIDEO
* @type Number
* @readonly
* <p>A video type of media in the movie returned by {@link Titanium.Media.VideoPlayer} <code>mediaTypes</code> property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_PLAYBACK_STATE_INTERRUPTED
* @type Number
* @readonly
* <p>Video playback has been interrupted.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_PLAYBACK_STATE_PAUSED
* @type Number
* @readonly
* <p>Video playback is paused.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_PLAYBACK_STATE_PLAYING
* @type Number
* @readonly
* <p>Video is being played.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_PLAYBACK_STATE_SEEKING_BACKWARD
* @type Number
* @readonly
* <p>Video playback is rewinding.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_PLAYBACK_STATE_SEEKING_FORWARD
* @type Number
* @readonly
* <p>Video playback is seeking forward.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_PLAYBACK_STATE_STOPPED
* @type Number
* @readonly
* <p>Video playback is stopped.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_REPEAT_MODE_NONE
* @type Number
* @readonly
* <p>Constant for disabling repeat on video playback.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_REPEAT_MODE_ONE
* @type Number
* @readonly
* <p>Constant for repeating one video (i.e., the one video will repeat constantly) during playback.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_SCALING_ASPECT_FILL
* @type Number
* @readonly
* <p>Scale video to fill the screen, clipping edges if necessary.</p>
* @description <p>Video is scaled until the video fills the entire screen. Content at the edges
of the larger of the two dimensions is clipped so that the other dimension fits the
screen exactly. The aspect ratio of the movie is preserved.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_SCALING_ASPECT_FIT
* @type Number
* @readonly
* <p>Scale video to fit the screen, letterboxing if necessary.</p>
* @description <p>Video is scaled until the larger dimension fits on the screen exactly. In the
other dimension, the region between the edge of the movie and the edge of the screen
is filled with a black bar. The aspect ratio of the movie is preserved.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_SCALING_MODE_FILL
* @type Number
* @readonly
* <p>Video is scaled until both dimensions fit the screen exactly, stretching if necessary.</p>
* @description <p>The aspect ratio of the video is not preserved.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_SCALING_NONE
* @type Number
* @readonly
* <p>Video scaling is disabled.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property VIDEO_SOURCE_TYPE_FILE
* @type Number
* @readonly
* <p>Video source type is a file.</p>
* @description <p>Related to the <code>sourceType</code> property of {@link Titanium.Media.VideoPlayer}.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_SOURCE_TYPE_STREAMING
* @type Number
* @readonly
* <p>Video source type is a remote stream.</p>
* @description <p>Related to the <code>sourceType</code> property of {@link Titanium.Media.VideoPlayer}</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_SOURCE_TYPE_UNKNOWN
* @type Number
* @readonly
* <p>Video source type is unknown.</p>
* @description <p>Related to the <code>sourceType</code> property of {@link Titanium.Media.VideoPlayer}</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_TIME_OPTION_EXACT
* @type Number
* @readonly
* <p>Use the exact time.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_TIME_OPTION_NEAREST_KEYFRAME
* @type Number
* @readonly
* <p>Use the closest keyframe in the time.</p>
* @platform android 3.6.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property VIDEO_TIME_OPTION_CLOSEST_SYNC
* @type Number
* @readonly
* <p>Use the closest sync (or key) frame at given the time.</p>
* @platform android 3.6.0
*/
/**
* @property VIDEO_TIME_OPTION_NEXT_SYNC
* @type Number
* @readonly
* <p>Use the sync (or key) frame located right after or at given the time.</p>
* @platform android 3.6.0
*/
/**
* @property VIDEO_TIME_OPTION_PREVIOUS_SYNC
* @type Number
* @readonly
* <p>Use the sync (or key) frame located right before or at given the time.</p>
* @platform android 3.6.0
*/
/**
* @property audioLineType
* @type Number
* @readonly
* <p>Returns the line type constant for the current line type.</p>
* @deprecated 3.4.2 Use <Titanium.Media.currentRoute> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property audioSessionMode
* @type Number
* <p>A constant for the audio session mode to be used.</p>
* @removed 6.0.0 Use <Titanium.Media.audioSessionCategory> instead.
* @description <p>Set to one of the <code>AUDIO_SESSION_MODE</code> constants defined in {@link Titanium.Media}.</p>
<p>Must be set while the audio session is inactive (no sounds are playing, no listeners
for audio properties on the Media module, but the iPod may be active).</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-AUDIO_SESSION_MODE_AMBIENT}
<li> {@link Titanium.Media#property-AUDIO_SESSION_MODE_PLAYBACK}
<li> {@link Titanium.Media#property-AUDIO_SESSION_MODE_PLAY_AND_RECORD}
<li> {@link Titanium.Media#property-AUDIO_SESSION_MODE_RECORD}
<li> {@link Titanium.Media#property-AUDIO_SESSION_MODE_SOLO_AMBIENT}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property cameraAuthorizationStatus
* @type Number
* @readonly
* <p>Returns the authorization status for the camera.</p>
* @deprecated 5.2.0 Use <Titanium.Media.cameraAuthorization> instead.
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-CAMERA_AUTHORIZATION_AUTHORIZED}
<li> {@link Titanium.Media#property-CAMERA_AUTHORIZATION_DENIED}
<li> {@link Titanium.Media#property-CAMERA_AUTHORIZATION_RESTRICTED}
<li> {@link Titanium.Media#property-CAMERA_AUTHORIZATION_NOT_DETERMINED}
<li> {@link Titanium.Media#property-CAMERA_AUTHORIZATION_UNKNOWN}
</ul></p>
* @platform iphone 4.0.0
* @platform ipad 4.0.0
*/
/**
* @property cameraAuthorization
* @type Number
* @readonly
* <p>Returns the authorization status for the camera.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-CAMERA_AUTHORIZATION_AUTHORIZED}
<li> {@link Titanium.Media#property-CAMERA_AUTHORIZATION_DENIED}
<li> {@link Titanium.Media#property-CAMERA_AUTHORIZATION_RESTRICTED}
<li> {@link Titanium.Media#property-CAMERA_AUTHORIZATION_NOT_DETERMINED}
<li> {@link Titanium.Media#property-CAMERA_AUTHORIZATION_UNKNOWN}
</ul></p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property appMusicPlayer
* @type Titanium.Media.MusicPlayer
* @readonly
* <p>An instance of {@link Titanium.Media.MusicPlayer} representing the app-specific music player.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property audioPlaying
* @type Boolean
* @readonly
* <p>Returns <code>true</code> if the device is playing audio.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property audioSessionCategory
* @type Number
* <p>A constant for the audio session category to be used.</p>
* @description <p>Set to one of the <code>AUDIO_SESSION_CATEGORY</code> constants defined in {@link Titanium.Media}.</p>
<p>Must be set while the audio session is inactive (no sounds are playing, no listeners
for audio properties on the Media module, but the iPod may be active).</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_AMBIENT}
<li> {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_PLAYBACK}
<li> {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_PLAY_AND_RECORD}
<li> {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_RECORD}
<li> {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_SOLO_AMBIENT}
</ul></p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
* @platform windowsphone 4.1.0
*/
/**
* @property availableCameras
* @type Number[]
* @readonly
* <p>Array indicating which cameras are available, <code>CAMERA_FRONT</code>, <code>CAMERA_REAR</code> or both.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-CAMERA_FRONT}
<li> {@link Titanium.Media#property-CAMERA_REAR}
</ul></p>
* @platform android 3.2.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property availableCameraMediaTypes
* @type Object[]
* <p>Array of media type constants supported for the camera.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MEDIA_TYPE_PHOTO}
<li> {@link Titanium.Media#property-MEDIA_TYPE_LIVEPHOTO}
<li> {@link Titanium.Media#property-MEDIA_TYPE_VIDEO}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property availablePhotoGalleryMediaTypes
* @type Object[]
* <p>Array of media type constants supported for saving to the device's camera roll or saved images album.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MEDIA_TYPE_PHOTO}
<li> {@link Titanium.Media#property-MEDIA_TYPE_LIVEPHOTO}
<li> {@link Titanium.Media#property-MEDIA_TYPE_VIDEO}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property availablePhotoMediaTypes
* @type Object[]
* <p>Array of media type constants supported for the photo library.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MEDIA_TYPE_PHOTO}
<li> {@link Titanium.Media#property-MEDIA_TYPE_LIVEPHOTO}
<li> {@link Titanium.Media#property-MEDIA_TYPE_VIDEO}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property averageMicrophonePower
* @type Number
* <p>Current average microphone level in dB or -1 if microphone monitoring is disabled.</p>
* @description <p>See {@link Titanium.Media#method-startMicrophoneMonitor startMicrophoneMonitor},
{@link Titanium.Media#method-stopMicrophoneMonitor stopMicrophoneMonitor}.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property [cameraFlashMode=Titanium.Media.CAMERA_FLASH_AUTO]
* @type Number
* <p>Determines how the flash is fired when using the device's camera.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-CAMERA_FLASH_AUTO}
<li> {@link Titanium.Media#property-CAMERA_FLASH_OFF}
<li> {@link Titanium.Media#property-CAMERA_FLASH_ON}
</ul></p>
* @platform android 3.3.0
* @platform iphone 1.4.0
* @platform ipad 1.4.0
* @platform windowsphone 4.1.0
*/
/**
* @property canRecord
* @type Boolean
* @readonly
* <p><code>true</code> if the device has a recording input device available.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property currentRoute
* @type RouteDescription
* @readonly
* <p>Returns a description of the current route, consisting of zero or more input ports and zero or more output ports.</p>
* @platform iphone 3.4.2
* @platform ipad 3.4.2
* @platform windowsphone 4.1.0
*/
/**
* @property isCameraSupported
* @type Boolean
* @readonly
* <p><code>true</code> if the device has camera support.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property peakMicrophonePower
* @type Number
* @readonly
* <p>Current microphone level peak power in dB or -1 if microphone monitoring is disabled.</p>
* @description <p>See {@link Titanium.Media#method-startMicrophoneMonitor startMicrophoneMonitor},
{@link Titanium.Media#method-stopMicrophoneMonitor stopMicrophoneMonitor}.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property systemMusicPlayer
* @type Titanium.Media.MusicPlayer
* @readonly
* <p>An instance of {@link Titanium.Media.MusicPlayer} representing the system-wide music player.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property volume
* @type Number
* @readonly
* <p>Current volume of the playback device.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @class MusicLibraryOptionsType
* @platform iphone 0.8
* @platform ipad 0.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>Simple object for specifying options to {@link Titanium.Media#method-openMusicLibrary openMusicLibrary}.</p>
*/
/**
* @property success
* @type Callback<MusicLibraryResponseType>
* <p>Function to call when the music library selection is made.</p>
*/
/**
* @property error
* @type Callback<FailureResponse>
* <p>Function to call upon receiving an error.</p>
*/
/**
* @property cancel
* @type Callback<FailureResponse>
* <p>Function to call if the user presses the cancel button.</p>
*/
/**
* @property [autohide=true]
* @type Boolean
* <p>Specifies that the library should be hidden automatically after media selection is completed.</p>
*/
/**
* @property [animated=true]
* @type Boolean
* <p>Boolean if the dialog should be animated when showing and hiding.</p>
*/
/**
* @property [mediaTypes=All available types.]
* @type Number/Number[]
* <p>An array of media type constants defining selectable media.</p>
* @description <p>Specify one or more of the <code>MUSIC_MEDIA_TYPE</code> constants from {@link Titanium.Media}. To
specify multiple types, either pass an array of values, or pass a
single value that represents the bitwise-OR of the desired media types. For example,
the following values are equivalent:</p>
<pre><code>mediaTypes: [Titanium.Media.MUSIC_MEDIA_TYPE_MUSIC, Titanium.Media.MUSIC_MEDIA_TYPE_PODCAST]
</code></pre>
<p>Or:</p>
<pre><code>mediaTypes: Titanium.Media.MUSIC_MEDIA_TYPE_MUSIC|Titanium.Media.MUSIC_MEDIA_TYPE_PODCAST
</code></pre>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_ALL}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_ANY_AUDIO}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_AUDIOBOOK}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_MUSIC}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_PODCAST}
</ul></p>
*/
/**
* @property [allowMultipleSelections=false]
* @type Boolean
* <p>Set to <code>true</code> to allow the user to select multiple items from the library.</p>
*/
/**
* @class MusicLibraryResponseType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>Simple object passed to the {@link Titanium.Media#method-openMusicLibrary openMusicLibrary}
<code>success</code> callback function.</p>
*/
/**
* @property representative
* @type Titanium.Media.Item
* <p>A single representative of the selected items.</p>
*/
/**
* @property items
* @type Titanium.Media.Item[]
* <p>A list of all the items chosen by the user.</p>
*/
/**
* @property types
* @type Number
* <p>Media types in this collection, represented as the bitwise OR of the media type
values for all media types represented in <code>items</code>.</p>
*/
/**
* @class MediaQueryType
* @platform iphone 1.8
* @platform ipad 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>A specifier for a media library query. By default, filters perform an exact match.</p>
*/
/**
* @property grouping
* @type Number
* <p>A constant that specifies the ordering of the result array.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MUSIC_MEDIA_GROUP_TITLE}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_GROUP_ALBUM}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_GROUP_ARTIST}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_GROUP_ALBUM_ARTIST}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_GROUP_COMPOSER}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_GROUP_GENRE}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_GROUP_PLAYLIST}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_GROUP_PODCAST_TITLE}
</ul></p>
*/
/**
* @property mediaType
* @type MediaQueryInfoType/Number
* <p>The media type to filter on.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_ALL}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_ANY_AUDIO}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_AUDIOBOOK}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_MUSIC}
<li> {@link Titanium.Media#property-MUSIC_MEDIA_TYPE_PODCAST}
</ul></p>
*/
/**
* @property title
* @type MediaQueryInfoType/String
* <p>The title to filter on. Value should be a String.</p>
*/
/**
* @property albumTitle
* @type MediaQueryInfoType/String
* <p>The album title to filter on. Value should be a String.</p>
*/
/**
* @property artist
* @type MediaQueryInfoType/String
* <p>The artist to filter on. Value should be a String.</p>
*/
/**
* @property albumArtist
* @type MediaQueryInfoType/String
* <p>The album artist to filter on. Value should be a String.</p>
*/
/**
* @property genre
* @type MediaQueryInfoType/String
* <p>The genre to filter on. Value should be a String.</p>
*/
/**
* @property composer
* @type MediaQueryInfoType/String
* <p>The composer to filter on. Value should be a String.</p>
*/
/**
* @property isCompilation
* @type MediaQueryInfoType/Boolean
* <p>Filter by whether or not the item is a compilation. Value should be a Boolean.</p>
*/
/**
* @class MediaQueryInfoType
* @platform iphone 1.8
* @platform ipad 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>A full query descriptor for a filtering predicate.</p>
*/
/**
* @property value
* @type Number/String/Boolean
* <p>The value for the given predicate. See the descriptions in {@link MediaQueryType} for information about which properties require which values.</p>
*/
/**
* @property exact
* @type Boolean
* <p>Whether or not the predicate is for an exact match. The default is <code>true</code>.</p>
*/
/**
* @class CameraOptionsType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>Simple object for specifying options to {@link Titanium.Media#method-showCamera showCamera}.</p>
*/
/**
* @property success
* @type Callback<CameraMediaItemType>
* <p>Function to call when the camera is closed after a successful capture/selection.</p>
*/
/**
* @property error
* @type Callback<FailureResponse>
* <p>Function to call upon receiving an error.</p>
*/
/**
* @property cancel
* @type Callback<FailureResponse>
* <p>Function to call if the user presses the cancel button.</p>
*/
/**
* @property [autohide=true]
* @type Boolean
* <p>Specifies if the camera should be hidden automatically after the media capture is completed.</p>
* @description <p>On Android, this property is considered only if <code>overlay</code> is also set. When an
overlay is not set, the default Android Camera Activity is used, which is only
capable of reporting back the results of one taken photo, making <code>autohide</code>
meaningless in that context.</p>
* @platform android 3.2.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [animated=true]
* @type Boolean
* <p>Specifies if the dialog should be animated upon showing and hiding.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [saveToPhotoGallery=false]
* @type Boolean
* <p>Specifies if the media should be saved to the photo gallery upon successful capture.</p>
*/
/**
* @property [allowEditing=false]
* @type Boolean
* <p>Specifies if the media should be editable after capture/selection.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [mediaTypes=Both photo and video allowed.]
* @type String[]
* <p>Array of media type constants to allow. Note: If you want to select live photos, iOS only allows
you to select existing live photos from the gallery, capturing new live photos is not supported by
iOS public API, yet.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MEDIA_TYPE_PHOTO}
<li> {@link Titanium.Media#property-MEDIA_TYPE_LIVEPHOTO}
<li> {@link Titanium.Media#property-MEDIA_TYPE_VIDEO}
</ul></p>
* @platform android 5.4.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property videoMaximumDuration
* @type Number
* <p>Maximum duration (in milliseconds) to allow video capture before completing.</p>
* @platform android 5.4.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property videoQuality
* @type Number
* <p>Constant to indicate the video quality during capture.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-QUALITY_HIGH}
<li> {@link Titanium.Media#property-QUALITY_LOW}
<li> {@link Titanium.Media#property-QUALITY_MEDIUM}
</ul></p>
* @platform android 5.4.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property whichCamera
* @type Number
* <p>Opens the camera with the specified camera direction.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-CAMERA_FRONT}
<li> {@link Titanium.Media#property-CAMERA_REAR}
</ul></p>
* @platform android 5.4.0
*/
/**
* @property [showControls=true]
* @type Boolean
* <p>Indicates if the built-in camera controls should be displayed.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [overlay=no overlay view]
* @type Titanium.UI.View
* <p>View to added as an overlay to the camera UI (on top).</p>
* @description <p>On iOS, the overlay view is usually used in conjunction with <code>showControls: false</code>.
The <code>transform</code> property can be used to scale and position the camera preview inside
the overlay view.</p>
*/
/**
* @property [transform=identity matrix]
* @type Titanium.UI.2DMatrix
* <p>Transformation matrix to apply to the camera or photogallery view.</p>
* @description <p>Can be used to size and position the camera or photogallery view behind an overlay view.
Note that there is currently a <a href="http://openradar.appspot.com/28232651">known issue</a> caused by Apple in iOS 10 that breaks the native
transformation on iOS 10 devices. Please follow <a href="https://jira.appcelerator.org/browse/TIMOB-23910">TIMOB-23910</a> for more information.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [inPopOver=false]
* @type Boolean
* <p>Show the camera in a popover.</p>
* @description <p>Use <code>inPopOver: true</code> on iPad to display the camera view in a popover.</p>
* @platform ipad 0.8
*/
/**
* @property popoverView
* @type Titanium.UI.View
* <p>View to position the camera or photo gallery popover on top of.</p>
* @description <p>This property is only used if the camera is displayed in a
popover (<code>inPopOver</code> is <code>true</code>).</p>
* @platform ipad 0.8
*/
/**
* @property arrowDirection
* @type Number
* <p>Controls the type of arrow and position of the popover.</p>
* @description <p>This property is only used if the camera is displayed in a
popover (<code>inPopOver</code> is <code>true</code>).</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_ANY}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_DOWN}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_LEFT}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_RIGHT}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_UNKNOWN}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_UP}
</ul></p>
* @platform ipad 0.8
*/
/**
* @property [autorotate=true]
* @type Boolean
* <p>Determines if the camera preview should rotate or not.</p>
* @description <p>Set to <code>false</code> to disable rotating the camera preview. The camera preview will remain
in the same orientation it was opened in.</p>
<p>Set to <code>true</code> to allow the camera preview to rotate when the device rotates.
Black bars will appear and disappear as the device is rotated.</p>
* @platform ipad 3.4.0
*/
/**
* @class PhotoGalleryOptionsType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>Simple object for specifying options to
{@link Titanium.Media#method-openPhotoGallery openPhotoGallery}.</p>
*/
/**
* @property success
* @type Callback<CameraMediaItemType>
* <p>Function to call when the photo gallery is closed after a successful selection.</p>
*/
/**
* @property error
* @type Callback<FailureResponse>
* <p>Function to call upon receiving an error.</p>
*/
/**
* @property cancel
* @type Callback<FailureResponse>
* <p>Function to call if the user presses the cancel button.</p>
*/
/**
* @property [autohide=true]
* @type Boolean
* <p>Specifies if the photo gallery should be hidden automatically after the media
selection is completed.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [animated=true]
* @type Boolean
* <p>Specifies if the dialog should be animated upon showing and hiding.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property allowEditing
* @type Boolean
* <p>Specifies if the media should be editable after capture/selection.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [mediaTypes=Only photo and video allowed.]
* @type String[]
* <p>Array of media type constants to allow. If you want to allow live photos with
{@link Titanium.Media#property-MEDIA_TYPE_LIVEPHOTO} on iOS 9.1 and later, you also need to specify
at least {@link Titanium.Media#property-MEDIA_TYPE_PHOTO} as a fallback. If you do not allow live
photos, they still can be selected, but will be represented as a normal photo (static).</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MEDIA_TYPE_PHOTO}
<li> {@link Titanium.Media#property-MEDIA_TYPE_LIVEPHOTO}
<li> {@link Titanium.Media#property-MEDIA_TYPE_VIDEO}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property popoverView
* @type Titanium.UI.View
* <p>View to position the photo gallery popover on top of.</p>
* @platform ipad 0.8
*/
/**
* @property arrowDirection
* @type Number
* <p>Controls the type of arrow and position of the popover.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_ANY}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_DOWN}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_LEFT}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_RIGHT}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_UNKNOWN}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_UP}
</ul></p>
* @platform ipad 0.8
*/
/**
* @property allowMultiple
* @type Boolean
* <p>Specifies if the user should be able to select multiple photos.</p>
* @description <p>The allowMultiple property is only available on Android API 18 and above.</p>
* @platform android 6.0.0
*/
/**
* @class CameraMediaItemType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends SuccessResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>A media object from the camera or photo gallery.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded. Returns <code>true</code>.</p>
* @description <p>Returns <code>true</code>.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Will be undefined.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property code
* @type Number
* <p>Error code. Returns 0.</p>
* @description <p>Error code will be 0.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property media
* @type Titanium.Blob
* <p>The media object, as a {@link Titanium.Blob Blob}.</p>
*/
/**
* @property mediaType
* @type String
* <p>The type of media, either <code>MEDIA_TYPE_PHOTO</code>, <code>MEDIA_TYPE_LIVEPHOTO</code> or <code>MEDIA_TYPE_VIDEO</code> defined in {@link Titanium.Media}.</p>
*/
/**
* @property cropRect
* @type CropRectType
* <p>Simple object defining the user's selected crop rectangle, or <code>null</code> if the user has not edited the photo.</p>
*/
/**
* @property previewRect
* @type PreviewRectType
* <p>Simple object defining the preview image size.</p>
* @platform android 0.8
*/
/**
* @property livePhoto
* @type Titanium.UI.iOS.LivePhoto
* <p>The live photo object, as a {@link Titanium.UI.iOS.LivePhoto} and
<code>undefined</code> if no live photo is selected.</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform mobileweb 5.2.0
*/
/**
* @class CropRectType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>Simple object for describing the crop rectangle for an image.</p>
*/
/**
* @property x
* @type Number
* <p>X coordinate of the crop rectangle's upper-left corner.</p>
*/
/**
* @property y
* @type Number
* <p>Y coordinate of the crop rectangle's upper-left corner.</p>
*/
/**
* @property width
* @type Number
* <p>Width of the crop rectangle, in pixels.</p>
*/
/**
* @property height
* @type Number
* <p>Height of the crop rectangle, in pixels.</p>
*/
/**
* @class PreviewRectType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>Simple object for describing the preview image rectangle. This will be undefined when custom camera overlay is not used. </p>
*/
/**
* @property width
* @type Number
* <p>Width preview image, in pixels.</p>
*/
/**
* @property height
* @type Number
* <p>Height preview image, in pixels.</p>
*/
/**
* @class PreviewImageOptions
* @platform android 0.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>Options passed to {@link Titanium.Media#method-previewImage}.</p>
*/
/**
* @property image
* @type Titanium.Blob
* <p>The image to preview. Must be a blob based on a file, such as from {@link Titanium.Filesystem.File#method-read}.</p>
*/
/**
* @property success
* @type Callback<Object>
* <p>Function to be called back if the preview succeeds. No info is passed.</p>
*/
/**
* @property error
* @type Callback<PreviewImageError>
* <p>Function called back if the preview fails. Check the <code>message</code> property of passed back parameter.</p>
*/
/**
* @class PreviewImageError
* @platform android 0.8
* @pseudo
* @extends FailureResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>The parameter passed to the <code>error</code> callback of {@link PreviewImageOptions}.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded. Returns <code>false</code>.</p>
* @description <p>Returns <code>false</code>.</p>
* @platform android 3.1.0
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>May be undefined.</p>
* @platform android 3.1.0
*/
/**
* @property code
* @type Number
* <p>Error code, if applicable.</p>
* @description <p>If the error was generated by the operating system, that system's error value
is used. Otherwise, this value will be -1.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-DEVICE_BUSY}
<li> {@link Titanium.Media#property-NO_CAMERA}
<li> {@link Titanium.Media#property-UNKNOWN_ERROR}
</ul></p>
*/
/**
* @property message
* @type String
* <p>Description of the error.</p>
* @deprecated 3.1.0
*/
/**
* @class ScreenshotResult
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>The parameter passed to the {@link Titanium.Media#method-takeScreenshot} callback.</p>
*/
/**
* @property media
* @type Titanium.Blob
* <p>The screenshot image.</p>
*/
/**
* @class MediaAuthorizationResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @class RequestCameraAccessResult
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @class RequestMusicLibraryAccessResult
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @class RequestPhotoGalleryAccessResult
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>Argument passed to the callback when a request finishes successfully or erroneously.</p>
*/
/**
* @class RouteDescription
* @platform iphone 3.4.2
* @platform ipad 3.4.2
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml
* <p>An Object describing the current audio route.</p>
*/
/**
* @property inputs
* @type Object[]
* <p>An Array of current input ports for the session. See the <code>AUDIO_SESSION_PORT</code> constants.</p>
*/
/**
* @property outputs
* @type Object[]
* <p>An Array of current output ports for the session. See the <code>AUDIO_SESSION_PORT</code> constants.</p>
*/
/**
* @class Titanium.Media.MusicPlayer
* @platform iphone 1.4.0
* @platform ipad 1.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/MusicPlayer.yml
* <p>This object represents a music controller.</p>
* @description <p>A <code>MusicPlayer</code> lets you manage and playback a queue of media {@link Titanium.Media.Item Item} objects.</p>
<p>To retrieve an instance of a MusicPlayer object, use either the
{@link Titanium.Media#property-appMusicPlayer} or the {@link Titanium.Media#property-systemMusicPlayer} property.</p>
<p>Use the {@link Titanium.Media Media} module's {@link Titanium.Media#method-openMusicLibrary openMusicLibrary} and
{@link Titanium.Media#method-queryMusicLibrary queryMusicLibrary} methods to access the media items in the
device's media library.</p>
*/
/**
* @event playingChange
* <p>Fired when the currently playing media item changes.</p>
* @deprecated 3.0.0 Use <Titanium.Media.MusicPlayer.playingchange> instead.
* @description <p>See {@link Titanium.Media.MusicPlayer#property-nowPlaying nowPlaying} to identify the current
media item.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event stateChange
* <p>Fired when the music player's playback state changes.</p>
* @deprecated 3.0.0 Use <Titanium.Media.MusicPlayer.statechange> instead.
* @description <p>See {@link Titanium.Media.MusicPlayer#property-playbackState playbackState} to identify the current
playback state.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event volumeChange
* <p>Fired when the volume changes.</p>
* @deprecated 3.0.0 Use <Titanium.Media.MusicPlayer.volumechange> instead.
* @description <p>This event has been deprecated and renamed volumechange (lower case).</p>
<p>Use the {@link Titanium.Media.MusicPlayer#property-volume volume} property to set or determine
the current volume level for this player.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event playingchange
* <p>Fired when the currently playing media item changes.</p>
* @description <p>See {@link Titanium.Media.MusicPlayer#property-nowPlaying nowPlaying} to identify the current
media item.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @event statechange
* <p>Fired when the music player's playback state changes.</p>
* @description <p>See {@link Titanium.Media.MusicPlayer#property-playbackState playbackState} to identify the current
playback state.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @event volumechange
* <p>Fired when the volume changes.</p>
* @description <p>Use the {@link Titanium.Media.MusicPlayer#property-volume volume} property to set or determine
the current volume level for this player.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method pause
* <p>Pauses playback of the current media item.</p>
*/
/**
* @method play
* <p>Begins playback of the current media item.</p>
*/
/**
* @method seekBackward
* <p>Begins seeking backward in the currently playing media.</p>
* @description <p>Seeking speed increases as seeking continues.</p>
<p>Call {@link Titanium.Media.MusicPlayer#method-stopSeeking stopSeeking} to
return to normal play.</p>
*/
/**
* @method seekForward
* <p>Begins seeking forward in the currently playing media item.</p>
* @description <p>While seeking forward audio plays faster than usual. The speed increases as
seeking continues.</p>
<p>Call {@link Titanium.Media.MusicPlayer#method-stopSeeking stopSeeking} to
return to normal play.</p>
*/
/**
* @method setQueue
* <p>Sets the media queue.</p>
* @description <p>Sets the media queue to a single media item or a list of items.</p>
* @param {Titanium.Media.Item/Array<Titanium.Media.Item>/PlayerQueue} queue
<p>One or more media items.</p>
*/
/**
* @method skipToBeginning
* <p>Skips to the beginning of the currently playing media item.</p>
*/
/**
* @method skipToNext
* <p>Skips to the next media item in the queue.</p>
* @description <p>If there are no more media items in the queue, ends playback.</p>
*/
/**
* @method skipToPrevious
* <p>Skips to the previous media item in the queue.</p>
* @description <p>If there are no previous media items in the queue, ends playback.</p>
*/
/**
* @method stop
* <p>Stops playback of the current media queue.</p>
*/
/**
* @method stopSeeking
* <p>Ends a seek operation and returns to the previous playback state.</p>
<p>See also: {@link Titanium.Media.MusicPlayer#method-seekForward seekForward} and
{@link Titanium.Media.MusicPlayer#method-seekBackward seekBackward}.</p>
*/
/**
* @method getCurrentPlaybackTime
* <p>Gets the value of the {@link Titanium.Media.MusicPlayer#property-currentPlaybackTime} property.</p>
* @returns {Number}
*/
/**
* @method setCurrentPlaybackTime
* <p>Sets the value of the {@link Titanium.Media.MusicPlayer#property-currentPlaybackTime} property.</p>
* @param {Number} currentPlaybackTime
<p>New value for the property.</p>
*/
/**
* @method getNowPlaying
* <p>Gets the value of the {@link Titanium.Media.MusicPlayer#property-nowPlaying} property.</p>
* @returns {Titanium.Media.Item}
*/
/**
* @method getPlaybackState
* <p>Gets the value of the {@link Titanium.Media.MusicPlayer#property-playbackState} property.</p>
* @returns {Number}
*/
/**
* @method getRepeatMode
* <p>Gets the value of the {@link Titanium.Media.MusicPlayer#property-repeatMode} property.</p>
* @returns {Number}
*/
/**
* @method setRepeatMode
* <p>Sets the value of the {@link Titanium.Media.MusicPlayer#property-repeatMode} property.</p>
* @param {Number} repeatMode
<p>New value for the property.</p>
*/
/**
* @method getShuffleMode
* <p>Gets the value of the {@link Titanium.Media.MusicPlayer#property-shuffleMode} property.</p>
* @returns {Number}
*/
/**
* @method setShuffleMode
* <p>Sets the value of the {@link Titanium.Media.MusicPlayer#property-shuffleMode} property.</p>
* @param {Number} shuffleMode
<p>New value for the property.</p>
*/
/**
* @method getVolume
* <p>Gets the value of the {@link Titanium.Media.MusicPlayer#property-volume} property.</p>
* @returns {Number}
*/
/**
* @method setVolume
* <p>Sets the value of the {@link Titanium.Media.MusicPlayer#property-volume} property.</p>
* @param {Number} volume
<p>New value for the property.</p>
*/
/**
* @property currentPlaybackTime
* @type Number
* <p>Current point in song playback, in seconds.</p>
* @description <p>This property is read/write, so you can update the music player's current position
by setting this property.</p>
*/
/**
* @property nowPlaying
* @type Titanium.Media.Item
* @readonly
* <p>An <code>Item</code> object representing the currently playing media item.</p>
*/
/**
* @property playbackState
* @type Number
* @readonly
* <p>Playback state.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MUSIC_PLAYER_STATE_INTERRUPTED}
<li> {@link Titanium.Media#property-MUSIC_PLAYER_STATE_PAUSED}
<li> {@link Titanium.Media#property-MUSIC_PLAYER_STATE_PLAYING}
<li> {@link Titanium.Media#property-MUSIC_PLAYER_STATE_SEEK_BACKWARD}
<li> {@link Titanium.Media#property-MUSIC_PLAYER_STATE_SEEK_FORWARD}
<li> {@link Titanium.Media#property-MUSIC_PLAYER_STATE_STOPPED}
</ul></p>
*/
/**
* @property repeatMode
* @type Number
* <p>Repeat setting.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MUSIC_PLAYER_REPEAT_ALL}
<li> {@link Titanium.Media#property-MUSIC_PLAYER_REPEAT_DEFAULT}
<li> {@link Titanium.Media#property-MUSIC_PLAYER_REPEAT_NONE}
<li> {@link Titanium.Media#property-MUSIC_PLAYER_REPEAT_ONE}
</ul></p>
*/
/**
* @property shuffleMode
* @type Number
* <p>Shuffle setting.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-MUSIC_PLAYER_SHUFFLE_ALBUMS}
<li> {@link Titanium.Media#property-MUSIC_PLAYER_SHUFFLE_DEFAULT}
<li> {@link Titanium.Media#property-MUSIC_PLAYER_SHUFFLE_NONE}
<li> {@link Titanium.Media#property-MUSIC_PLAYER_SHUFFLE_SONGS}
</ul></p>
*/
/**
* @property volume
* @type Number
* <p>Volume level for the music player from 0.0 (muted) to 1.0 (loudest).</p>
* <p> <b>Requires:</b>
iOS 7.0 and earlier
</p>
* @description <p>This property has no effect on devices running iOS 8.0 and later.</p>
<p>This adjusts the volume of the application's session.</p>
<p>The iOS simulator ignores this volume setting. This is a known issue
with Apple's simulator.</p>
*/
/**
* @class PlayerQueue
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/MusicPlayer.yml
* <p>A simple object for specifying a queue of media items.</p>
*/
/**
* @property items
* @type Titanium.Media.Item[]
* <p>An array of media items.</p>
*/
/**
* @class Titanium.Media.Sound
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Sound.yml
* <p>An object for playing basic audio resources.</p>
* @description <p>The <code>Sound</code> object loads the entire media resource in memory before playing. If you need to
support streaming, use the {@link Titanium.Media.AudioPlayer AudioPlayer} API.</p>
<p>You can control how the sound interacts with other system sounds
by setting {@link Titanium.Media#property-audioSessionMode}.</p>
<p>Use the {@link Titanium.Media#method-createSound} method to create a <code>Sound</code> object. You can play audio
in any format supported by the target platform(s), as described in the following documents:</p>
<ul>
<li><a href="http://developer.android.com/guide/appendix/media-formats.html#core">Android</a></li>
<li><a href="https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html#//apple_ref/doc/uid/TP40009767-CH2-SW33">iOS</a></li>
</ul>
* <h3>Examples</h3>
<h4>Simple Example</h4>
<p>Simple example of playing a WAVE file from the Resources directory.</p>
<pre><code>var player = Ti.Media.createSound({url:"sound.wav"});
player.play();
</code></pre>
*/
/**
* @event change
* <p>Fired when the state of the playback changes.</p>
* @description <p>This event can be generated by programmatic events, such as pausing or stopping the audio,
and also by external events, such as the current state of network buffering.</p>
* @param {Number} state
<p>Current state of playback.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media.Sound#property-STATE_BUFFERING}
<li> {@link Titanium.Media.Sound#property-STATE_INITIALIZED}
<li> {@link Titanium.Media.Sound#property-STATE_PAUSED}
<li> {@link Titanium.Media.Sound#property-STATE_PLAYING}
<li> {@link Titanium.Media.Sound#property-STATE_STARTING}
<li> {@link Titanium.Media.Sound#property-STATE_STOPPED}
<li> {@link Titanium.Media.Sound#property-STATE_STOPPING}
<li> {@link Titanium.Media.Sound#property-STATE_WAITING_FOR_DATA}
<li> {@link Titanium.Media.Sound#property-STATE_WAITING_FOR_QUEUE}
</ul></p>
* @param {String} description
<p>Text description of the state of playback.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.2.0
*/
/**
* @event complete
* <p>Fired when the audio has finished playing.</p>
* @param {Boolean} (iphone ipad android) success
<p>Indicates if the sound was played successfully.
Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
* @param {String} (iphone ipad android) error
<p>Error message, if any returned. Will be undefined if <code>success</code> is <code>true</code>.</p>
* @param {Number} (iphone ipad android) code
<p>Error code.
Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event error
* <p>Fired when an error occurs while playing the audio.</p>
* @param {Boolean} (iphone ipad android) success
<p>Indicates a successful operation. Returns <code>false</code>.</p>
* @param {String} (iphone ipad android) error
<p>Error message, if any returned. May be undefined.</p>
* @param {Number} (iphone ipad android) code
<p>Error code.
If the error was generated by the operating system, that system's error value
is used. Otherwise, this value will be -1.</p>
* @param {String} message
<p>Error message. Use the error property instead.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event interrupted
* <p>Fired when audio playback is interrupted by the device.</p>
* @description <p>Typically called during an interruption due to an incoming phone call.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event resume
* <p>Fired when audio playback is resumed after an interruption.</p>
* @param {Boolean} interruption
<p>Indicates if the resume was from an interruption.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method release
* <p>Releases all internal resources.</p>
* @description <p>This is typically unnecessary but can be useful if you load a large audio file in <code>app.js</code>, and
play it only once and you would like to release all resources after your final play to reduce memory.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method isLooping
* <p>Returns the value of the {@link Titanium.Media.Sound#property-looping looping} property.</p>
* @returns {Boolean}
*/
/**
* @method isPaused
* <p>Returns the value of the {@link Titanium.Media.Sound#property-paused paused} property.</p>
* @returns {Boolean}
*/
/**
* @method isPlaying
* <p>Returns the value of the {@link Titanium.Media.Sound#property-playing playing} property.</p>
* @returns {Boolean}
*/
/**
* @method pause
* <p>Pauses the audio.</p>
* @description <p>To restart the audio, call {@link Titanium.Media.Sound#method-play play}.</p>
*/
/**
* @method play
* <p>Starting playing the sound, or resume playing a paused sound.</p>
*/
/**
* @method reset
* <p>Resets the audio playback position to the beginning.</p>
*/
/**
* @method setLooping
* <p>Sets the value of the {@link Titanium.Media.Sound#property-looping looping} property.</p>
* @param {Boolean} looping
<p>New value for the <code>looping</code> property.</p>
*/
/**
* @method setPaused
* <p>Sets the value of the {@link Titanium.Media.Sound#property-paused paused} property.</p>
* @description <p>On iOS, this method can be used to pause and unpause playback. For portability,
it is preferable to use the {@link Titanium.Media.Sound#method-pause pause} and
{@link Titanium.Media.Sound#method-play play} methods instead.</p>
* @param {Boolean} paused
<p>Pass <code>true</code> to pause the current playback temporarily, <code>false</code> to unpause it.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method stop
* <p>Stops playing the audio and resets the playback position to the beginning of the clip.</p>
*/
/**
* @method getDuration
* <p>Gets the value of the {@link Titanium.Media.Sound#property-duration} property.</p>
* @returns {Number}
*/
/**
* @method getTime
* <p>Gets the value of the {@link Titanium.Media.Sound#property-time} property.</p>
* @returns {Number}
*/
/**
* @method setTime
* <p>Sets the value of the {@link Titanium.Media.Sound#property-time} property.</p>
* @param {Number} time
<p>New value for the property.</p>
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.Media.Sound#property-url} property.</p>
* @returns {String}
*/
/**
* @method setUrl
* <p>Sets the value of the {@link Titanium.Media.Sound#property-url} property.</p>
* @param {String} url
<p>New value for the property.</p>
*/
/**
* @method getVolume
* <p>Gets the value of the {@link Titanium.Media.Sound#property-volume} property.</p>
* @returns {Number}
*/
/**
* @method setVolume
* <p>Sets the value of the {@link Titanium.Media.Sound#property-volume} property.</p>
* @param {Number} volume
<p>New value for the property.</p>
*/
/**
* @property [allowBackground=false]
* @type Boolean
* @creationOnly
* <p>Determines whether the audio should continue playing even when its activity is paused.</p>
* @platform android 1.3.0
*/
/**
* @property STATE_BUFFERING
* @type Number
* @readonly
* <p>Audio data is being buffered from the network.</p>
* @platform android 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property STATE_INITIALIZED
* @type Number
* @readonly
* <p>Audio playback is being initialized.</p>
* @platform android 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property STATE_PAUSED
* @type Number
* @readonly
* <p>Playback is paused.</p>
* @platform android 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property STATE_PLAYING
* @type Number
* @readonly
* <p>Audio playback is active.</p>
* @platform android 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property STATE_STARTING
* @type Number
* @readonly
* <p>Audio playback is starting.</p>
* @platform android 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property STATE_STOPPED
* @type Number
* @readonly
* <p>Audio playback is stopped.</p>
* @platform android 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property STATE_STOPPING
* @type Number
* @readonly
* <p>Audio playback is stopping.</p>
* @platform android 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property STATE_WAITING_FOR_DATA
* @type Number
* @readonly
* <p>Player is waiting for audio data from the network.</p>
* @platform android 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property STATE_WAITING_FOR_QUEUE
* @type Number
* @readonly
* <p>Player is waiting for audio data to fill the queue.</p>
* @platform android 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property duration
* @type Number
* @readonly
* <p>Duration of the audio resource.</p>
* @description <p>On iOS, playback time is reported in seconds.</p>
<p>On Android, time is reported in milliseconds.</p>
<p>Android note: Starting from Titanium 3.2.0, the remote audio plays asynchronously. The duration
can only be fetched after the audio is initialized (refer to {@link Titanium.Media.Sound#property-STATE_INITIALIZED}).</p>
*/
/**
* @property [looping=false]
* @type Boolean
* <p>Determines whether the audio should loop upon completion.</p>
*/
/**
* @property paused
* @type Boolean
* <p>Indicates if the audio is paused.</p>
* @description <p>On iOS, this property is read-write, and you can pause and resume playback by setting this
property to <code>true</code> or <code>false</code>.</p>
<p>On Android, this property is read-only. For portability, use {@link Titanium.Media.Sound#method-pause pause}
to pause audio, and {@link Titanium.Media.Sound#method-play play} to resume.</p>
*/
/**
* @property playing
* @type Boolean
* @readonly
* <p>Indicates if the audio is playing.</p>
*/
/**
* @property time
* @type Number
* <p>Current playback position of the audio.</p>
* @description <p>Time is reported in milliseconds.</p>
<p>On iOS, prior to Release 3.0, playback time is reported in seconds.</p>
*/
/**
* @property url
* @type String
* <p>URL identifying the audio resource.</p>
*/
/**
* @property volume
* @type Number
* <p>Volume of the audio from 0.0 (muted) to 1.0 (loudest).</p>
* @description <p>This setting controls the volume of the sound relative to the overall
volume setting for the device.</p>
<p>On iOS, to adjust the volume of the device, set the <code>volume</code> property of
{@link Titanium.Media#property-appMusicPlayer} and set the {@link Titanium.Media#property-audioSessionMode} property
to either {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_SOLO_AMBIENT},
{@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_PLAYBACK},
or {@link Titanium.Media#property-AUDIO_SESSION_CATEGORY_PLAYBACK}.</p>
*/
/**
* @class Titanium.Media.VideoPlayer
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/VideoPlayer.yml
* <p>A native control for playing videos.</p>
* @description <p>The video player is a native view that can be used to play videos, either stored
locally or streamed from a web server. The player can occupy the full screen, or can
be used as a view that can be added to other views.</p>
<p>Use the {@link Titanium.Media#method-createVideoPlayer} method to create a video player.</p>
<p>All platforms support specifying the video content as a URL, either to a local file or
a remote stream. This is done by setting the {@link Titanium.Media.VideoPlayer#property-url url} property.</p>
<h4>iOS Implementation Notes</h4>
<p>On iOS, video content can also be specified as a {@link Titanium.Blob Blob} or
{@link Titanium.Filesystem.File File} object using the
{@link Titanium.Media.VideoPlayer#property-media media} property.</p>
<p>On iOS, a video player can dynamically switch back and forth between fullscreen mode
and standard mode. If the native video controls are displayed, the user can use them
to switch between standard and fullscreen mode. </p>
<h4>Android Implementation Notes</h4>
<p>On Android, the video player cannot switch modes. To create a fullscreen player, you
must specify <code>fullscreen: true</code> when you create the player. This fullscreen player
creates its own Android {@link Titanium.Android.Activity Activity} on top of the activity stack.
Unlike a normal view, this fullscreen video player appears as soon as it is created.
The user can close the player by pressing the <strong>Back</strong> button. See the code examples for
a sample using the fullscreen player on Android.</p>
<p>There are several known issues with clipping on the Android video player. </p>
<ul>
<li><p>When used with <code>scalingMode</code> set to VIDEO_SCALING_ASPECT_FILL or VIDEO_SCALING_NONE,
the video content is not correctly clipped to the boundaries of the view. <br>
(<a href="https://jira.appcelerator.org/browse/TIMOB-7628">TIMOB-7628</a>)</p></li>
<li><p>When a border is set on the view, the video content does not take the border width
into account, so the video content covers the border.
(<a href="https://jira.appcelerator.org/browse/TIMOB-7628">TIMOB-7628</a>)</p></li>
<li><p>If a borderRadius is specified, the video content is not clipped to the rounded
corners. (<a href="https://jira.appcelerator.org/browse/TIMOB-7629">TIMOB-7629</a>)</p></li>
</ul>
<p>On Android, using a video player inside a scroll view is not recommended. When scrolling,
black bars may appear over the video content.</p>
<p>This is because the video player is rendered on a special Android UI element called a SurfaceView.
Android renders the SurfaceView behind the main window and punches a hole in the window
to reveal the video. Because the content of the SurfaceView does not reside in the application
window, the video content cannot be transformed (moved, scaled or rotated) with the window.
This makes it difficult for the content to render properly inside a ScrollView.</p>
* <h3>Examples</h3>
<h4>Simple Video Player Example</h4>
<p>The following code creates a simple video player to play a local video file.</p>
<pre><code>var vidWin = Titanium.UI.createWindow({
title : 'Video View Demo',
backgroundColor : '#fff'
});
var videoPlayer = Titanium.Media.createVideoPlayer({
top : 2,
autoplay : true,
backgroundColor : 'blue',
height : 300,
width : 300,
mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT,
scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT
});
videoPlayer.url = 'movie.mp4';
vidWin.add(videoPlayer);
vidWin.open();
</code></pre><h4>Android Fullscreen Video Player</h4>
<p>The Android fullscreen video player operates differently from other video players.
The following example shows how to create, show, and close a fullscreen video
player. </p>
<p>Note that in this example, a button is included to close the player, to
demonstrate a method for dismissing the player programmatically. In practice, the user
can always dismiss the player by using the <strong>Back</strong> button, so an on-screen
control would not be required.</p>
<pre><code>Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title : 'Test',
backgroundColor : '#fff',
exitOnClose : true
});
// Change to a valid URL
var contentURL = "http://www.example.com/stream.mp4";
var openButton = Ti.UI.createButton({
title : "Start Video",
top : "0dp",
height : "40dp",
left : "10dp",
right : "10dp"
});
openButton.addEventListener('click', function() {
var activeMovie = Titanium.Media.createVideoPlayer({
url : contentURL,
backgroundColor : 'blue',
mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT,
scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FILL,
fullscreen : true,
autoplay : true
});
var closeButton = Ti.UI.createButton({
title : "Exit Video",
top : "0dp",
height : "40dp",
left : "10dp",
right : "10dp"
});
closeButton.addEventListener('click', function() {
activeMovie.hide();
activeMovie.release();
activeMovie = null;
});
activeMovie.add(closeButton);
});
win.add(openButton);
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous simple example as an Alloy view.</p>
<p>simplevideoplayer.xml:</p>
<pre><code><Alloy>
<Window id="vidWin" title="Video View Demo" backgroundColor="#fff">
<VideoPlayer id="videoPlayer" ns="Ti.Media" top="2" url="/movie.mp4"
height="300" width="300" backgroundColor="blue" autoplay="true" />
</Window>
</Alloy>
</code></pre>
*/
/**
* @event longclick
* @hide
* <p>Fired when the device detects a long click.</p>
* @description <p>A long click is generated by touching and holding on the touchscreen or holding down the
trackball button. </p>
<p>The event occurs before the finger/button is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>As the trackball can fire this event, it is not intended to return the <code>x</code> and <code>y</code>
coordinates of the touch, even when it is generated by the touchscreen. </p>
<p>A <code>longclick</code> blocks a <code>click</code>, meaning that a <code>click</code> event will not fire when a
<code>longclick</code> listener exists.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchmove
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchcancel
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchend
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch events,
so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform mobileweb 1.8
*/
/**
* @event click
* <p>Fired when the device detects a click against the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform mobileweb 1.8
*/
/**
* @event singletap
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform mobileweb 1.8
*/
/**
* @event focus
* @hide
* <p>Fired when the view element gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event complete
* <p>Fired when movie playback ends or a user exits playback.</p>
* @description <p>On iOS, the <code>reason</code> property is only included if this information is available.</p>
* @param {Number} reason
<p>Reason that playback ended.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_FINISH_REASON_PLAYBACK_ENDED}
<li> {@link Titanium.Media#property-VIDEO_FINISH_REASON_PLAYBACK_ERROR}
<li> {@link Titanium.Media#property-VIDEO_FINISH_REASON_USER_EXITED}
</ul></p>
* @param {Boolean} (iphone ipad android) success
<p>Indicates if the video was played successfully. User exit counts as a success.
Returns <code>true</code> if <code>reason</code> is not
{@link Titanium.Media#property-VIDEO_FINISH_REASON_PLAYBACK_ERROR VIDEO_FINISH_REASON_PLAYBACK_ERROR},
<code>false</code> otherwise.</p>
* @param {String} (iphone ipad android) error
<p>Error message, if any returned. Will be undefined if <code>success</code> is <code>true</code>.</p>
* @param {Number} (iphone ipad android) code
<p>Error code.
Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event durationAvailable
* <p>Fired when the video duration is available.</p>
* @deprecated 3.0.0 Use <Titanium.Media.VideoPlayer.durationavailable> instead.
* @param {Number} duration
<p>Video duration, in milliseconds.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event durationavailable
* <p>Fired when the video duration is available.</p>
* @param {Number} duration
<p>Video duration, in milliseconds.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
*/
/**
* @event error
* <p>Fired when movie playback encounters an error.</p>
* @param {String} message
<p>Reason for error as a string.</p>
* @param {Boolean} (android) success
<p>Indicates a successful operation. Returns <code>false</code>.</p>
* @param {String} (android) error
<p>Error message, if any returned. May be undefined.</p>
* @param {Number} (android) code
<p>Error code.
If the error was generated by the operating system, that system's error value
is used. Otherwise, this value will be -1.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform mobileweb 1.8
*/
/**
* @event fullscreen
* <p>Fired when a movie changes to or from fullscreen view.</p>
* @description <p>On iOS, this event is fired at the beginning of the transition to
fullscreen mode. A <code>duration</code> property is provided, indicating the duration
of the animated transition to or from fullscreen mode.</p>
* @param {Boolean} entering
<p><code>true</code> if the player is entering fullscreen mode, <code>false</code> if it is leaving
fullscreen mode.</p>
* @param {Number} (iphone ipad) duration
<p>Duration of the animated transition to or from fullscreen mode, in seconds.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event load
* <p>Fired when the movie play loads.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event loadstate
* <p>Fired when the network {@link Titanium.Media.VideoPlayer#property-loadState loadState} changes.</p>
* @param {Number} loadState
<p>Current value of the {@link Titanium.Media.VideoPlayer#property-loadState loadState} property.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event mediaTypesAvailable
* <p>Fired when the media types in the current movie are determined.</p>
* @deprecated 3.0.0 Use <Titanium.Media.VideoPlayer.mediatypesavailable> instead.
* @param {Number} mediaTypes
<p>Current value of the {@link Titanium.Media.VideoPlayer#property-mediaTypes mediaTypes} property.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event naturalSizeAvailable
* <p>Fired when the natural size of the current movie is determined.</p>
* @deprecated 3.0.0 Use <Titanium.Media.VideoPlayer.naturalsizeavailable> instead.
* @description <p>On iOS 6.0, this event is not fired by the operating system.</p>
* @param {Number} naturalSize
<p>Current value of the {@link Titanium.Media.VideoPlayer#property-naturalSize naturalSize} property.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event playbackState
* <p>Fired when the {@link Titanium.Media.VideoPlayer#property-playbackState playbackState} changes.</p>
* @deprecated 3.0.0 Use <Titanium.Media.VideoPlayer.playbackstate> instead.
* @param {Number} playbackState
<p>Current value of the {@link Titanium.Media.VideoPlayer#property-playbackState playbackState} property.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_INTERRUPTED}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_PAUSED}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_PLAYING}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_SEEKING_BACKWARD}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_SEEKING_FORWARD}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_STOPPED}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event mediatypesavailable
* <p>Fired when the media types in the current movie are determined.</p>
* @param {Number} mediaTypes
<p>Current value of the {@link Titanium.Media.VideoPlayer#property-mediaTypes mediaTypes} property.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_MEDIA_TYPE_AUDIO}
<li> {@link Titanium.Media#property-VIDEO_MEDIA_TYPE_NONE}
<li> {@link Titanium.Media#property-VIDEO_MEDIA_TYPE_VIDEO}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @event naturalsizeavailable
* <p>Fired when the natural size of the current movie is determined.</p>
* @description <p>On iOS 6.0, this event is not fired by the operating system.</p>
* @param {Number} naturalSize
<p>Current value of the {@link Titanium.Media.VideoPlayer#property-naturalSize naturalSize} property.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @event playbackstate
* <p>Fired when the {@link Titanium.Media.VideoPlayer#property-playbackState playbackState} changes.</p>
* @param {Number} playbackState
<p>Current value of the {@link Titanium.Media.VideoPlayer#property-playbackState playbackState} property.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_INTERRUPTED}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_PAUSED}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_PLAYING}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_SEEKING_BACKWARD}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_SEEKING_FORWARD}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_STOPPED}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
*/
/**
* @event playing
* <p>Fired when the currently playing movie changes.</p>
* @param {String} url
<p>URL of the media.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event preload
* <p>Fired when the movie has preloaded and is ready to play.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform mobileweb 1.8
*/
/**
* @event resize
* <p>Fired when the movie player is resized.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event sourceChange
* <p>Fired when the {@link Titanium.Media.VideoPlayer#property-sourceType sourceType} property
changes.</p>
* @deprecated 3.0.0 Use <Titanium.Media.VideoPlayer.sourcechange> instead.
* @param {String} sourceType
<p>New <code>sourceType</code> value.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event sourcechange
* <p>Fired when the {@link Titanium.Media.VideoPlayer#property-sourceType sourceType} property
changes.</p>
* @param {String} sourceType
<p>New <code>sourceType</code> value.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_SOURCE_TYPE_FILE}
<li> {@link Titanium.Media#property-VIDEO_SOURCE_TYPE_STREAMING}
<li> {@link Titanium.Media#property-VIDEO_SOURCE_TYPE_UNKNOWN}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method cancelAllThumbnailImageRequests
* <p>Cancels all pending asynchronous thumbnail requests.</p>
* @description <p>Asynchronous thumbnail requests initiated with
{@link Titanium.Media.VideoPlayer#method-requestThumbnailImagesAtTimes requestThumbnailImagesAtTimes}.</p>
* @platform android 3.6.0
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method release
* <p>Releases the internal video resources immediately.</p>
* @description <p>This is not usually necessary but can help if you no longer need to use the player after
it is used to help converse memory.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method requestThumbnailImagesAtTimes
* <p>Asynchronously request thumbnail images for one or more points in time in the video.</p>
* @description <p>The <code>times</code> parameter specifies an array of time values, in
<strong>seconds</strong>. For each time value, the platform generates an image
representing the video at that point in time.</p>
<p>The callback function is invoked when a thumbnail is available.</p>
<p>Calling this method will cancel all pending asynchronous thumbnail requests.</p>
* @param {Array<Number>} times
<p>Array of time values, representing offsets into the video, in seconds.</p>
* @param {Number} option
<p>Video time precision.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_TIME_OPTION_EXACT}
<li> {@link Titanium.Media#property-VIDEO_TIME_OPTION_NEAREST_KEYFRAME}
<li> {@link Titanium.Media#property-VIDEO_TIME_OPTION_CLOSEST_SYNC}
<li> {@link Titanium.Media#property-VIDEO_TIME_OPTION_NEXT_SYNC}
<li> {@link Titanium.Media#property-VIDEO_TIME_OPTION_PREVIOUS_SYNC}
</ul></p>
* @param {Callback<ThumbnailResponse>} callback
<p>Callback to invoke when a thumbnail is available.</p>
* @platform android 3.6.0
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method thumbnailImageAtTime
* <p>Returns a thumbnail image for the video at the specified time.</p>
* @removed 3.6.0 Use <Titanium.Media.VideoPlayer.mediaControlStyle> instead.
* @param {Number} time
<p>Playback time, in <strong>seconds</strong>.</p>
* @param {Number} option
<p>Video time precision.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_TIME_OPTION_EXACT}
<li> {@link Titanium.Media#property-VIDEO_TIME_OPTION_NEAREST_KEYFRAME}
<li> {@link Titanium.Media#property-VIDEO_TIME_OPTION_CLOSEST_SYNC}
<li> {@link Titanium.Media#property-VIDEO_TIME_OPTION_NEXT_SYNC}
<li> {@link Titanium.Media#property-VIDEO_TIME_OPTION_PREVIOUS_SYNC}
</ul></p>
* @returns {Titanium.Blob}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method pause
* <p>Pauses playing the video.</p>
*/
/**
* @method play
* <p>Starts playing the video.</p>
*/
/**
* @method stop
* <p>Stops playing the video.</p>
*/
/**
* @method getAllowsAirPlay
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-allowsAirPlay} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setAllowsAirPlay
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-allowsAirPlay} property.</p>
* @param {Boolean} allowsAirPlay
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundView
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-backgroundView} property.</p>
* @returns {Titanium.UI.View}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundView
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-backgroundView} property.</p>
* @param {Titanium.UI.View} backgroundView
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getContentURL
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-contentURL} property.</p>
* @removed 3.0.0 Use <Titanium.Media.VideoPlayer.url> instead.
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setContentURL
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-contentURL} property.</p>
* @removed 3.0.0 Use <Titanium.Media.VideoPlayer.url> instead.
* @param {String} contentURL
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getFullscreen
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-fullscreen} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setFullscreen
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-fullscreen} property.</p>
* @param {Boolean} fullscreen
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getInitialPlaybackTime
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-initialPlaybackTime} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setInitialPlaybackTime
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-initialPlaybackTime} property.</p>
* @param {Number} initialPlaybackTime
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getLoadState
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-loadState} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getMediaControlStyle
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-mediaControlStyle} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setMediaControlStyle
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-mediaControlStyle} property.</p>
* @param {Number} mediaControlStyle
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getMediaTypes
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-mediaTypes} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setMediaTypes
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-mediaTypes} property.</p>
* @param {Number} mediaTypes
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getMovieControlMode
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-movieControlMode} property.</p>
* @removed 6.0.0 Use <Titanium.Media.VideoPlayer.mediaControlStyle> instead.
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setMovieControlMode
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-movieControlMode} property.</p>
* @removed 6.0.0 Use <Titanium.Media.VideoPlayer.mediaControlStyle> instead.
* @param {Number} movieControlMode
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getNaturalSize
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-naturalSize} property.</p>
* @returns {MovieSize}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setNaturalSize
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-naturalSize} property.</p>
* @param {MovieSize} naturalSize
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getScalingMode
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-scalingMode} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setScalingMode
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-scalingMode} property.</p>
* @param {Number} scalingMode
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getSourceType
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-sourceType} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setSourceType
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-sourceType} property.</p>
* @param {Number} sourceType
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getUseApplicationAudioSession
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-useApplicationAudioSession} property.</p>
* @deprecated 3.5.0 There is no replacement for this property and its use is discouraged.
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setUseApplicationAudioSession
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-useApplicationAudioSession} property.</p>
* @deprecated 3.5.0 There is no replacement for this property and its use is discouraged.
* @param {Boolean} useApplicationAudioSession
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getAutoplay
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-autoplay} property.</p>
* @returns {Boolean}
*/
/**
* @method setAutoplay
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-autoplay} property.</p>
* @param {Boolean} autoplay
<p>New value for the property.</p>
*/
/**
* @method getCurrentPlaybackTime
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-currentPlaybackTime} property.</p>
* @returns {Number}
*/
/**
* @method setCurrentPlaybackTime
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-currentPlaybackTime} property.</p>
* @param {Number} currentPlaybackTime
<p>New value for the property.</p>
*/
/**
* @method getDuration
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-duration} property.</p>
* @returns {Number}
*/
/**
* @method setDuration
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-duration} property.</p>
* @param {Number} duration
<p>New value for the property.</p>
*/
/**
* @method getEndPlaybackTime
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-endPlaybackTime} property.</p>
* @returns {Number}
*/
/**
* @method setEndPlaybackTime
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-endPlaybackTime} property.</p>
* @param {Number} endPlaybackTime
<p>New value for the property.</p>
*/
/**
* @method setMedia
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-media} property.</p>
* @param {Titanium.Blob/Titanium.Filesystem.File/String} media
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getPlayableDuration
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-playableDuration} property.</p>
* @returns {Number}
*/
/**
* @method getPlaybackState
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-playbackState} property.</p>
* @returns {Number}
*/
/**
* @method getPlaying
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-playing} property.</p>
* @returns {Boolean}
*/
/**
* @method getRepeatMode
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-repeatMode} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setRepeatMode
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-repeatMode} property.</p>
* @param {Number} repeatMode
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-url} property.</p>
* @returns {String/String[]}
*/
/**
* @method setUrl
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-url} property.</p>
* @param {String/Array<String>} url
<p>New value for the property.</p>
*/
/**
* @method getVolume
* <p>Gets the value of the {@link Titanium.Media.VideoPlayer#property-volume} property.</p>
* @returns {Number}
* @platform iphone 2.1
* @platform ipad 2.1
* @platform windowsphone 4.1.0
*/
/**
* @method setVolume
* <p>Sets the value of the {@link Titanium.Media.VideoPlayer#property-volume} property.</p>
* @param {Number} volume
<p>New value for the property.</p>
* @platform iphone 2.1
* @platform ipad 2.1
* @platform windowsphone 4.1.0
*/
/**
* @property allowsAirPlay
* @type Boolean
* <p>Whether or not the current movie can be played on a remote device.</p>
* <p> <b>Requires:</b>
iOS 4.3 and later
</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property backgroundView
* @type Titanium.UI.View
* <p>Sets the background view for customization which is always displayed behind movie content.</p>
* @description <p>To create a background behind the movie content on iOS, you can specify a
background view. On iOS, you can set the <code>backgroundColor</code> property directly on
the video player, but not a background image or background gradient. For this kind
of effect, specify a background view. </p>
<p>Note that the background view must be sized explicitly: percentage sizes do not work properly.</p>
<p>The following code sample creates a video player with a background image:</p>
<pre><code>var videoPlayer = Ti.Media.createVideoPlayer({
height : 300,
width : 300,
backgroundView : Ti.UI.createView({
backgroundImage: 'videoPlayerBG.png
width : 300,
height : 300
}),
borderRadius : 20,
borderWidth : 2,
borderColor : 'blue',
});
</code></pre>
<p>Note that if {@link Titanium.Media.VideoPlayer#property-scalingMode scalingMode} is set to
{@link Titanium.Media#property-VIDEO_SCALING_MODE_FILL VIDEO_SCALING_MODE_FILL} or
{@link Titanium.Media#property-VIDEO_SCALING_ASPECT_FILL VIDEO_SCALING_ASPECT_FILL},
the playing video will fill the entire video player area, obscuring any background
view.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property contentURL
* @type String
* <p>URL of the media to play.</p>
* @removed 3.0.0 Use <Titanium.Media.VideoPlayer.url> instead.
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [fullscreen=false]
* @type Boolean
* <p>Determines if the movie is presented in the entire screen (obscuring all other application content). </p>
* @description <p>Note that this must be set at different times on different platforms:</p>
<p>On iOS, setting this property to <code>true</code> before the movie player's view is visible
has no effect. </p>
<p>On Android, this property must be set at creation time. For example:</p>
<pre><code>var player = Ti.Media.createVideoPlayer({fullscreen: true});
</code></pre>
<p>On Android, setting this value to <code>true</code> means that the video will have its own Android Activity
rather than being embedded as a view. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property initialPlaybackTime
* @type Number
* <p>The start time of movie playback, in milliseconds.</p>
* @description <p>Defaults to NaN in iOS and 0 in Android, indicating the natural start time of the movie.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property loadState
* @type Number
* @readonly
* <p>Returns the network load state of the movie player.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [mediaControlStyle=System default video controls ({@link Titanium.Media#property-VIDEO_CONTROL_DEFAULT}).]
* @type Number
* <p>The style of the playback controls.</p>
* @description <p>Mobile web only supports {@link Titanium.Media#property-VIDEO_CONTROL_NONE} and
{@link Titanium.Media#property-VIDEO_CONTROL_DEFAULT}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_CONTROL_DEFAULT}
<li> {@link Titanium.Media#property-VIDEO_CONTROL_EMBEDDED}
<li> {@link Titanium.Media#property-VIDEO_CONTROL_FULLSCREEN}
<li> {@link Titanium.Media#property-VIDEO_CONTROL_HIDDEN}
<li> {@link Titanium.Media#property-VIDEO_CONTROL_NONE}
<li> {@link Titanium.Media#property-VIDEO_CONTROL_VOLUME_ONLY}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property mediaTypes
* @type Number
* <p>The types of media in the movie, or {@link Titanium.Media#property-VIDEO_MEDIA_TYPE_NONE} if not known.</p>
* @description <p>A movie can contain video
({@link Titanium.Media#property-VIDEO_MEDIA_TYPE_VIDEO VIDEO_MEDIA_TYPE_VIDEO}),
audio, ({@link Titanium.Media#property-VIDEO_MEDIA_TYPE_AUDIO VIDEO_MEDIA_TYPE_AUDIO}), or both.</p>
<p>A movie with both audio and video media is represented by a bitwise OR of the two
constants:</p>
<pre><code>Titanium.Media.VIDEO_MEDIA_TYPE_VIDEO|Titanium.Media.VIDEO_MEDIA_TYPE_AUDIO
</code></pre>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_MEDIA_TYPE_AUDIO}
<li> {@link Titanium.Media#property-VIDEO_MEDIA_TYPE_NONE}
<li> {@link Titanium.Media#property-VIDEO_MEDIA_TYPE_VIDEO}
</ul></p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [movieControlMode={@link Titanium.Media#property-VIDEO_CONTROL_DEFAULT}]
* @type Number
* <p>Style of the media playback controls.</p>
* @removed 6.0.0 Use <Titanium.Media.VideoPlayer.mediaControlStyle> instead.
* <p> <b>Requires:</b>
iOS 3.1 and earlier
</p>
* @description <p>Provides the ability to set the control mode of the movie player. </p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property naturalSize
* @type MovieSize
* <p>Returns the natural size of the movie.</p>
* @description <p>Returns a dictionary with properties <code>width</code> and <code>height</code>. Returns 0 for both properties if not
known or applicable. </p>
<p>The {@link Titanium.Media.VideoPlayer#event-naturalSizeAvailable naturalSizeAvailable} event is
fired when the natural size is known.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [scalingMode={@link Titanium.Media#property-VIDEO_SCALING_ASPECT_FIT}]
* @type Number
* <p>Determines how the content scales to fit the view.</p>
* @description <p>Mobile web only supports
{@link Titanium.Media#property-VIDEO_SCALING_NONE} and {@link Titanium.Media#property-VIDEO_SCALING_ASPECT_FIT}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_SCALING_ASPECT_FILL}
<li> {@link Titanium.Media#property-VIDEO_SCALING_ASPECT_FIT}
<li> {@link Titanium.Media#property-VIDEO_SCALING_MODE_FILL}
<li> {@link Titanium.Media#property-VIDEO_SCALING_NONE}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [sourceType=Titanium.Media.VIDEO_SOURCE_TYPE_UNKNOWN]
* @type Number
* <p>The playback type of the movie.</p>
* @description <p>Specifying a playback type before playing the movie can result in faster load times.</p>
<p>The {@link Titanium.Media.VideoPlayer#event-sourceChange sourceChange} event is fired when
movie's source type is determined.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_SOURCE_TYPE_FILE}
<li> {@link Titanium.Media#property-VIDEO_SOURCE_TYPE_STREAMING}
<li> {@link Titanium.Media#property-VIDEO_SOURCE_TYPE_UNKNOWN}
</ul></p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [useApplicationAudioSession=true]
* @type Boolean
* <p>Indicates if the movie player should inherit the application's audio session
instead of creating a new session.</p>
* @deprecated 3.5.0 There is no replacement for this property and its use is discouraged.
* <p> <b>Requires:</b>
iOS 6.0 and earlier
</p>
* @description <p>Creating a new session interrupts the application's session.</p>
<p>Setting this property during playback will not take effect until playback is stopped
and started again.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [autoplay=true]
* @type Boolean
* <p>Indicates if a movie should automatically start playback.</p>
* @description <p>On iOS, playback starts automatically if <code>autoplay</code> is <code>true</code> <em>and</em> the movie is likely to
finish uninterrupted. The OS determines whether the movie is likely to finish
uninterrupted based on factors including the bit rate of the movie and network
conditions (if the movie is being streamed from a remote source).</p>
*/
/**
* @property currentPlaybackTime
* @type Number
* <p>Current playback time of the current movie in milliseconds.</p>
*/
/**
* @property duration
* @type Number
* <p>The duration of the current movie in milliseconds, or 0.0 if not known.</p>
* @description <p>The duration of the movie may not be available when playback is started. The
{@link Titanium.Media.VideoPlayer#event-durationavailable durationavailable} event is
fired when the duration is known.</p>
*/
/**
* @property endPlaybackTime
* @type Number
* <p>The end time of movie playback, in milliseconds.</p>
* @description <p>On iOS, defaults to NaN, which indicates natural end time of the movie.
Changing the value to a value less than <code>duration</code> causes the movie to
stop playing at the specified point. On iOS, this value is not applicable to
streaming media, so NaN is returned if the current media is being streamed.</p>
<p>On Android, this is always the same as {@link Titanium.Media.VideoPlayer#property-duration duration}
(the natural end time), and changing the value has no effect.</p>
*/
/**
* @property media
* @type Titanium.Blob/Titanium.Filesystem.File/String
* @writeonly
* <p>Media object to play, as either a <code>File</code>, a <code>Blob</code>, or a URL.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property playableDuration
* @type Number
* @readonly
* <p>Currently playable duration of the movie, in milliseconds, for progressively
downloaded network content, or 0.0 if not known.</p>
* @description <p>On Android, this is always the same as {@link Titanium.Media.VideoPlayer#property-duration duration}.</p>
*/
/**
* @property playbackState
* @type Number
* @readonly
* <p>Current playback state of the video player.</p>
* @description <p>One of the <code>VIDEO_PLAYBACK_STATE</code> constants defined in {@link Titanium.Media}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_INTERRUPTED}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_PAUSED}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_PLAYING}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_SEEKING_BACKWARD}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_SEEKING_FORWARD}
<li> {@link Titanium.Media#property-VIDEO_PLAYBACK_STATE_STOPPED}
</ul></p>
*/
/**
* @property playing
* @type Boolean
* @readonly
* <p>Boolean to indicate if the player has started playing.</p>
*/
/**
* @property [repeatMode=Titanium.Media.VIDEO_REPEAT_MODE_NONE]
* @type Number
* <p>Determines how the movie player repeats when reaching the end of playback.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Media#property-VIDEO_REPEAT_MODE_NONE}
<li> {@link Titanium.Media#property-VIDEO_REPEAT_MODE_ONE}
</ul></p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property url
* @type String/String[]
* <p>URL of the media to play.</p>
* @description <p>URL identifying a local or remote video to play.</p>
<p>On Mobile Web, video format support depends on the web browser. You can specify an
array of URLs to videos of different formats. The web browser will select the first
video URL in the array that it is able to play. This is not supported on iOS and Android.</p>
*/
/**
* @property [volume=1]
* @type Number
* <p>Volume of the audio portion of the video. </p>
* @description <p>On iOS, this adjusts the volume of the application's session as well, and will
not work if useApplicationAudioSession has been set false. On the iOS device,
setting this will be accompanied by an OS-provided indicator. However, the iOS
simulator does not honor this volume setting, and is a known issue with Apple's
simulator.</p>
* @platform iphone 2.1
* @platform ipad 2.1
* @platform windowsphone 4.1.0
*/
/**
* @class ThumbnailResponse
* @platform android 3.6.0
* @platform iphone 0.8
* @platform ipad 0.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/VideoPlayer.yml
* <p>Simple object passed to the thumbnail callback in response to the
{@link Titanium.Media.VideoPlayer#method-requestThumbnailImagesAtTimes requestThumbnailImagesAtTimes}
method.</p>
* @description <p>The callback is invoked when a movie thumbnail is available.</p>
*/
/**
* @property code
* @type Number
* <p>Error code. Returns 0 if <code>success</code> is <code>true</code>.</p>
* @description <p>Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @platform android 3.6.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property image
* @type Titanium.Blob
* <p>Thumbnail image, as a <code>Blob</code>.</p>
*/
/**
* @property time
* @type Number
* <p>Time offset for the thumbnail, in seconds.</p>
*/
/**
* @class MovieSize
* @platform iphone 0.8
* @platform ipad 0.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/VideoPlayer.yml
* <p>Simple object used to describe the size of a movie.</p>
*/
/**
* @property width
* @type Number
* <p>Width of the movie.</p>
*/
/**
* @property height
* @type Number
* <p>Height of the movie.</p>
*/
/**
* @class Titanium.Network.BonjourBrowser
* @platform iphone 1.2.0
* @platform ipad 1.2.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/BonjourBrowser.yml
* <p>A browser for the discovery and retrieval of Bonjour services available on the network.</p>
* @description <p>Use the {@link Titanium.Network#method-createBonjourBrowser} method to create a <code>BonjourBrowser</code> instance.</p>
<p>If your application publishes Bonjour services itself, that service will be discovered
by the browser if necessary; be prepared to perform a check if you do not want to list
local services as available. Bonjour service browsing is an asynchronous operation,
meaning that you should be extremely careful when caching values from the <code>services</code>
property returned by the <code>updatedServices</code> event. In particular, if you maintain a
local copy of available services and a user tries to connect to one, you should be prepared
to handle failures gracefully; the next <code>updatedServices</code> event should provide the new
services list, but you should not rely on it being delivered before user input. When
a window which uses Bonjour browsing is closed, if you do not want to continue searching,
you must call the stop() method.</p>
*/
/**
* @event updatedServices
* <p>Fired when the discovered services list is updated</p>
* @deprecated 3.0.0 Renamed to [updatedservices](Titanium.Network.BonjourBrowser.updatedservices)
(all lowercase).
* @param {String} services
<p>An array of BonjourService objects corresponding to currently available services. If you cache this value, including using it as table data, be aware that it could become out of date at any time due to the asynchronous nature of Bonjour service discovery.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event updatedservices
* <p>Fired when the discovered services list is updated</p>
* @param {String} services
<p>An array of BonjourService objects corresponding to currently available services. If you cache this value, including using it as table data, be aware that it could become out of date at any time due to the asynchronous nature of Bonjour service discovery.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method search
* <p>Conduct a search for Bonjour services matching the type and domain specified during creation</p>
*/
/**
* @method stopSearch
* <p>Halt an ongoing search</p>
*/
/**
* @method getDomain
* <p>Gets the value of the {@link Titanium.Network.BonjourBrowser#property-domain} property.</p>
* @returns {String}
*/
/**
* @method setDomain
* <p>Sets the value of the {@link Titanium.Network.BonjourBrowser#property-domain} property.</p>
* @param {String} domain
<p>New value for the property.</p>
*/
/**
* @method getIsSearching
* <p>Gets the value of the {@link Titanium.Network.BonjourBrowser#property-isSearching} property.</p>
* @returns {Boolean}
*/
/**
* @method setIsSearching
* <p>Sets the value of the {@link Titanium.Network.BonjourBrowser#property-isSearching} property.</p>
* @param {Boolean} isSearching
<p>New value for the property.</p>
*/
/**
* @method getServiceType
* <p>Gets the value of the {@link Titanium.Network.BonjourBrowser#property-serviceType} property.</p>
* @returns {String}
*/
/**
* @method setServiceType
* <p>Sets the value of the {@link Titanium.Network.BonjourBrowser#property-serviceType} property.</p>
* @param {String} serviceType
<p>New value for the property.</p>
*/
/**
* @property domain
* @type String
* <p>The domain the browser is searching in</p>
*/
/**
* @property isSearching
* @type Boolean
* <p>Whether or not the browser is currently searching</p>
*/
/**
* @property serviceType
* @type String
* <p>The type of the service the browser searches for</p>
*/
/**
* @class Titanium.Network.BonjourService
* @platform iphone 1.2.0
* @platform ipad 1.2.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/BonjourService.yml
* <p>Describes a service on the network which is published by Bonjour.</p>
* @description <p>You can obtain a <code>BonjourService</code> instance by calling {@link Titanium.Network#method-createBonjourService}
or from the <code>service</code> list from a {@link Titanium.Network.BonjourBrowser BonjourBrowser} <br>
<code>updatedServices</code> event. </p>
<p>You can only publish Bonjour services attached to a socket which is currently listening;
you cannot publish a service for a remotely connected socket. If you stop the Bonjour
service and wish to close the socket it uses, it is strongly recommended that you stop
the service first. When a window which publishes a Bonjour service is closed, you must
stop the service if the associated socket is also to be closed, or if it is no longer
necessary to publish. Unlike other network operations, Bonjour service resolution and
publishing is synchronous, so be aware that your code may block while resolution is going
on. In particular, you may wish to display UI elements indicating background activity
before beginning resolution.</p>
*/
/**
* @method publish
* <p>Publish a Bonjour service to the network. Only works if isLocal is TRUE</p>
* @param {Object} socket
<p>a TCPSocket object to associate with the Bonjour service.</p>
*/
/**
* @method resolve
* <p>Resolve a Bonjour service from the network. Must be done before attempting to access the service's socket information, if a remote service. You cannot resolve a locally published service.</p>
* @param {Number} timeout
<p>the timeout for service resolution, in seconds. Optional, default is 120s.</p>
*/
/**
* @method stop
* <p>Halts publication of a service.</p>
*/
/**
* @method getDomain
* <p>Gets the value of the {@link Titanium.Network.BonjourService#property-domain} property.</p>
* @returns {String}
*/
/**
* @method setDomain
* <p>Sets the value of the {@link Titanium.Network.BonjourService#property-domain} property.</p>
* @param {String} domain
<p>New value for the property.</p>
*/
/**
* @method getIsLocal
* <p>Gets the value of the {@link Titanium.Network.BonjourService#property-isLocal} property.</p>
* @returns {Boolean}
*/
/**
* @method setIsLocal
* <p>Sets the value of the {@link Titanium.Network.BonjourService#property-isLocal} property.</p>
* @param {Boolean} isLocal
<p>New value for the property.</p>
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.Network.BonjourService#property-name} property.</p>
* @returns {String}
*/
/**
* @method setName
* <p>Sets the value of the {@link Titanium.Network.BonjourService#property-name} property.</p>
* @param {String} name
<p>New value for the property.</p>
*/
/**
* @method getSocket
* <p>Gets the value of the {@link Titanium.Network.BonjourService#property-socket} property.</p>
* @returns {Object}
*/
/**
* @method setSocket
* <p>Sets the value of the {@link Titanium.Network.BonjourService#property-socket} property.</p>
* @param {Object} socket
<p>New value for the property.</p>
*/
/**
* @method getType
* <p>Gets the value of the {@link Titanium.Network.BonjourService#property-type} property.</p>
* @returns {String}
*/
/**
* @method setType
* <p>Sets the value of the {@link Titanium.Network.BonjourService#property-type} property.</p>
* @param {String} type
<p>New value for the property.</p>
*/
/**
* @property domain
* @type String
* <p>the domain of the service</p>
*/
/**
* @property isLocal
* @type Boolean
* <p>whether or not the service is local to the device</p>
*/
/**
* @property name
* @type String
* <p>the name of the service</p>
*/
/**
* @property socket
* @type Object
* <p>the TCPSocket object that is used to connect to the service</p>
*/
/**
* @property type
* @type String
* <p>the type of the service</p>
*/
/**
* @class Titanium.Network.Cookie
* @platform android 3.2.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Cookie.yml
* <p>Cookie object used to manage the system cookie store and HTTP client cookie store.</p>
* @description <p>Use {@link Titanium.Network#method-createCookie} to create a new <code>Cookie</code> object.</p>
*/
/**
* @method isValid
* <p>Returns true if the cookie is valid.</p>
* @description <p>This method checks if the cookie is valid. For a cookie to be valid the minimum
properties requiered are <code>name</code>, <code>value</code>, <code>path</code> and either <code>domain</code> or <code>originalUrl</code></p>
* @returns {Boolean}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
* @method getComment
* <p>Gets the value of the {@link Titanium.Network.Cookie#property-comment} property.</p>
* @returns {String}
*/
* @method setComment
* <p>Sets the value of the {@link Titanium.Network.Cookie#property-comment} property.</p>
* @param {String} comment
<p>New value for the property.</p>
*/
/**
* @method getDomain
* <p>Gets the value of the {@link Titanium.Network.Cookie#property-domain} property.</p>
* @returns {String}
*/
/**
* @method setDomain
* <p>Sets the value of the {@link Titanium.Network.Cookie#property-domain} property.</p>
* @param {String} domain
<p>New value for the property.</p>
*/
/**
* @method getExpiryDate
* <p>Gets the value of the {@link Titanium.Network.Cookie#property-expiryDate} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setExpiryDate
* <p>Sets the value of the {@link Titanium.Network.Cookie#property-expiryDate} property.</p>
* @param {String} expiryDate
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getMaxAge
* <p>Gets the value of the {@link Titanium.Network.Cookie#property-maxAge} property.</p>
* @returns {Number}
* @platform android 5.0.0
*/
/**
* @method setMaxAge
* <p>Sets the value of the {@link Titanium.Network.Cookie#property-maxAge} property.</p>
* @param {Number} maxAge
<p>New value for the property.</p>
* @platform android 5.0.0
*/
/**
* @method getHttponly
* <p>Gets the value of the {@link Titanium.Network.Cookie#property-httponly} property.</p>
* @returns {Boolean}
*/
/**
* @method setHttponly
* <p>Sets the value of the {@link Titanium.Network.Cookie#property-httponly} property.</p>
* @param {Boolean} httponly
<p>New value for the property.</p>
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.Network.Cookie#property-name} property.</p>
* @returns {String}
*/
/**
* @method getOriginalUrl
* <p>Gets the value of the {@link Titanium.Network.Cookie#property-originalUrl} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setOriginalUrl
* <p>Sets the value of the {@link Titanium.Network.Cookie#property-originalUrl} property.</p>
* @param {String} originalUrl
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getPath
* <p>Gets the value of the {@link Titanium.Network.Cookie#property-path} property.</p>
* @returns {String}
*/
/**
* @method setPath
* <p>Sets the value of the {@link Titanium.Network.Cookie#property-path} property.</p>
* @param {String} path
<p>New value for the property.</p>
*/
/**
* @method getSecure
* <p>Gets the value of the {@link Titanium.Network.Cookie#property-secure} property.</p>
* @returns {Boolean}
*/
/**
* @method setSecure
* <p>Sets the value of the {@link Titanium.Network.Cookie#property-secure} property.</p>
* @param {Boolean} secure
<p>New value for the property.</p>
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.Network.Cookie#property-value} property.</p>
* @returns {String}
*/
/**
* @method setValue
* <p>Sets the value of the {@link Titanium.Network.Cookie#property-value} property.</p>
* @param {String} value
<p>New value for the property.</p>
*/
/**
* @method getVersion
* <p>Gets the value of the {@link Titanium.Network.Cookie#property-version} property.</p>
* @returns {Number}
*/
/**
* @method setVersion
* <p>Sets the value of the {@link Titanium.Network.Cookie#property-version} property.</p>
* @param {Number} version
<p>New value for the property.</p>
*/
* @property comment
* @type String
* <p>The comment describing the purpose of this cookie</p>
*/
/**
* @property domain
* @type String
* <p>The domain attribute of the cookie.</p>
*/
/**
* @property expiryDate
* @type String
* <p>The expiration Date of the cookie.</p>
* @description <p>Date format is "<em>yyyy</em>-_MM_-<em>dd</em><strong>T</strong><em>HH</em><strong>:</strong><em>mm</em><strong>:</strong><em>ss</em><strong>.</strong><em>SSS</em><strong>+0000</strong>"</p>
<p>This has been deprecated and removed since 5.0.0 in Android. Please use the property <code>maxAge</code>
for Cookies in Android.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property maxAge
* @type Number
* <p>Sets the Max-Age attribute of a Cookie, in delta-seconds.</p>
* @platform android 5.0.0
*/
/**
* @property [httponly=false]
* @type Boolean
* <p>The httponly attribute of the cookie.</p>
* @description <p>On iOS this property cannot be set. On Android, when this property is set to <code>true</code>, the cookie will
be used only when transmitting HTTP (or HTTPS) requests.</p>
*/
/**
* @property name
* @type String
* @readonly
* @creationOnly
* <p>The name of the cookie.</p>
*/
/**
* @property originalUrl
* @type String
* <p>The origual url attribute of the cookie.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property path
* @type String
* <p>The path attribute of the cookie.</p>
* @description <p>In the system cookie store, the default value of the path is "/". In the HTTP client cookie store,
the default value of the path is <code>null</code>.</p>
*/
/**
* @property [secure=false]
* @type Boolean
* <p>The secure attribute of the cookie.</p>
* @description <p>Indicates whether this cookie requires a secure connection.</p>
*/
/**
* @property value
* @type String
* <p>The value of the cookie.</p>
*/
/**
* @property version
* @type Number
* <p>The version of the cookie specification to which this cookie conforms.</p>
*/
/**
* @class Titanium.Network.HTTPClient
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/HTTPClient.yml
* <p>HTTP client object that (mostly) implements the XMLHttpRequest specification.</p>
* @description <p>Use {@link Titanium.Network#method-createHTTPClient} to create a new <code>HTTPClient</code> object.</p>
<p>An <code>HTTPClient</code> object is intended to be used for a single request. It may be
possible to re-use an <code>HTTPClient</code> object, but this use case is not tested.</p>
<p>There are three steps in making a typical HTTP request:</p>
<ul>
<li>Creating an <code>HTTPClient</code> object.</li>
<li>Opening the <code>HTTPClient</code> object.</li>
<li>Sending the request.</li>
</ul>
<p>Before opening the request, you must define one or more callbacks to handle
the HTTP response, as well as errors, progress updates, and other conditions.</p>
<p>The <code>HTTPClient</code> callbacks operate somewhat differently from other
Titanium callbacks, in accordance with the XMLHttpRequest specification.</p>
<p>When the callbacks are invoked, the <code>this</code> value is set to either the
original <code>HTTPClient</code> object itself, or a response object that holds all
of the response-related properties defined for the <code>HTTPClient</code> object. So the
callbacks can use code like this to access the response values:</p>
<pre><code>httpResponse = this.responseText;
status = this.status;
</code></pre>
<h4>Content-Type Header</h4>
<p>When sending a POST request with the HTTP client, the Content-Type header is set automatically
depending on the platform and data type sent.</p>
<p>On the Android and iOS platforms:</p>
<ul>
<li>If you are sending a JavaScript object, the content type is set to <code>multipart/form-data</code>.</li>
<li>For all other data types on Android, the content type is set to <code>application/x-www-form-urlencoded</code>.</li>
<li>For all other data types on iOS, the content type is <strong>NOT</strong> set.</li>
</ul>
<p>On the Mobile Web platforms, the content type is always set to
<code>application/x-www-form-urlencoded</code> as the default.</p>
<p>Use the {@link Titanium.Network.HTTPClient#method-setRequestHeader setRequestHeader} method to override the
default Content-Type header.</p>
<h4>Asynchronous vs. Synchronous HTTP Requests</h4>
<p>By default, the <code>HTTPClient</code> makes asynchronous requests. Asynchronous requests do not block
the application and use callbacks to process responses when they are received.</p>
<p>Synchronous requests block the execution of the application until it receives a response.
On the iOS and Mobile Web platforms, you can make synchronous requests by setting the optional
<code>async</code> parameter to <code>false</code> when calling the {@link Titanium.Network.HTTPClient#method-open open} method.</p>
<p>The Android platform does not support synchronous requests.</p>
<h4>TLS Support</h4>
<p>Transport Layer Security (TLS) is a protocol that ensures privacy between communicating applications
and their users on the Internet. When a server and client communicate, TLS ensures that no third
party may eavesdrop or tamper with any message. TLS is the successor to the Secure Sockets Layer (SSL).</p>
<p>To communicate to servers with the TLS protocol, you need to use the same TLS version between
the client and server.</p>
<p><table class="doc-table" summary="This table provides information about TLS versions.">
<caption><b>TLS versions by platform</b></caption>
<tr><th>Protocol</th><th>Android<th>iOS</th></tr>
<tr><th align="left">TLS 1.0</th><td>1.0+</td><td>1.0+</td></tr>
<tr><th align="left">TLS 1.1</th><td>4.1+</td><td>5.0+</td></tr>
<tr><th align="left">TLS 1.2</th><td>4.1+</td><td>5.0+</td></tr></p>
<p>In Titanium, if a connection with TLS 1.2 fails, Titanium will re-attempt the connection with
TLS 1.1 and TLS 1.0. By default, TLS 1.2 is only attempted first for devices running Android 4.1
and greater, or iOS 5.0 and greater. Prior to these versions, only TLS 1.0 is attempted since
1.0 is the only supported TLS version.</p>
<p>Use the {@link Titanium.Network.HTTPClient#property-tlsVersion} property to set the version of the TLS protocol
if you know the version the server is running. If you do not know, do not set this property.
Titanium will not fallback with a lower TLS version if the <code>tlsVersion</code> property is set.
Setting the TLS version saves time from re-attempting connections with lower TLS versions and
provides added security by denying attempts to use lower TLS versions.</p>
<p>Starting with Release 3.6.0, you can set the TLS version for the Android and iOS platforms.
Prior to Release 3.6.0, you can only set the TLS version for iOS.</p>
<h4>Android Platform Implementation Notes</h4>
<p>On Android, the <code>HTTPClient</code> uses its own cookie store which does not share cookies with the
system cookie store used by {@link Titanium.UI.WebView}. Developers can manage their cookies for both
cookie stores using the methods {@link Titanium.Network#method-addHTTPCookie}, {@link Titanium.Network#method-addSystemCookie},
{@link Titanium.Network#method-getHTTPCookies}, {@link Titanium.Network#method-getHTTPCookiesForDomain}, {@link Titanium.Network#method-getSystemCookies},
{@link Titanium.Network#method-removeHTTPCookie}, {@link Titanium.Network#method-removeHTTPCookiesForDomain}, {@link Titanium.Network#method-removeAllHTTPCookies},
{@link Titanium.Network#method-removeSystemCookie}, {@link Titanium.Network#method-removeAllSystemCookies}.</p>
<h4>Mobile Web Platform Implementation Notes</h4>
<p>Mobile Web is limited by the same-origin policy. According to W3C: "User agents
commonly apply same-origin restrictions to network requests. These restrictions
prevent a client-side Web application running from one origin from obtaining
data retrieved from another origin, and also limit unsafe HTTP requests that can
be automatically launched toward destinations that differ from the running
application's origin." This means that browsers cannot request information from
a domain that the app itself does not reside on. If you are hosting the app at
foo.example.com, then requests to any domain other than *.example.com will fail.</p>
<p>There are two solutions to get around this problem:</p>
<ul>
<li>Configure the destination server to support Cross-Origin Resource Sharing.</li>
<li>Use {@link Titanium.Network#property-httpURLFormatter Ti.Network.httpURLFormatter} in conjunction
with a proxy on the server hosting the application.</li>
</ul>
<p>If you use a proxy, be sure to properly configure how cookies are passed through. You
may not want cookies proxied to third parties that could identify a user.</p>
<p>More information about Cross-Origin Resource Sharing can be found on the
<a href="http://www.w3.org/TR/cors/">W3C Cross-Origin Resource Sharing</a> specification page.</p>
* <h3>Examples</h3>
<h4>Simple GET Request</h4>
<p>The following code excerpt does a simple GET request and logs the response text.</p>
<pre><code> var url = "http://www.appcelerator.com";
var client = Ti.Network.createHTTPClient({
// function called when the response data is available
onload : function(e) {
Ti.API.info("Received text: " + this.responseText);
alert('success');
},
// function called when an error occurs, including a timeout
onerror : function(e) {
Ti.API.debug(e.error);
alert('error');
},
timeout : 5000 // in milliseconds
});
// Prepare the connection.
client.open("GET", url);
// Send the request.
client.send();
</code></pre>
*/
/**
* @method addAuthFactory
* <p>Registers a new AuthSchemeFactory for a given scheme.</p>
* @removed 5.0.0
* @description <p>This has been deprecated.
Use this method to add support for authorization schemes not natively supported by Android.</p>
* @param {String} scheme
<p>The authentication scheme.</p>
* @param {Object} factory
<p>The authentication factory. This factory must implement the <a href="http://developer.android.com/reference/org/apache/http/auth/AuthSchemeFactory.html">AuthSchemeFactory</a> interface.</p>
* @platform android 3.0.0
*/
/**
* @method addKeyManager
* <p>Adds a custom key manager.</p>
* @removed 3.4.0
* @description <p>Use this method to add support for X.509 certifcate-base keypairs.</p>
<p>If this method is used to create a custom SSLContext, the <code>validatesSecureCertificate</code>
property is ignored.</p>
* @param {Object} X509KeyManager
<p>X.509 key manager. This key manager must implement the <a href="http://developer.android.com/reference/javax/net/ssl/X509KeyManager.html">X509KeyManager</a> inteface.</p>
* @platform android 3.1.0
*/
/**
* @method addTrustManager
* <p>Adds a custom trust manager.</p>
* @removed 3.4.0
* @description <p>Use this method to add support for X.509 certifcates.</p>
<p>If this method is used to create a custom SSLContext, the <code>validatesSecureCertificate</code>
property is ignored.</p>
* @param {Object} X509TrustManager
<p>X.509 trust manager. This trust manager must implement the <a href="http://developer.android.com/reference/javax/net/ssl/X509TrustManager.html">X509TrustManager</a> inteface.</p>
* @platform android 3.1.0
*/
/**
* @method abort
* <p>Cancels a pending request.</p>
*/
/**
* @method clearCookies
* <p>Clears any cookies stored for the host.</p>
* @param {String} host
<p>The URL of the host/domain to clear cookies for.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
* @method getResponseHeader
* <p>Returns the value of the specified response header.</p>
* @param {String} name
<p>Name of the header to retrieve.</p>
* @returns {String}
*/
/**
* @method open
* <p>Opens the request and prepares the connection.</p>
* @param {String} method
<p>HTTP method for this request, such as 'GET' or 'POST'. 'PATCH' is available on Android from SDK 4.1.0.</p>
* @param {String} url
<p>URL for the request.</p>
* @param {Boolean} async (optional)
<p>Determines whether the request should be made asynchronously. Only used on iOS and Mobile Web.</p>
*/
/**
* @method send
* <p>Sends the request.</p>
* @description <p>For POST requests, use the <code>data</code> parameter to send POST data.</p>
<p>If you pass a serializable JavaScript object, it is automatically turned into form-encoded
POST data. You can also send an arbitrary string or binary data (in the form of a
{@link Titanium.Blob}).</p>
<p>To send array data, specify each array element individually as a property of the object.
For example, normally, you specify an array in an object as:</p>
<pre><code>var payload = { myArray: [1, 2, 3] };
</code></pre>
<p>Instead, for the HTTP client to encode the data correctly, you need to send the data as:</p>
<pre><code>var payload = {
"myArray[0]" : 1,
"myArray[1]" : 2,
"myArray[2]" : 3
};
</code></pre>
<p>On iOS, you can specify a synchronous request when you call <code>open</code> by passing <code>false</code> for
the <code>async</code> parameter. In the case of a synchronous request, <code>send</code> blocks until the request
is complete.</p>
* @param {Object/String/Titanium.Filesystem.File/Titanium.Blob} data (optional)
<p>Data to send with a POST request.</p>
*/
* @method setRequestHeader
* <p>Sets the value for the specified request header. Must be called after <code>open</code> but before <code>send</code>.</p>
* @param {String} name
<p>Name of the header to set.</p>
* @param {String} value
<p>Value to assign to the header. May be <code>null</code> to clear a default header value, such as
X-Requested-With.</p>
*/
/**
* @method setTimeout
* <p>Sets the request timeout.</p>
* @description <p>On Mobile Web, the timeout only works when making asynchronous requests.</p>
* @param {Number} timeout
<p>Timeout in milliseconds.</p>
*/
/**
* @method getAutoEncodeUrl
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-autoEncodeUrl} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setAutoEncodeUrl
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-autoEncodeUrl} property.</p>
* @param {Boolean} autoEncodeUrl
<p>New value for the property.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAutoRedirect
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-autoRedirect} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setAutoRedirect
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-autoRedirect} property.</p>
* @param {Boolean} autoRedirect
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getCache
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-cache} property.</p>
* @returns {Boolean}
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setCache
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-cache} property.</p>
* @param {Boolean} cache
<p>New value for the property.</p>
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getDomain
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-domain} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setDomain
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-domain} property.</p>
* @param {String} domain
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getEnableKeepAlive
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-enableKeepAlive} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setEnableKeepAlive
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-enableKeepAlive} property.</p>
* @param {Boolean} enableKeepAlive
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getFile
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-file} property.</p>
* @returns {String}
* @platform android 3.4.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setFile
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-file} property.</p>
* @param {String} file
<p>New value for the property.</p>
* @platform android 3.4.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getOndatastream
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-ondatastream} property.</p>
* @returns {Callback<Object>}
*/
/**
* @method setOndatastream
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-ondatastream} property.</p>
* @param {Callback<Object>} ondatastream
<p>New value for the property.</p>
*/
/**
* @method getOnerror
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-onerror} property.</p>
* @returns {Callback<FailureResponse>}
*/
/**
* @method setOnerror
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-onerror} property.</p>
* @param {Callback<FailureResponse>} onerror
<p>New value for the property.</p>
*/
/**
* @method getOnload
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-onload} property.</p>
* @returns {Callback<SuccessResponse>}
*/
/**
* @method setOnload
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-onload} property.</p>
* @param {Callback<SuccessResponse>} onload
<p>New value for the property.</p>
*/
/**
* @method getOnreadystatechange
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-onreadystatechange} property.</p>
* @returns {Callback<Object>}
*/
/**
* @method setOnreadystatechange
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-onreadystatechange} property.</p>
* @param {Callback<Object>} onreadystatechange
<p>New value for the property.</p>
*/
/**
* @method getOnsendstream
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-onsendstream} property.</p>
* @returns {Callback<Object>}
*/
/**
* @method setOnsendstream
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-onsendstream} property.</p>
* @param {Callback<Object>} onsendstream
<p>New value for the property.</p>
*/
/**
* @method getPassword
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-password} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setPassword
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-password} property.</p>
* @param {String} password
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getSecurityManager
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-securityManager} property.</p>
* @returns {SecurityManagerProtocol}
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @method setSecurityManager
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-securityManager} property.</p>
* @param {SecurityManagerProtocol} securityManager
<p>New value for the property.</p>
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @method getTimeout
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-timeout} property.</p>
* @returns {Number}
*/
/**
* @method setTimeout
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-timeout} property.</p>
* @param {Number} timeout
<p>New value for the property.</p>
*/
/**
* @method getTlsVersion
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-tlsVersion} property.</p>
* @returns {Number}
* @platform android 3.6.0
* @platform iphone 1.8.0.1
* @platform ipad 1.8.0.1
* @platform windowsphone 4.1.0
*/
/**
* @method setTlsVersion
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-tlsVersion} property.</p>
* @param {Number} tlsVersion
<p>New value for the property.</p>
* @platform android 3.6.0
* @platform iphone 1.8.0.1
* @platform ipad 1.8.0.1
* @platform windowsphone 4.1.0
*/
/**
* @method getUsername
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-username} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setUsername
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-username} property.</p>
* @param {String} username
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getValidatesSecureCertificate
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-validatesSecureCertificate} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setValidatesSecureCertificate
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-validatesSecureCertificate} property.</p>
* @param {Boolean} validatesSecureCertificate
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getWithCredentials
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-withCredentials} property.</p>
* @returns {Boolean}
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setWithCredentials
* <p>Sets the value of the {@link Titanium.Network.HTTPClient#property-withCredentials} property.</p>
* @param {Boolean} withCredentials
<p>New value for the property.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
* @method getAllResponseHeaders
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-allResponseHeaders} property.</p>
* @returns {String}
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getConnected
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-connected} property.</p>
* @returns {Boolean}
*/
/**
* @method getConnectionType
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-connectionType} property.</p>
* @returns {String}
*/
/**
* @method getLocation
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-location} property.</p>
* @returns {String}
*/
/**
* @method getReadyState
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-readyState} property.</p>
* @returns {Number}
*/
/**
* @method getResponseData
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-responseData} property.</p>
* @returns {Titanium.Blob}
*/
/**
* @method getResponseText
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-responseText} property.</p>
* @returns {String}
*/
/**
* @method getResponseXML
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-responseXML} property.</p>
* @returns {Titanium.XML.Document}
*/
/**
* @method getStatus
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-status} property.</p>
* @returns {Number}
*/
/**
* @method getStatusText
* <p>Gets the value of the {@link Titanium.Network.HTTPClient#property-statusText} property.</p>
* @returns {String}
*/
/**
* @property [autoEncodeUrl=true]
* @type Boolean
* <p>Determines whether automatic encoding is enabled for the specified URL.</p>
* @description <p>Set to <code>false</code> to disable automatic URL-encoding.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property [autoRedirect=true]
* @type Boolean
* <p>Determines whether automatic automatic handling of HTTP redirects is enabled.</p>
* @description <p>Set to <code>false</code> to disable automatic HTTP redirects handling.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property [cache=false]
* @type Boolean
* <p>Determines whether HTTP responses are cached.</p>
* @description <p>If <code>cache</code> is set to <code>true</code>, requests using this HTTP client will cache their responses
(respecting headers such as "no-cache", "no-store", and cache expiry). In this case, repeated
requests to the same URL may retrieve the initial response rather than triggering a new
request. The cache is shared between all instances of <code>HTTPClient</code>.</p>
<p>Caching should only be enabled for HTTP requests which you expect the result to remain
consistent for.</p>
<p>If <code>cache</code> is <code>false</code>, any request on this HTTP client will result in a new HTTP request.</p>
<p>This propery must be set before <code>open</code> is called.</p>
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property [domain=Undefined]
* @type String
* <p>Sets the domain parameter for authentication credentials.</p>
* @description <p>Set this parameter when authentication against NTLM domains along with the {@link Titanium.Network.HTTPClient#property-username username}
and {@link Titanium.Network.HTTPClient#property-password password} properties.
iOS supports NTLM authentication natively.
Android can be extended using the {@link Titanium.Network.HTTPClient#method-addAuthFactory addAuthFactory} method.
Must be set before calling {@link Titanium.Network.HTTPClient#method-open open}.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property [enableKeepAlive=false]
* @type Boolean
* <p>Determines whether the client should attempt to keep a persistent connection.</p>
* @description <p>Set to <code>true</code> to maintain a persistent connection.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property file
* @type String
* <p>Target local file to receive data.</p>
* @description <p>On iOS, can only be set <strong>after</strong> calling {@link Titanium.Network.HTTPClient#method-open open}.</p>
<p>On Android and Mobile Web, can be set anytime prior to calling {@link Titanium.Network.HTTPClient#method-send send}.
The file must be writable such as the application data directory or temp directory.</p>
* @platform android 3.4.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property ondatastream
* @type Callback<Object>
* <p>Function to be called at regular intervals as the request data is being received.</p>
* @description <p>Must be set before calling <code>open</code>.</p>
<p>The <code>progress</code> property of the event will contain a value from 0.0-1.0 with the progress of
the request. On iOS and Android as of 3.5.0, if the progress can not be calculated,
the value will be {@link Titanium.Network#property-PROGRESS_UNKNOWN PROGRESS_UNKNOWN}.</p>
*/
/**
* @property onerror
* @type Callback<FailureResponse>
* <p>Function to be called upon a error response.</p>
* @description <p>Must be set before calling <code>open</code>.</p>
<p>The callback's argument is an object with a single property, <code>error</code>, containing the error
string.</p>
*/
/**
* @property onload
* @type Callback<SuccessResponse>
* <p>Function to be called upon a successful response.</p>
* @description <p>Must be set before calling <code>open</code>.</p>
<p>To access response data and headers, access the <code>HTTPClient</code> object itself (accessible as
<code>this</code> during the callback, or the <code>source</code> property of the callback event).</p>
*/
/**
* @property onreadystatechange
* @type Callback<Object>
* <p>Function to be called for each {@link Titanium.Network.HTTPClient#property-readyState readyState} change.</p>
* @description <p>Must be set before calling <code>open</code>.</p>
<p>When the callback is invoked, <code>this.readyState</code> is set to one of the
<code>Titanium.Network.HTTPClient</code> ready-state constants,
{@link Titanium.Network.HTTPClient#property-OPENED OPENED},
{@link Titanium.Network.HTTPClient#property-HEADERS_RECEIVED HEADERS_RECEIVED},
{@link Titanium.Network.HTTPClient#property-LOADING LOADING},
or {@link Titanium.Network.HTTPClient#property-DONE DONE}.</p>
<p>Due to the asynchronous nature of the Titanium platform, the internal value of
{@link Titanium.Network.HTTPClient#property-readyState readyState} might be different from the state change
for which the event was fired. To address this discrepancy, the function is now invoked with a
payload object of type {@link ReadyStatePayload}. This was introduced in version 3.4.2 of the SDK and is
supported on the iOS and android platforms.</p>
*/
/**
* @property onsendstream
* @type Callback<Object>
* <p>Function to be called at regular intervals as the request data is being transmitted.</p>
* @description <p>Must be set before calling <code>open</code>.</p>
<p>The <code>progress</code> property of the event will contain a value from 0.0-1.0 with the progress of
the upload.</p>
*/
/**
* @property [password=Undefined]
* @type String
* <p>Sets the password parameter for authentication credentials.</p>
* @description <p>Must be set before calling {@link Titanium.Network.HTTPClient#method-open open}.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property securityManager
* @type SecurityManagerProtocol
* @creationOnly
* <p>The Security Manager for this client.</p>
* @description <p>This property <strong>must</strong> be specified during creation. Set this property on the HTTPClient to participate in the authentication and resource management of the connection. See {@link SecurityManagerProtocol} for further information.</p>
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @property timeout
* @type Number
* <p>Timeout in milliseconds when the connection should be aborted.</p>
* @description <p>On Mobile Web, the timeout only works when making asynchronous requests.</p>
*/
/**
* @property [tlsVersion=undefined. {@link Titanium.Network#property-TLS_VERSION_1_2} for Android 4.1 and later, or iOS 5 and
later. {@link Titanium.Network#property-TLS_VERSION_1_0} for Android 4.0 and earlier, or iOS 4 and earlier.
]
* @type Number
* <p>Sets the TLS version to use for handshakes.</p>
* @description <p>If you experience handshake failures, set this value to a lower version using the TLS
constants in {@link Titanium.Network}. 'undefined', 'null', or unsupported values use the default
behavior for that iOS and Android versions.</p>
<p>Setting this property disables falling back to lower TLS versions.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Network#property-TLS_VERSION_1_0}
<li> {@link Titanium.Network#property-TLS_VERSION_1_1}
<li> {@link Titanium.Network#property-TLS_VERSION_1_2}
</ul></p>
* @platform android 3.6.0
* @platform iphone 1.8.0.1
* @platform ipad 1.8.0.1
* @platform windowsphone 4.1.0
*/
/**
* @property [username=Undefined]
* @type String
* <p>Sets the username parameter for authentication credentials.</p>
* @description <p>Must be set before calling {@link Titanium.Network.HTTPClient#method-open open}.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property [validatesSecureCertificate=False when running in the simulator or on device in testing mode, and true if built for
release in distribution mode.
]
* @type Boolean
* <p>Determines how SSL certification validation is performed on connection.</p>
* @description <p>On Android, this property is ignored if the <code>addKeyManager</code> or <code>addTrustManager</code> methods
are used to create a custom SSL context.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property [withCredentials=false]
* @type Boolean
* <p>Determines whether the request should include any cookies and HTTP authentication information.</p>
* @description <p>Set to <code>true</code> to include cookies and HTTP authentication information with the request.</p>
<p>This property must be set before open() is called. Setting this to true will force the
request to be asynchronous.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property DONE
* @type Number
* @readonly
* <p>Ready state constant indicating that the request is complete.</p>
* @description <p>In this ready state, either the data has been transferred, or an error has occured.</p>
<p>See also {@link Titanium.Network.HTTPClient#property-readyState readyState}.</p>
*/
* @property HEADERS_RECEIVED
* @type Number
* @readonly
* <p>Ready state constant indicating that response headers have been received.</p>
* @description <p>See also {@link Titanium.Network.HTTPClient#property-readyState readyState}.</p>
*/
/**
* @property LOADING
* @type Number
* @readonly
* <p>Ready state constant indicating that response data is being received from the remote server.</p>
* @description <p>See also {@link Titanium.Network.HTTPClient#property-readyState readyState}.</p>
*/
/**
* @property OPENED
* @type Number
* @readonly
* <p>Ready state constant indicating that the connection has been opened, but the request has
not yet been sent.</p>
* @description <p>See also {@link Titanium.Network.HTTPClient#property-readyState readyState}.</p>
*/
/**
* @property UNSENT
* @type Number
* @readonly
* <p>Ready state constant indicating that HTTPClient request has not been opened or sent.</p>
* @description <p>See also {@link Titanium.Network.HTTPClient#property-readyState readyState}.</p>
*/
* @property allResponseHeaders
* @type String
* @readonly
* <p>All of the response headers.</p>
* @description <p>Contains a single string, or an empty string if no headers are available.</p>
<p>See also: {@link Titanium.Network.HTTPClient#method-getResponseHeader getResponseHeader}.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property connected
* @type Boolean
* @readonly
* <p>Indicates whether the response was successful.</p>
*/
/**
* @property connectionType
* @type String
* @readonly
* <p>Connection type, normally either <code>GET</code>, <code>POST</code> or <code>PATCH</code>.</p>
*/
/**
* @property location
* @type String
* @readonly
* <p>Absolute URL of the request.</p>
* @description <p>If the request redirects, this property returns the URL of the redirected request.</p>
*/
/**
* @property readyState
* @type Number
* @readonly
* <p>The current ready state of this HTTP request.</p>
* @description <p>The ready state describes the current state of the request. The ready state is set to one of
the five <code>Titanium.Network.HTTPClient</code> ready state constants. A typical HTTP request goes
through the states in this order:</p>
<ul>
<li>{@link Titanium.Network.HTTPClient#property-UNSENT UNSENT}</li>
<li>{@link Titanium.Network.HTTPClient#property-OPENED OPENED}</li>
<li>{@link Titanium.Network.HTTPClient#property-HEADERS_RECEIVED HEADERS_RECEIVED}</li>
<li>{@link Titanium.Network.HTTPClient#property-LOADING LOADING}</li>
<li>{@link Titanium.Network.HTTPClient#property-DONE DONE}</li>
</ul>
<p>The <code>onreadystatechange</code> callback is invoked each time the ready state changes.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Network.HTTPClient#property-UNSENT}
<li> {@link Titanium.Network.HTTPClient#property-OPENED}
<li> {@link Titanium.Network.HTTPClient#property-HEADERS_RECEIVED}
<li> {@link Titanium.Network.HTTPClient#property-LOADING}
<li> {@link Titanium.Network.HTTPClient#property-DONE}
</ul></p>
*/
/**
* @property responseData
* @type Titanium.Blob
* @readonly
* <p>Response data as a <code>Blob</code> object.</p>
*/
/**
* @property responseText
* @type String
* @readonly
* <p>Response as text.</p>
* @description <p>Set to <code>null</code> if an error was received or no data was returned.</p>
*/
/**
* @property responseXML
* @type Titanium.XML.Document
* @readonly
* <p>Response object as an XML DOM Document object.</p>
* @description <p>Set to <code>null</code> if the content type returned by the server was not XML or if the content could not be parsed.</p>
*/
/**
* @property status
* @type Number
* @readonly
* <p>Response HTTP status code.</p>
*/
/**
* @property statusText
* @type String
* @readonly
* <p>Human-readable status message associated with the status code.</p>
*/
/**
* @class SecurityManagerProtocol
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/HTTPClient.yml
* <p>The protocol that the {@link Titanium.Network.HTTPClient#property-securityManager} must implement.</p>
* @description <p>The object representing {@link Titanium.Network.HTTPClient#property-securityManager} must implement this protocol.
Assigning the securityManager property to an object that does not implement this protocol will cause an exception to be raised.
All methods in this protocol are required.</p>
*/
/**
* @method willHandleURL
* <p>Returns if the security manager will participate in authentication of this end point.</p>
* @description <p>The parameter passed to this method is a <a href="https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/Reference/Reference.html">NSURL</a>
on iOS and a <a href="http://developer.android.com/reference/android/net/Uri.html">Uri</a> on android. </p>
<p>Return <strong>true</strong> to participate, <strong>false</strong> to allow default authentication flow. </p>
* @param {Object} url
<p>The Object representing representing the end point of this connection.</p>
* @returns {Boolean}
*/
/**
* @method connectionDelegateForUrl
* <p>The {@link APSConnectionDelegate} for this connection.</p>
* @description <p>This method is only called if {@link SecurityManagerProtocol#method-willHandleURL} returns true.
See {@link APSConnectionDelegate} for further information.</p>
* @param {Object} url
<p>The <a href="https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/Reference/Reference.html">NSURL</a> representing the end point of this connection.</p>
* @returns {APSConnectionDelegate}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getTrustManagers
* <p>Returns an array of objects implementing the <a href="http://developer.android.com/reference/javax/net/ssl/X509TrustManager.html">X509TrustManager</a> protocol for the SSL Context.</p>
* @description <p>This method is only called if {@link SecurityManagerProtocol#method-willHandleURL} returns true.</p>
<p>Return null to set up a SSL Context with the default system trust managers.</p>
* @param {Object} proxy
<p>The {@link Titanium.Network.HTTPClient} representing this connection.</p>
* @returns {Object[]}
* @platform android 3.3.0
*/
/**
* @method getKeyManagers
* <p>Returns an array of objects implementing the <a href="http://developer.android.com/reference/javax/net/ssl/X509KeyManager.html">X509KeyManager</a> protocol for the SSL Context.</p>
* @description <p>This method is only called if {@link SecurityManagerProtocol#method-willHandleURL} returns true.</p>
<p>Return null to set up a SSL Context with the default system key managers.</p>
* @param {Object} proxy
<p>The {@link Titanium.Network.HTTPClient} representing this connection.</p>
* @returns {Object[]}
* @platform android 3.3.0
*/
/**
* @class APSConnectionDelegate
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/HTTPClient.yml
* <p>An extension of the <a href="https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLConnectionDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/NSURLConnectionDelegate">NSURLConnectionDelegate</a> protocol to allow users to participate in authentication and resource management for this HTTPClient.</p>
* @description <p>The APSConnectionDelegate protocol is an extension of the NSURLConnectionDelegate protocol. </p>
<p>Although all methods in this protocol are optional, the connection delegate must implement at least one of the methods to
participate in the authentication and resource management.</p>
<p>The deprecated methods as defined by the NSURLConnectionDelegate protocol are not supported.</p>
<p>In addition to the methods defined in the NSURLConnectionDelegate protocol this protocol defines one additional method.</p>
<p><code>-(BOOL)willHandleChallenge:(NSURLAuthenticationChallenge *)challenge forConnection:(NSURLConnection *)connection</code>.</p>
<p>This method is called on the connection delegate only if it also implements the
<code>connection:willSendRequestForAuthenticationChallenge:</code> method of the NSURLConnectionDelegate protocol.
Return <code>true</code> if the connection delegate wants to handle this challenge.
Return <code>false</code> if the default delegate will handle this challenge.</p>
<p>If the connection delegate does not implement this method but implements <code>connection:willSendRequestForAuthenticationChallenge:</code>, the return
value is assumed to be <code>true</code> and all challenges will be forwarded to the connection delegate.</p>
*/
/**
* @class ReadyStatePayload
* @platform android 3.4.2
* @platform iphone 3.4.2
* @platform ipad 3.4.2
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/HTTPClient.yml
* <p>An Object describing the current ready state. See {@link Titanium.Network.HTTPClient#property-onreadystatechange onreadystatechange} for more information.</p>
*/
/**
* @property readyState
* @type Number
* <p>The state for which <code>onreadystatechange</code> was invoked. Set to one of <code>Titanium.Network.HTTPClient</code> ready-state constants</p>
*/
/**
* @class Titanium.Network
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Network.yml
* <p>The top level network module.</p>
* @description <p>The <code>Network</code> module is used to access networking related functionality.</p>
<p>For TCP sockets, see {@link Titanium.Network.Socket.TCP}.</p>
<p>The legacy {@link Titanium.Network.TCPSocket} object is still required
by the {@link Titanium.Network.BonjourBrowser BonjourBrowser} and
{@link Titanium.Network.BonjourService BonjourService} objects.</p>
<p>For all other socket needs, use {@link Titanium.Network.Socket.TCP}.</p>
<h3>iOS 9 Application Note</h3>
<p>Starting with iOS 9, Apple introduced new security and compatibility guidelines for networking
and connectivity, which include:</p>
<ul>
<li>All connections must support TLS 1.2 or greater, and use forward secrecy ciphers supported by iOS</li>
<li>Certificates must use at least a SHA-256 fingerprint with either a 2048-bit or greater RSA key,
or a 256-bit or greater ECC key</li>
<li>Application must be compatible with IPv6 DNS64/NAT64 networks as part of App Store submissions</li>
</ul>
<p>Because of the new requirements, Titanium disables the App Transport Security (ATS)
requirements, which only includes the TLS and certificate cipher requirements,
to allow all connections.</p>
<p>If you wish to re-enable ATS, add the <code>NSAppTransportSecurity</code> dict to the <code>ios plist</code> section
of the <code>tiapp.xml</code> file, then add the <code>NSAllowArbitraryLoads</code> key and set it to true.</p>
<pre><code><ti:app>
...
<ios>
<plist>
<dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key><true/>
</dict>
</dict>
</plist>
</ios>
...
</ti:app>
</code></pre>
<p>Note that Titanium will inject code into the plist file to whitelist <code>appcelerator.com</code> subdomains,
which is needed to communicate with the Appcelerator Anayltics server. To disable the whitelist,
set the <code>ios.whitelist.appcelerator.com</code> tiapp application property to false.</p>
<pre><code><ti:app>
<property name="ios.whitelist.appcelerator.com" type="bool">false</property>
</ti:app>
</code></pre>
<p>Listed below are other guidelines from Apple.</p>
<p><strong>Avoid hard-coded IPv4 address literals</strong></p>
<p>Try not to include hard-coded IPv4 address literals in your application, for example, 127.0.0.1.</p>
<p><strong>Whitelist URLs</strong></p>
<p>If ATS is enabled and the web service you are trying to contact does not support the new security guidelines,
iOS will not allow you to connect to the service. An error will be returned in the network response
stating the connection failed because it did not meet the ATS policy standards.</p>
<p>To allow the connection, you will need to add
a <code>NSAppTransportSecurity</code> dict to the <code>ios plist</code> section of the <code>tiapp.xml</code> file.
In the <code>NSAppTransportSecurity</code> dict, you add the <code>NSExceptionDomains</code> dict to whitelist
specific domains.</p>
<p>For more information, see
<a href="https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/index.html">iOS Developer Library: App Transport Security Technote</a>.</p>
<p>Example:</p>
<pre><code><ti:app>
...
<ios>
<plist>
<dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key><true/>
<key>NSExceptionDomains</key>
<dict>
<!-- Loosen security measure for www.foo.com domain -->
<key>www.foo.com</key>
<dict>
<!-- Set TLS v1.0 as the minimum TLS version -->
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.0</string>
<!-- Can use other ciphers besides forward secrecy ciphers -->
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<!-- Allow HTTP connections -->
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
</dict>
</plist>
</ios>
...
</ti:app>
</code></pre>
<p><strong>Test IPV6 DNS64/NAT64</strong></p>
<p>If you submit your application to the iTunes Store, you should setup an IPv6 DNS64/NAT64
network to test your application to verify it is compatible with IPv6.</p>
<p>If you are running OS X 10.11 or greater, you can use your computer to setup a local IPv6 Wi-Fi
network, which requires an Internet connection not through Wi-Fi.</p>
<p>To create the network, from System Preferences, enable Internet sharing with NAT64 network
enabled to share your Wi-Fi connection.</p>
<p>For detailed instructions, see
<a href="https://developer.apple.com/library/prerelease/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW16">Mac Developer Library: Test for IPv6 DNS64/NAT64 Compatibility</a>.</p>
*/
/**
* @event change
* <p>Fired when network connectivity changes.</p>
* @param {String} networkTypeName
<p>New network type as a string.</p>
* @param {Boolean} online
<p>Boolean to indicate if the device is online.</p>
* @param {Number} networkType
<p>New network type</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Network#property-NETWORK_LAN}
<li> {@link Titanium.Network#property-NETWORK_MOBILE}
<li> {@link Titanium.Network#property-NETWORK_NONE}
<li> {@link Titanium.Network#property-NETWORK_UNKNOWN}
<li> {@link Titanium.Network#property-NETWORK_WIFI}
</ul></p>
* @param {String} (android mobileweb) reason
<p>Human-readable text describing the reason for the change.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method addConnectivityListener
* <p>Legacy method to add a connectivity listener to listen for network changes.</p>
* @removed 3.0.0 Use the <Titanium.Network.change> event to monitor connectivity changes.
* @param {Callback<Object>} callback
<p>Callback function to invoke upon network connectivity changes.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method addHTTPCookie
* <p>Adds a cookie to the HTTP client cookie store.</p>
* @description <p>On iOS, the cookie will override an existing cookie with the same name, domain and path, if any. The cookie's
<code>expiryDate</code> property must be a date later than the creating date, otherwise the cookie will not persist in the
cookie storage.
On Android, any existing cookie with the same domain and name will be replaced with the new cookie. This is a bug
in <a href="http://developer.android.com/reference/org/apache/http/impl/cookie/BasicClientCookie.html">BasicCookieStore</a>
because based on <code>RFC6265</code>, an existing cookie can be evicted and replaced only when it has the same cookie-name,
domain-value and path-value with the new cookie.</p>
* @param {Titanium.Network.Cookie} cookie
<p>The cookie to add</p>
* @platform android 3.2.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method addSystemCookie
* <p>Adds a cookie to the system cookie store.</p>
* @description <p>On Android, {@link Titanium.UI.WebView} uses the system cookie store. Any existing cookie with the same
domain, path and name will be replaced with the new cookie.</p>
* @param {Titanium.Network.Cookie} cookie
<p>The cookie to add</p>
* @platform android 3.2.0
*/
/**
* @method createBonjourBrowser
* <p>Creates and returns a <code>BonjourBrowser</code> object.</p>
* @param {String} serviceType
<p>Service to search for, must include the protocol type suffix (._tcp).</p>
* @param {String} domain
<p>Bonjour service domain to conduct the search in.</p>
* @param {Dictionary<Titanium.Network.BonjourBrowser>} parameters (optional)
<p>A dictionary object of properties defined in {@link Titanium.Network.BonjourBrowser}.</p>
* @returns {Titanium.Network.BonjourBrowser}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method createBonjourService
* <p>Creates and returns a <code>BonjourService</code> object.</p>
* @param {String} name
<p>Name of the service. Must be a unique identifier for this service type and domain.</p>
* @param {String} type
<p>Type of service. Must include the protocol identifier (._tcp).</p>
* @param {String} domain
<p>Domain to publish the service in.</p>
* @param {Dictionary<Titanium.Network.BonjourService>} parameters (optional)
<p>Dictionary object of properties defined in {@link Titanium.Network.BonjourService}.</p>
* @returns {Titanium.Network.BonjourService}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method createTCPSocket
* <p>Legacy method to create and return an instance of {@link Titanium.Network.TCPSocket}.</p>
* @deprecated 1.7.0 Use <Titanium.Network.Socket.createTCP> instead.
* @description <p>Note that <code>TCPSocket</code> is still used with the Bonjour services. For other uses,
see {@link Titanium.Network.Socket.TCP}.</p>
* @param {String} hostName
<p>Host name to connect to/listen on.</p>
* @param {Number} port
<p>Port for the socket.</p>
* @param {Number} mode
<p>Socket's mode; one of {@link Titanium.Network#property-READ_MODE}, {@link Titanium.Network#property-WRITE_MODE},
{@link Titanium.Network#property-READ_WRITE_MODE}.</p>
* @param {Dictionary<Titanium.Network.TCPSocket>} parameters
<p>Dictionary object with properties defined in {@link Titanium.Network.TCPSocket}.</p>
* @returns {Titanium.Network.TCPSocket}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method decodeURIComponent
* <p>Returns a decoded version of a URI encoded value.</p>
* @param {String} value
<p>URI encoded input value to be decoded.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method encodeURIComponent
* <p>Returns a URI encoded version of the specified URI component.</p>
* @description <p>On iOS, this also escapes the following characters, which are allowed in a
URL but may not be allowed or desirable inside a path component:</p>
<pre><code>!*'();:@+$,/?%#[]=&
</code></pre>
* @param {String} value
<p>Input value to be encoded.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getHTTPCookies
* <p>Gets all the cookies with the domain, path and name matched with the given values from the HTTP client cookie store.</p>
* @description <p>The domain matching and path matching follow <code>RFC6265</code>. If name is null, return all the cookies with the domain and
path matched.</p>
* @param {String} domain
<p>The domain of the cookie to get. It is case-insensitive.</p>
* @param {String} path
<p>The path of the cookie to get. It is case-sensitive.</p>
* @param {String} name
<p>The name of the cookie to get. It is case-sensitive.</p>
* @returns {Titanium.Network.Cookie[]}
* @platform android 3.2.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getHTTPCookiesForDomain
* <p>Gets all the cookies with the domain matched with the given values from the HTTP client cookie store.</p>
* @description <p>The domain matching follows <code>RFC6265</code>.</p>
* @param {String} domain
<p>The domain of the cookie to get. It is case-insensitive.</p>
* @returns {Titanium.Network.Cookie[]}
* @platform android 3.2.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getSystemCookies
* <p>Gets all the cookies with the domain, path and name matched with the given values from the system cookie store.</p>
* @description <p>On Android, {@link Titanium.UI.WebView} uses the system cookie store. The domain matching and path matching follow <code>RFC6265</code>.
If name is null, return all the cookies with the domain and path matched. The returned cookies only have their
{@link Titanium.Network.Cookie#property-name name} and {@link Titanium.Network.Cookie#property-value value} properties returned.</p>
* @param {String} domain
<p>The domain of the cookie to get. It is case-insensitive.</p>
* @param {String} path
<p>The path of the cookie to get. It is case-sensitive.</p>
* @param {String} name
<p>The name of the cookie to get. It is case-sensitive.</p>
* @returns {Titanium.Network.Cookie[]}
* @platform android 3.2.0
*/
/**
* @method removeAllHTTPCookies
* <p>Removes all the cookies from the HTTP client cookie store.</p>
* @platform android 3.2.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method removeAllSystemCookies
* <p>Removes all the cookie from the system client cookie store.</p>
* @description <p>On Android, {@link Titanium.UI.WebView} uses the system cookie store.</p>
* @platform android 3.2.0
*/
/**
* @method removeHTTPCookie
* <p>Removes the cookie with the domain, path and name exactly the same as the given values from the HTTP client cookie store.</p>
* @param {String} domain
<p>The domain of the cookie to remove. It is case-insensitive.</p>
* @param {String} path
<p>The path of the cookie to remove. It is case-sensitive.</p>
* @param {String} name
<p>The name of the cookie to remove. It is case-sensitive.</p>
* @platform android 3.2.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method removeHTTPCookiesForDomain
* <p>Removes the cookies with the domain matched with the given values from the HTTP client cookie store.</p>
* @description <p>The domain matching follows <code>RFC6265</code>.</p>
* @param {String} domain
<p>The domain of the cookie to remove. It is case-insensitive.</p>
* @platform android 3.2.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method removeSystemCookie
* <p>Removes the cookie with the domain, path and name exactly the same as the given values from the system cookie store.</p>
* @description <p>On Android, {@link Titanium.UI.WebView} uses the system cookie store.</p>
* @param {String} domain
<p>The domain of the cookie to remove. It is case-insensitive.</p>
* @param {String} path
<p>The path of the cookie to remove. It is case-sensitive.</p>
* @param {String} name
<p>The name of the cookie to remove. It is case-sensitive.</p>
* @platform android 3.2.0
*/
/**
* @method registerForPushNotifications
* <p>Registers for push notifications with the Apple Push Notification Service.</p>
* @description <p>Call this method at application startup.</p>
<p>For iOS 8 and later, before calling this method, the application needs to call the
{@link Titanium.App.iOS#method-registerUserNotificationSettings Titanium.App.iOS.registerUserNotificationSettings}
method and pass it the notification types to use. Setting the notification types with this
method will have no effect on iOS 8 and later.</p>
<p>For iOS 7 and earlier, set the notification types to use with this method.</p>
* @param {PushNotificationConfig} config
<p>Dictionary specifying push-notification related options.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method removeConnectivityListener
* <p>Legacy method to remove a connectivity listener.</p>
* @removed 3.0.0 Use the <Titanium.Network.change> event to monitor connectivity changes.
* @param {Callback<Object>} callback
<p>Callback function to remove.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method unregisterForPushNotifications
* <p>Unregisters the application for push notifications.</p>
* @description <p>Per Apple's documentation, it is rarely necessary to call this method. See:
<a href="http://developer.apple.com/library/IOs/#documentation/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/unregisterForRemoteNotifications">unregisterForRemoteNotifications in the UIApplication Class
Reference</a> </p>
<p>For example, calling this method would be required if a new version of
your application no longer supports push notifications.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method createCookie
* <p>Creates and returns an instance of {@link Titanium.Network.Cookie}.</p>
* @param {Dictionary<Titanium.Network.Cookie>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Network.Cookie} except those marked not-creation or read-only.</p>
* @returns {Titanium.Network.Cookie}
* @platform android 3.2.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method createHTTPClient
* <p>Creates and returns an instance of {@link Titanium.Network.HTTPClient}.</p>
* @param {Dictionary<Titanium.Network.HTTPClient>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Network.HTTPClient} except those marked not-creation or read-only.</p>
* @returns {Titanium.Network.HTTPClient}
*/
/**
* @method getAllHTTPCookies
* <p>Gets the value of the {@link Titanium.Network#property-allHTTPCookies} property.</p>
* @returns {Titanium.Network.Cookie[]}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getRemoteDeviceUUID
* <p>Gets the value of the {@link Titanium.Network#property-remoteDeviceUUID} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getRemoteNotificationTypes
* <p>Gets the value of the {@link Titanium.Network#property-remoteNotificationTypes} property.</p>
* @returns {Number[]}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getRemoteNotificationsEnabled
* <p>Gets the value of the {@link Titanium.Network#property-remoteNotificationsEnabled} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getNetworkType
* <p>Gets the value of the {@link Titanium.Network#property-networkType} property.</p>
* @returns {Number}
*/
/**
* @method getNetworkTypeName
* <p>Gets the value of the {@link Titanium.Network#property-networkTypeName} property.</p>
* @returns {String}
*/
/**
* @method getOnline
* <p>Gets the value of the {@link Titanium.Network#property-online} property.</p>
* @returns {Boolean}
*/
/**
* @method getHttpURLFormatter
* <p>Gets the value of the {@link Titanium.Network#property-httpURLFormatter} property.</p>
* @returns {Callback<String>}
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setHttpURLFormatter
* <p>Sets the value of the {@link Titanium.Network#property-httpURLFormatter} property.</p>
* @param {Callback<String>} httpURLFormatter
<p>New value for the property.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property INADDR_ANY
* @type String
* @readonly
* <p>Special hostname value for listening sockets, representing all
locally available network interfaces.</p>
* @deprecated 1.7.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property NETWORK_LAN
* @type Number
* @readonly
* <p>A {@link Titanium.Network#property-networkType networkType} value indicating that the device is
communicating over a local-area network.</p>
* @description <p>This network type is only used by the Mobile Web platform, when the application
is running in a desktop browser attached to a LAN.</p>
<p>This constant is also a possible value for the <code>networkType</code> property of the
{@link Titanium.Network#event-change change} event.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property NETWORK_MOBILE
* @type Number
* @readonly
* <p>A {@link Titanium.Network#property-networkType networkType} value indicating that the device is
communicating over a mobile network.</p>
* @description <p>This constant is also a possible value for the <code>networkType</code> property of the
{@link Titanium.Network#event-change change} event.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property NETWORK_NONE
* @type Number
* @readonly
* <p>A {@link Titanium.Network#property-networkType networkType} value indicating that no
network is available.</p>
* @description <p>This constant is also a possible value for the <code>networkType</code> property of the
{@link Titanium.Network#event-change change} event.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property NETWORK_UNKNOWN
* @type Number
* @readonly
* <p>A {@link Titanium.Network#property-networkType networkType} value indicating that the <br>
current network type is unknown.</p>
* @description <p>This constant is also a possible value for the <code>networkType</code> property of the
{@link Titanium.Network#event-change change} event.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property NETWORK_WIFI
* @type Number
* @readonly
* <p>A {@link Titanium.Network#property-networkType networkType} value indicating that the <br>
device is communicating over a WiFi network.</p>
* @description <p>This constant is also a possible value for the <code>networkType</code> property of the
{@link Titanium.Network#event-change change} event.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property NOTIFICATION_TYPE_ALERT
* @type Number
* @readonly
* <p>Constant value for an Alert style push notification.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property NOTIFICATION_TYPE_BADGE
* @type Number
* @readonly
* <p>Constant value for a Badge style push notification.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property NOTIFICATION_TYPE_SOUND
* @type Number
* @readonly
* <p>Constant value for a Sound style push notification.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property NOTIFICATION_TYPE_NEWSSTAND
* @type Number
* @readonly
* <p>Constant value for a Newsstand style push notification. Only available on iOS5 and later</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property READ_MODE
* @type Number
* @readonly
* <p>Constant value specifying read-only mode for sockets.</p>
* @deprecated 1.7.0 Used with the deprecated <Titanium.Network.TCPSocket> only.
See <Titanium.Network.Socket> for constants used with
<Titanium.Network.Socket.TCP> sockets.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property READ_WRITE_MODE
* @type Number
* @readonly
* <p>Constant value specifying read-write mode for sockets.</p>
* @deprecated 1.7.0 Used with the deprecated <Titanium.Network.TCPSocket> only.
See <Titanium.Network.Socket> for constants used with
<Titanium.Network.Socket.TCP> sockets.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property SOCKET_CLOSED
* @type Number
* @readonly
* <p>Constant value representing a socket in the CLOSED state.</p>
* @deprecated 1.7.0 Used with the deprecated <Titanium.Network.TCPSocket> only.
See <Titanium.Network.Socket> for constants used with
<Titanium.Network.Socket.TCP> sockets.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property SOCKET_CONNECTED
* @type Number
* @readonly
* <p>Constant value representing a socket in the CONNECTED state.</p>
* @deprecated 1.7.0 Used with the deprecated <Titanium.Network.TCPSocket> only.
See <Titanium.Network.Socket> for constants used with
<Titanium.Network.Socket.TCP> sockets.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property SOCKET_ERROR
* @type Number
* @readonly
* <p>Constant value representing a socket in the ERROR state.</p>
* @deprecated 1.7.0 Used with the deprecated <Titanium.Network.TCPSocket> only.
See <Titanium.Network.Socket> for constants used with
<Titanium.Network.Socket.TCP> sockets.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property SOCKET_INITIALIZED
* @type Number
* @readonly
* <p>Constant value representing a socket in the INITIALIZED state.</p>
* @deprecated 1.7.0 Used with the deprecated <Titanium.Network.TCPSocket> only.
See <Titanium.Network.Socket> for constants used with
<Titanium.Network.Socket.TCP> sockets.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property SOCKET_LISTENING
* @type Number
* @readonly
* <p>Constant value representing a socket in the LISTENING state.</p>
* @deprecated 1.7.0 Used with the deprecated <Titanium.Network.TCPSocket> only.
See <Titanium.Network.Socket> for constants used with
<Titanium.Network.Socket.TCP> sockets.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property WRITE_MODE
* @type Number
* @readonly
* <p>Constant value specifying write-only mode for sockets.</p>
* @deprecated 1.7.0 Used with the deprecated <Titanium.Network.TCPSocket> only.
See <Titanium.Network.Socket> for constants used with
<Titanium.Network.Socket.TCP> sockets.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property TLS_VERSION_1_0
* @type Number
* @readonly
* <p>Constant value specifying TLS version 1.0 for SSL.</p>
* @platform android 3.6.0
* @platform iphone 1.8.0.1
* @platform ipad 1.8.0.1
*/
/**
* @property TLS_VERSION_1_1
* @type Number
* @readonly
* <p>Constant value specifying TLS version 1.1 for SSL.</p>
* <p> <b>Requires:</b>
Android 4.1 and later
iOS 5.0 and later
</p>
* @platform android 3.6.0
* @platform iphone 1.8.0.1
* @platform ipad 1.8.0.1
*/
/**
* @property TLS_VERSION_1_2
* @type Number
* @readonly
* <p>Constant value specifying TLS version 1.2 for SSL.</p>
* <p> <b>Requires:</b>
Android 4.1 and later
iOS 5.0 and later
</p>
* @platform android 3.6.0
* @platform iphone 1.8.0.1
* @platform ipad 1.8.0.1
*/
/**
* @property PROGRESS_UNKNOWN
* @type Number
* @readonly
* <p>Constant value specifying that the progress of a download can not be calculated.</p>
* @platform android 3.5.0
* @platform iphone 3.5.0
* @platform ipad 3.5.0
*/
/**
* @property allHTTPCookies
* @type Titanium.Network.Cookie[]
* @readonly
* <p>A list of all cookies in the cookie storage.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property remoteDeviceUUID
* @type String
* @readonly
* <p>Remote device UUID if the device is registered with the Apple Push Notification
Service, or null if it is not registered.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property remoteNotificationTypes
* @type Number[]
* @readonly
* <p>Array of push notification type constants enabled for the application.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property remoteNotificationsEnabled
* @type Boolean
* @readonly
* <p>Indicates whether push notifications have been enabled using
{@link Titanium.Network#method-registerForPushNotifications registerForPushNotifications}.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property networkType
* @type Number
* @readonly
* <p>Network type value as a constant.</p>
* @description <p>One of the <code>NETWORK</code> constants defined in {@link Titanium.Network}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Network#property-NETWORK_LAN}
<li> {@link Titanium.Network#property-NETWORK_MOBILE}
<li> {@link Titanium.Network#property-NETWORK_NONE}
<li> {@link Titanium.Network#property-NETWORK_UNKNOWN}
<li> {@link Titanium.Network#property-NETWORK_WIFI}
</ul></p>
*/
/**
* @property networkTypeName
* @type String
* @readonly
* <p>Network type as a String. Returns one of <code>NONE</code>, <code>WIFI</code>, <code>LAN</code>, <code>MOBILE</code>, or <code>UNKNOWN</code>.</p>
*/
/**
* @property online
* @type Boolean
* @readonly
* <p>Boolean value indicating if the device can reach the Internet.</p>
* @description <p>The <code>online</code> property is <code>true</code> if the device can currently reach the Internet
using either WiFi, mobile network or LAN.</p>
*/
/**
* @property httpURLFormatter
* @type Callback<String>
* <p>User-defined function that is called everytime HTTPClient connects to a remote resource.</p>
* @description <p>The URL to connect to is passed in as the only function argument, and the function
is expected to return a URL. The function should return <code>null</code> if an error occurs,
which will cancel the HTTP request. </p>
<p>This function allows URLs to be formatted for use with the application's proxy to
get around cross domain issues.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @class PushNotificationConfig
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Network.yml
* <p>Simple object for specifying push notification options to
{@link Titanium.Network#method-registerForPushNotifications registerForPushNotifications}.</p>
*/
/**
* @property types
* @type Number[]
* <p>Array of <code>NOTIFICATION_TYPE</code> constants that the application would like to receive.</p>
* @description <p>For iOS 8 and later, setting the <code>types</code> property with the
{@link Titanium.Network#method-registerForPushNotifications} method has no effect.</p>
<p>For devices running iOS 8 and later, use the
{@link Titanium.App.iOS#method-registerUserNotificationSettings Titanium.App.iOS.registerUserNotificationSettings}
method to register the notification types to receive.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Network#property-NOTIFICATION_TYPE_ALERT}
<li> {@link Titanium.Network#property-NOTIFICATION_TYPE_BADGE}
<li> {@link Titanium.Network#property-NOTIFICATION_TYPE_SOUND}
<li> {@link Titanium.Network#property-NOTIFICATION_TYPE_NEWSSTAND}
</ul></p>
*/
/**
* @property success
* @type Callback<PushNotificationSuccessArg>
* <p>Callback function called when the push registration is successfully completed.</p>
*/
/**
* @property error
* @type Callback<PushNotificationErrorArg>
* <p>Callback function called when an error occurs during registration.</p>
*/
/**
* @property callback
* @type Callback<PushNotificationData>
* <p>Callback function invoked upon receiving a new push notification.</p>
*/
/**
* @class PushNotificationSuccessArg
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends SuccessResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Network.yml
* <p>A simple object passed to the
{@link Titanium.Network#method-registerForPushNotifications registerForPushNotifications} success callback.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded. Returns <code>true</code>.</p>
* @description <p>Returns <code>true</code>.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Will be undefined.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property code
* @type Number
* <p>Error code. Returns 0.</p>
* @description <p>Error code will be 0.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property type
* @type String
* <p>The value of this string is always "remote".</p>
*/
/**
* @property deviceToken
* @type String
* <p>The device token which this device was registered for.</p>
*/
/**
* @class PushNotificationErrorArg
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends FailureResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Network.yml
* <p>A simple object passed to the
{@link Titanium.Network#method-registerForPushNotifications registerForPushNotifications} error callback.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded. Returns <code>false</code>.</p>
* @description <p>Returns <code>false</code>.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property code
* @type Number
* <p>Error code. Returns a non-zero value.</p>
* @description <p>If the error was generated by the operating system, that system's error value
is used. Otherwise, this value will be -1.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property type
* @type String
* <p>The value of this string is always "remote".</p>
*/
/**
* @class PushNotificationData
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Network.yml
* <p>A simple object representing a push notification.</p>
*/
/**
* @property data
* @type Dictionary
* <p>The <code>userinfo</code> dictionary passed to the Apple Push Notification Service.</p>
* @description <p>For more information, see the following item in the iOS Developer Library:</p>
<p><a href="http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/application%3adidReceiveRemoteNotification:">application:didReceiveRemoteNotification in the UIApplicationDelegate Protocol
Reference</a></p>
*/
/**
* @property inBackground
* @type Boolean
* <p>Boolean indicating if notification was received while app was in background.
This property became available in Titanium Mobile 3.1.0 for iOS.</p>
*/
/**
* @class Titanium.Network.Socket
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Socket/Socket.yml
* <p>Socket module, used for creating sockets.</p>
*/
/**
* @method createTCP
* <p>Returns a new TCP socket object.</p>
* @description <p>Takes a dictionary containing properties defined in {@link Titanium.Network.Socket.TCP}. <br>
Some properties are only needed based on whether the socket will be a connecting
(client) socket or a listening (server) socket.</p>
* @param {Dictionary<Titanium.Network.Socket.TCP>} params (optional)
<p>Creation parameters.</p>
* @returns {Titanium.Network.Socket.TCP}New TCP socket.
*/
/**
* @method createUDP
* <p>Creates and returns an instance of {@link Titanium.Network.Socket.UDP}.</p>
* @param {Dictionary<Titanium.Network.Socket.UDP>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Network.Socket.UDP} except those marked not-creation or read-only.</p>
* @returns {Titanium.Network.Socket.UDP}
* @platform windowsphone 4.1.0
*/
/**
* @property INITIALIZED
* @type Number
* @readonly
* <p>State value representing an initialized socket.</p>
* @description <p>The initial state of a newly-created socket.</p>
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
*/
/**
* @property CONNECTED
* @type Number
* @readonly
* <p>State value representing a connected socket.</p>
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
*/
/**
* @property LISTENING
* @type Number
* @readonly
* <p>State value representing a socket that is listening for connections.</p>
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
*/
/**
* @property CLOSED
* @type Number
* @readonly
* <p>State value representing a closed socket.</p>
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
*/
/**
* @property ERROR
* @type Number
* @readonly
* <p>State value indicating an error has occurred on the socket.</p>
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
*/
/**
* @class Titanium.Network.Socket.TCP
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @extends Titanium.IOStream
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Socket/TCP.yml
* <p>TCP socket that implements the <code>Titanium.IOStream</code> interface.</p>
* @description <p>Most socket operations are asynchronous. When you create a socket, you can define
callback funtions to receive the results of API calls, as well as to handle incoming
data.</p>
<p>For example, for a client-side socket, you define
{@link Titanium.Network.Socket.TCP#property-connected connected} and
{@link Titanium.Network.Socket.TCP#property-error error} callback functions.</p>
<p>To connect to a remote host, call the socket's
{@link Titanium.Network.Socket.TCP#method-connect connect} method. If the socket connects
successfully, your <code>connected</code> callback is invoked, and you can send and receive data
on the socket. If the socket connection fails, your <code>error</code> callback is invoked. </p>
<p>After a socket is connected, you can access it like any other {@link Titanium.IOStream}.
Note that the socket's <code>read</code> and <code>write</code> methods may block, so in most cases
you should use the asynchronous {@link Titanium.Stream#method-read read}, {@link Titanium.Stream#method-write write}
and {@link Titanium.Stream#method-pump pump} methods provided by the {@link Titanium.Stream} module,
rather than using the socket object's <code>read</code> and <code>write</code> methods directly.</p>
<p>A familiarity with the basics of BSD socket programming is a recommended before using
sockets with Titanium.</p>
<p>Use the {@link Titanium.Network.Socket#method-createTCP} method to create a TCP socket.</p>
* <h3>Examples</h3>
<h4>Simple Socket IO using Stream.pump</h4>
<p>The following example uses the {@link Titanium.Stream#method-pump pump} method from the {@link Titanium.Stream}
module to read data from a socket. The <code>pump</code> method registers a callback that is
called repeatedly to process incoming data from the socket.</p>
<pre><code>var socket = Ti.Network.Socket.createTCP({
host: 'blog.example.com', port: 80,
connected: function (e) {
Ti.API.info('Socket opened!');
Ti.Stream.pump(e.socket, readCallback, 1024, true);
Ti.Stream.write(socket, Ti.createBuffer({
value: 'GET http://blog.example.com/index.html HTTP/1.1\r\n\r\n'
}), writeCallback);
},
error: function (e) {
Ti.API.info('Error (' + e.errorCode + '): ' + e.error);
},
});
socket.connect();
function writeCallback(e) {
Ti.API.info('Successfully wrote to socket.');
}
function readCallback(e) {
if (e.bytesProcessed == -1)
{
// Error / EOF on socket. Do any cleanup here.
...
}
try {
if(e.buffer) {
var received = e.buffer.toString();
Ti.API.info('Received: ' + received);
} else {
Ti.API.error('Error: read callback called with no buffer!');
}
} catch (ex) {
Ti.API.error(ex);
}
}
</code></pre><h4>Listening Socket Example</h4>
<p>The following sample shows a trivial example of using a listening
socket. In this case, the application simply sends messages to itself,
using the loopback address.</p>
<pre><code>// Hostname to listen on/connect to. Here we use the loopback
// address. iOS also supports Ti.Platform.address (the address of
// the WiFi interface).
// Android supports only the loopback address.
var hostname = '127.0.0.1';
var clientSocket = Ti.Network.Socket.createTCP({
host : hostname,
port : 40404,
connected : function(e) {
Ti.API.info('Client socket connected!');
Ti.Stream.pump(e.socket, pumpCallback, 1024, true);
e.socket.write(Ti.createBuffer({
value : 'A message from a connecting socket.'
}));
},
error : function(e) {
Ti.API.info('Error (' + e.errorCode + '): ' + e.error);
}
});
function writeCallback(e) {
Ti.API.info('Successfully wrote to socket.');
}
function pumpCallback(e) {
// Has the remote socket closed its end?
if (e.bytesProcessed < 0) {
Ti.API.info("Closing client socket.");
clientSocket.close();
return;
}
try {
if(e.buffer) {
var received = e.buffer.toString();
Ti.API.info('Received: ' + received);
} else {
Ti.API.error('Error: read callback called with no buffer!');
}
} catch (ex) {
Ti.API.error(ex);
}
}
//Create a socket and listen for incoming connections
var listenSocket = Ti.Network.Socket.createTCP({
host : hostname,
port : 40404,
accepted : function(e) {
// This where you would usually store the newly-connected socket, e.inbound
// so it can be used for read / write operations elsewhere in the app.
// In this case, we simply send a message then close the socket.
Ti.API.info("Listening socket <" + e.socket + "> accepted incoming connection <" + e.inbound + ">");
e.inbound.write(Ti.createBuffer({
value : 'You have been connected to a listening socket.\r\n'
}));
e.inbound.close();
// close the accepted socket
},
error : function(e) {
Ti.API.error("Socket <" + e.socket + "> encountered error when listening");
Ti.API.error(" error code <" + e.errorCode + ">");
Ti.API.error(" error description <" + e.error + ">");
}
});
// Starts the socket listening for connections, does not accept them
listenSocket.listen();
Ti.API.info("Listening now...");
// Tells socket to accept the next inbound connection. listenSocket.accepted gets
// called when a connection is accepted via accept()
Ti.API.info("Calling accept.");
listenSocket.accept({
timeout : 10000
});
// Call connect after a short timeout to ensure the listening socket is ready to go.
Ti.API.info("Setting timer to connect.");
setTimeout(function(e)
{
Ti.API.info("Calling connect on client socket.");
clientSocket.connect();
}, 500);
</code></pre>
*/
/**
* @method close
* <p>Closes a socket.</p>
* @description <p>Throws exception if the socket is not in a {@link Titanium.Network.Socket#property-CONNECTED CONNECTED}
or {@link Titanium.Network.Socket#property-LISTENING LISTENING} state. Blocking.</p>
*/
/**
* @method connect
* <p>Attempts to connect the socket to its host/port.</p>
* @description <p>Throws an exception if the socket is in a {@link Titanium.Network.Socket#property-CONNECTED CONNECTED}
or {@link Titanium.Network.Socket#property-LISTENING LISTENING} state.
Throws an exception if a valid host and port has not been set on this socket. </p>
<p>Nonblocking; connection attempts are asynchronous.</p>
*/
/**
* @method listen
* <p>Attempts to start listening on the socket's host/port.</p>
* @description <p>The <code>listen</code> call will attempt to listen on the specified host and/or port
property for the socket if they are set. </p>
<p>Nonblocking; may return before the socket is fully open and listening.</p>
<p>If the socket is already in a {@link Titanium.Network.Socket#property-LISTENING LISTENING} or
{@link Titanium.Network.Socket#property-CONNECTED CONNECTED} state, <code>listen</code> throws an exception
and sets the socket state to {@link Titanium.Network.Socket#property-ERROR ERROR}, but does
<strong>not</strong> fire the error callback.</p>
<p>Any error encountered after the socket starts listening results in the error
callback being fired.</p>
*/
/**
* @method accept
* <p>Tells a {@link Titanium.Network.Socket#property-LISTENING LISTENING} socket to accept a connection request at the top of a listener's request queue when one becomes available.</p>
* @description <p>Nonblocking; if there are no connections in the queue, sets a flag so that
the socket accepts the next incoming connection immediately. </p>
<p>Takes an argument, an {@link AcceptDict} object which assigns options to the new
connection. If the socket is already flagged to accept the next connection,
the existing accept options will be updated to use the newly specified <code>options</code>
object. </p>
<p>The <code>accepted</code> callback is called when a new connection is accepted as a result of
calling <code>accept</code>. The callback argument holds a reference to a new socket,
representing the accepted connection.</p>
<p>Note that the connected callback is <strong>not</strong> called on the newly created socket. <br>
This is because the socket is created in the
{@link Titanium.Network.Socket#property-CONNECTED CONNECTED} state, so it never transitions
to the <code>CONNECTED</code> state.</p>
<p>Throws an exception if called on a socket that is not in a
{@link Titanium.Network.Socket#property-LISTENING LISTENING} state.</p>
* @param {AcceptDict} options
<p>Options to be set on next accepted socket.</p>
*/
/**
* @method getHost
* <p>Gets the value of the {@link Titanium.Network.Socket.TCP#property-host} property.</p>
* @returns {String}
*/
/**
* @method setHost
* <p>Sets the value of the {@link Titanium.Network.Socket.TCP#property-host} property.</p>
* @param {String} host
<p>New value for the property.</p>
*/
/**
* @method getPort
* <p>Gets the value of the {@link Titanium.Network.Socket.TCP#property-port} property.</p>
* @returns {Number}
*/
/**
* @method setPort
* <p>Sets the value of the {@link Titanium.Network.Socket.TCP#property-port} property.</p>
* @param {Number} port
<p>New value for the property.</p>
*/
/**
* @method getListenQueueSize
* <p>Gets the value of the {@link Titanium.Network.Socket.TCP#property-listenQueueSize} property.</p>
* @returns {Number}
*/
/**
* @method setListenQueueSize
* <p>Sets the value of the {@link Titanium.Network.Socket.TCP#property-listenQueueSize} property.</p>
* @param {Number} listenQueueSize
<p>New value for the property.</p>
*/
/**
* @method getTimeout
* <p>Gets the value of the {@link Titanium.Network.Socket.TCP#property-timeout} property.</p>
* @returns {Number}
*/
/**
* @method setTimeout
* <p>Sets the value of the {@link Titanium.Network.Socket.TCP#property-timeout} property.</p>
* @param {Number} timeout
<p>New value for the property.</p>
*/
/**
* @method getConnected
* <p>Gets the value of the {@link Titanium.Network.Socket.TCP#property-connected} property.</p>
* @returns {Callback<ConnectedCallbackArgs>}
*/
/**
* @method setConnected
* <p>Sets the value of the {@link Titanium.Network.Socket.TCP#property-connected} property.</p>
* @param {Callback<ConnectedCallbackArgs>} connected
<p>New value for the property.</p>
*/
/**
* @method getError
* <p>Gets the value of the {@link Titanium.Network.Socket.TCP#property-error} property.</p>
* @returns {Callback<ErrorCallbackArgs>}
*/
/**
* @method setError
* <p>Sets the value of the {@link Titanium.Network.Socket.TCP#property-error} property.</p>
* @param {Callback<ErrorCallbackArgs>} error
<p>New value for the property.</p>
*/
/**
* @method getAccepted
* <p>Gets the value of the {@link Titanium.Network.Socket.TCP#property-accepted} property.</p>
* @returns {Callback<AcceptedCallbackArgs>}
*/
/**
* @method setAccepted
* <p>Sets the value of the {@link Titanium.Network.Socket.TCP#property-accepted} property.</p>
* @param {Callback<AcceptedCallbackArgs>} accepted
<p>New value for the property.</p>
*/
/**
* @method getState
* <p>Gets the value of the {@link Titanium.Network.Socket.TCP#property-state} property.</p>
* @returns {Number}
*/
/**
* @property host
* @type String
* <p>The host to connect to or listen on.</p>
* @description <p>Can only be modified when this socket is in the {@link Titanium.Network.Socket#property-INITIALIZED INITIALIZED} state. </p>
<p>Supports both IPv4 and IPv6 addresses.</p>
*/
/**
* @property port
* @type Number
* <p>The port to connect to or listen on.</p>
* @description <p>Can only be modified when this socket is in the {@link Titanium.Network.Socket#property-INITIALIZED INITIALIZED} state.</p>
*/
/**
* @property listenQueueSize
* @type Number
* <p>Max number of pending incoming connections to be allowed when the socket is in the {@link Titanium.Network.Socket#property-LISTENING LISTENING} state.</p>
* @description <p>Any incoming connections received while the max number of pending connections has
been reached will be rejected.</p>
*/
/**
* @property timeout
* @type Number
* <p>Timeout, in milliseconds, for <code>connect</code> and all <code>write</code> operations.</p>
* @description <p>Can only be modified when this socket is in the {@link Titanium.Network.Socket#property-INITIALIZED INITIALIZED} state. </p>
*/
/**
* @property connected
* @type Callback<ConnectedCallbackArgs>
* <p>Callback to be fired when the socket enters the "connected" state.</p>
* @description <p>Only invoked following a successful {@link Titanium.Network.Socket.TCP#method-connect connect}
call.</p>
<p>Can only be modified when this socket is in the {@link Titanium.Network.Socket#property-INITIALIZED INITIALIZED} state. </p>
*/
/**
* @property error
* @type Callback<ErrorCallbackArgs>
* <p>Callback to be fired when the socket enters the {@link Titanium.Network.Socket#property-ERROR ERROR} state.</p>
*/
/**
* @property accepted
* @type Callback<AcceptedCallbackArgs>
* <p>Callback to be fired when a listener accepts a connection.</p>
*/
/**
* @property state
* @type Number
* @readonly
* <p>Current state of the socket.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Network.Socket#property-INITIALIZED}
<li> {@link Titanium.Network.Socket#property-CONNECTED}
<li> {@link Titanium.Network.Socket#property-LISTENING}
<li> {@link Titanium.Network.Socket#property-CLOSED}
<li> {@link Titanium.Network.Socket#property-ERROR}
</ul></p>
*/
/**
* @class ConnectedCallbackArgs
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Socket/TCP.yml
* <p>Argument object passed to the {@link Titanium.Network.Socket.TCP#property-connected connected} callback when the socket connects.</p>
* @description <p>Only invoked following a successful {@link Titanium.Network.Socket.TCP#method-connect connect}
call.</p>
*/
/**
* @property socket
* @type Titanium.Network.Socket.TCP
* <p>Socket instance that has been connected.</p>
*/
/**
* @class ErrorCallbackArgs
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @pseudo
* @extends FailureResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Socket/TCP.yml
* <p>Object passed to the error callback when the socket enters the {@link Titanium.Network.Socket#property-ERROR ERROR} state.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded. Returns <code>false</code>.</p>
* @description <p>Returns <code>false</code>.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property code
* @type Number
* <p>Error code. Returns a non-zero value.</p>
* @description <p>If the error was generated by the operating system, that system's error value
is used. Otherwise, this value will be -1.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property socket
* @type Titanium.Network.Socket.TCP
* <p>Socket that experienced the error.</p>
*/
/**
* @property errorCode
* @type Number
* <p>The error code of the error (potentially system-dependent).</p>
* @deprecated 3.1.0
*/
/**
* @class AcceptedCallbackArgs
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Socket/TCP.yml
* <p>Argument object passed to the {@link Titanium.Network.Socket.TCP#property-accepted accepted}
callback when a listener accepts a connection.</p>
*/
/**
* @property socket
* @type Titanium.Network.Socket.TCP
* <p>Socket which received the connection.</p>
*/
/**
* @property inbound
* @type Titanium.Network.Socket.TCP
* <p>Socket which represents the inbound connection.</p>
* @description <p>This should be considered a 'connected' socket and is created in
the {@link Titanium.Network.Socket#property-CONNECTED CONNECTED} state.</p>
*/
/**
* @class AcceptDict
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Socket/TCP.yml
* <p>Options object for the {@link Titanium.Network.Socket.TCP#method-accept accept} method.</p>
* @description <p>Simple object that defines properties to be set on the next accepted socket.</p>
*/
/**
* @property timeout
* @type Number
* <p>Timeout, in milliseconds, for all <code>write</code> operations.</p>
* @description <p>Can only be modified when this socket is in the
{@link Titanium.Network.Socket#property-INITIALIZED INITIALIZED} state. </p>
*/
/**
* @property error
* @type Callback<ErrorCallbackArgs>
* <p>Callback to be fired when the socket enters the {@link Titanium.Network.Socket#property-ERROR ERROR} state.</p>
*/
/**
* @class Titanium.Network.TCPSocket
* @platform iphone 1.2.0
* @platform ipad 1.2.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/TCPSocket.yml
* <p>The TCPSocket instance returned from {@link Titanium.Network#method-createTCPSocket}. This object
represents a socket which either listens locally on the device for connections,
or connects to a remote machine.</p>
* @deprecated 1.7.0 USE <Titanium.Network.Socket.TCP> WHERE POSSIBLE.
* @description <p>Sockets are nontrivial; it is recommended that anyone using them be familiar with the basics of BSD sockets. All sockets use TCP connections, and are asynchronous for read operations, so your program should be ready to receive 'read' events at any point. Socket references cannot be transferred to socket objects, and vice-versa - socket references are an internal mechanism which is used only to determine which sockets to send data to and read data from. For listening sockets, it is highly recommended that you use the {@link Titanium.Network#property-INADDR_ANY} constant as the host name. If a window containing a socket is closed, the socket MUST be closed also unless you intend to continue to receive data, otherwise the socket will consume resources (and potentially cause conflicts with opening the window again, if a listener) until the program is restarted. Be aware of the differences between the listen() and connect() functions; attempting to use one when you mean the other may result in errors, unpredictable behavior, or both.</p>
*/
/**
* @event read
* <p>new data was read off the socket</p>
* @param {String} from
<p>the reference for the socket that data was retrieved from</p>
* @param {String} data
<p>a blob representing the data read, can be interpreted via toString</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event readError
* <p>an error occured when reading</p>
* @param {Boolean} success
<p>Indicates a successful operation. Returns <code>false</code>.</p>
* @param {String} error
<p>Error message, if any returned. May be undefined.</p>
* @param {Number} code
<p>Error code.
If the error was generated by the operating system, that system's error value
is used. Otherwise, this value will be -1.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event writeError
* <p>an error occured when writing</p>
* @param {Boolean} success
<p>Indicates a successful operation. Returns <code>false</code>.</p>
* @param {String} error
<p>Error message, if any returned. May be undefined.</p>
* @param {Number} code
<p>Error code.
If the error was generated by the operating system, that system's error value
is used. Otherwise, this value will be -1.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method close
* <p>close the socket</p>
*/
/**
* @method connect
* <p>connect the scocket to a TCP server</p>
*/
/**
* @method listen
* <p>set up the socket to receive connections</p>
*/
/**
* @method write
* <p>write data to the socket, if the mode is WRITE_MODE or READ_WRITE_MODE</p>
* @param {Object/String} data
<p>either a string or blob object representing the data to be transferred</p>
* @param {Number} sendTo
<p>the socket reference to send the data to. Default is to send to all connected sockets</p>
*/
/**
* @method getHostName
* <p>Gets the value of the {@link Titanium.Network.TCPSocket#property-hostName} property.</p>
* @returns {String}
*/
/**
* @method setHostName
* <p>Sets the value of the {@link Titanium.Network.TCPSocket#property-hostName} property.</p>
* @param {String} hostName
<p>New value for the property.</p>
*/
/**
* @method getIsValid
* <p>Gets the value of the {@link Titanium.Network.TCPSocket#property-isValid} property.</p>
* @returns {Boolean}
*/
/**
* @method setIsValid
* <p>Sets the value of the {@link Titanium.Network.TCPSocket#property-isValid} property.</p>
* @param {Boolean} isValid
<p>New value for the property.</p>
*/
/**
* @method getMode
* <p>Gets the value of the {@link Titanium.Network.TCPSocket#property-mode} property.</p>
* @returns {Number}
*/
/**
* @method setMode
* <p>Sets the value of the {@link Titanium.Network.TCPSocket#property-mode} property.</p>
* @param {Number} mode
<p>New value for the property.</p>
*/
/**
* @method getPort
* <p>Gets the value of the {@link Titanium.Network.TCPSocket#property-port} property.</p>
* @returns {Number}
*/
/**
* @method setPort
* <p>Sets the value of the {@link Titanium.Network.TCPSocket#property-port} property.</p>
* @param {Number} port
<p>New value for the property.</p>
*/
/**
* @method getStripTerminator
* <p>Gets the value of the {@link Titanium.Network.TCPSocket#property-stripTerminator} property.</p>
* @returns {Boolean}
*/
/**
* @method setStripTerminator
* <p>Sets the value of the {@link Titanium.Network.TCPSocket#property-stripTerminator} property.</p>
* @param {Boolean} stripTerminator
<p>New value for the property.</p>
*/
/**
* @property hostName
* @type String
* <p>the host name to connect to. Must be {@link Titanium.Network#property-INADDR_ANY} or an identifier for the local device in order to listen</p>
*/
/**
* @property isValid
* @type Boolean
* <p>whether or not the socket is valid</p>
*/
/**
* @property mode
* @type Number
* <p>the socket's mode</p>
*/
/**
* @property port
* @type Number
* <p>the port to connect/listen on</p>
*/
/**
* @property stripTerminator
* @type Boolean
* <p>strip terminating null character when sending string data; default is false</p>
*/
/**
* @class Titanium.Platform.Android
* @platform android 1.8.2
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Platform/Android/Android.yml
* <p>The Android-specific Platform module, used to access the device's platform-related functionality.</p>
*/
/**
* @method getPhysicalSizeCategory
* <p>Gets the value of the {@link Titanium.Platform.Android#property-physicalSizeCategory} property.</p>
* @returns {Number}
*/
/**
* @property API_LEVEL
* @type Number
* @readonly
* <p>Android API level identifier of the Operating System.</p>
* @description <p>See the official Android Developers documentation for more information about
<a href="http://developer.android.com/guide/appendix/api-levels.html">API levels</a>.</p>
*/
/**
* @property PHYSICAL_SIZE_CATEGORY_LARGE
* @type Number
* @readonly
* <p>Constant to indicate that the physical size category of the current device/emulator is large</p>
* @description <p>See the official Android Developers documentation for more information about
<a href="http://developer.android.com/reference/android/content/res/Configuration.html#SCREENLAYOUT_SIZE_LARGE">large screen sizes</a></p>
*/
/**
* @property PHYSICAL_SIZE_CATEGORY_NORMAL
* @type Number
* @readonly
* <p>Constant to indicate that the physical size category of the current device/emulator is normal</p>
* @description <p>See the official Android Developers documentation for more information about
<a href="http://developer.android.com/reference/android/content/res/Configuration.html#SCREENLAYOUT_SIZE_NORMAL">normal screen sizes</a></p>
*/
/**
* @property PHYSICAL_SIZE_CATEGORY_SMALL
* @type Number
* @readonly
* <p>Constant to indicate that the physical size category of the current device/emulator is small</p>
* @description <p>See the official Android Developers documentation for more information about
<a href="http://developer.android.com/reference/android/content/res/Configuration.html#SCREENLAYOUT_SIZE_SMALL">small screen sizes</a></p>
*/
/**
* @property PHYSICAL_SIZE_CATEGORY_UNDEFINED
* @type Number
* @readonly
* <p>Constant to indicate that the physical size category of the current device/emulator is undefined</p>
* @description <p>See the official Android Developers documentation for more information about
<a href="http://developer.android.com/reference/android/content/res/Configuration.html#SCREENLAYOUT_SIZE_UNDEFINED">undefined screen sizes</a></p>
*/
/**
* @property PHYSICAL_SIZE_CATEGORY_XLARGE
* @type Number
* @readonly
* <p>Constant to indicate that the physical size category of the current device/emulator is extra large</p>
* @description <p>See the official Android Developers documentation for more information about
<a href="http://developer.android.com/reference/android/content/res/Configuration.html#SCREENLAYOUT_SIZE_XLARGE">extra large screen sizes</a></p>
*/
/**
* @property physicalSizeCategory
* @type Number
* @readonly
* <p>The physical size category of the Android device or emulator. </p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Platform.Android#property-PHYSICAL_SIZE_CATEGORY_LARGE}
<li> {@link Titanium.Platform.Android#property-PHYSICAL_SIZE_CATEGORY_NORMAL}
<li> {@link Titanium.Platform.Android#property-PHYSICAL_SIZE_CATEGORY_SMALL}
<li> {@link Titanium.Platform.Android#property-PHYSICAL_SIZE_CATEGORY_UNDEFINED}
<li> {@link Titanium.Platform.Android#property-PHYSICAL_SIZE_CATEGORY_XLARGE}
</ul></p>
*/
/**
* @class Titanium.Platform.DisplayCaps
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Platform/DisplayCaps.yml
* <p>The Display Caps object returned by the {@link Titanium.Platform#property-displayCaps} property.</p>
* @description <p>On iPhone and iPod devices with retina display, the <code>density</code> property is <code>high</code> and the <code>dpi</code>
property is <code>320</code>. For other iPhone and iPod devices, <code>density</code> is <code>medium</code> and <code>dpi</code> is <code>160</code>.</p>
<p>On iPad devices with retina display, the <code>density</code> property is <code>high</code> and the <code>dpi</code>
property is <code>260</code>. For other iPad devices, <code>density</code> is <code>medium</code> and <code>dpi</code> is <code>130</code>.</p>
<p>Note that Xcode versions prior to 4.3.1 do not have the correct tools to detect the iPad 3
retina display. Apps must be built with Xcode 4.3.1 or later to detect iPad 3 retina display.</p>
<p>Note that the <code>displayCaps</code> property begins with a lowercase letter, which differentiates it
from the <code>DisplayCaps</code> object that it returns. Refer to the example to understand how it should
be called.</p>
* <h3>Examples</h3>
<h4>System Display Information</h4>
<p>Output the display properties to the system log.</p>
<pre><code>Ti.API.info('Ti.Platform.displayCaps.density: ' + Ti.Platform.displayCaps.density);
Ti.API.info('Ti.Platform.displayCaps.dpi: ' + Ti.Platform.displayCaps.dpi);
Ti.API.info('Ti.Platform.displayCaps.platformHeight: ' + Ti.Platform.displayCaps.platformHeight);
Ti.API.info('Ti.Platform.displayCaps.platformWidth: ' + Ti.Platform.displayCaps.platformWidth);
if((Ti.Platform.osname === 'iphone')||(Ti.Platform.osname === 'ipad')||(Ti.Platform.osname === 'android')){
Ti.API.info('Ti.Platform.displayCaps.logicalDensityFactor: ' + Ti.Platform.displayCaps.logicalDensityFactor);
}
if(Ti.Platform.osname === 'android'){
Ti.API.info('Ti.Platform.displayCaps.xdpi: ' + Ti.Platform.displayCaps.xdpi);
Ti.API.info('Ti.Platform.displayCaps.ydpi: ' + Ti.Platform.displayCaps.ydpi);
}
</code></pre>
*/
/**
* @method getDensity
* <p>Gets the value of the {@link Titanium.Platform.DisplayCaps#property-density} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getDpi
* <p>Gets the value of the {@link Titanium.Platform.DisplayCaps#property-dpi} property.</p>
* @returns {Number}
*/
/**
* @method getLogicalDensityFactor
* <p>Gets the value of the {@link Titanium.Platform.DisplayCaps#property-logicalDensityFactor} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 3.4.1
* @platform ipad 3.4.1
* @platform windowsphone 4.1.0
*/
/**
* @method getPlatformHeight
* <p>Gets the value of the {@link Titanium.Platform.DisplayCaps#property-platformHeight} property.</p>
* @returns {Number}
*/
/**
* @method getPlatformWidth
* <p>Gets the value of the {@link Titanium.Platform.DisplayCaps#property-platformWidth} property.</p>
* @returns {Number}
*/
/**
* @method getXdpi
* <p>Gets the value of the {@link Titanium.Platform.DisplayCaps#property-xdpi} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getYdpi
* <p>Gets the value of the {@link Titanium.Platform.DisplayCaps#property-ydpi} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property density
* @type String
* @readonly
* <p>Logical density of the display.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property dpi
* @type Number
* @readonly
* <p>Display density expressed as dots-per-inch.</p>
*/
/**
* @property logicalDensityFactor
* @type Number
* @readonly
* <p>Logical density of the display, as a scaling factor for the Density Independent Pixel (dip)
unit.</p>
* @description <p>One dip is one pixel on a 160dpi display, approximately, with a 240x320, 1.5"x2" display
providing a baseline. For example, for a 160dpi display, this value will be 1, and for 120dpi,
it will be .75.</p>
<p>This value does not precisely follow the real display size, as given by <code>xdpi</code> and <code>ydpi</code>,
but instead is used to scale the size of the overall UI in steps based on changes in the
display dpi. For example, a 240x320 screen will have a density of 1, whether its width is
1.8" or 1.3". However, if the resolution is increased to 320x480 but the display remains
1.5"x2" then the density would be increased to about 1.5.</p>
<p>On iOS devices, this property returns 1, 2 and 3 for @1x, @2x and @3x respectively.
Note for iPhone 6+, this value is 3.</p>
* @platform android 0.8
* @platform iphone 3.4.1
* @platform ipad 3.4.1
* @platform windowsphone 4.1.0
*/
/**
* @property platformHeight
* @type Number
* @readonly
* <p>Absolute height of the display in relation to UI orientation. Measured in platform-specific
units; pixels on Android and density-independent pixels (dip) on iOS.</p>
* @description <p>This property depends on the orientation of the UI, rather than the physical orientation of
the device. While these may often be one in the same, it is not necessarily the case when
orientation is restricted by {@link Titanium.UI.Window#property-orientationModes}. See example for
clarification.</p>
* <h3>Examples</h3>
<h4>Platform Width and Height</h4>
<p>Create a window and limit it to portrait mode. Start the app and observe that the platform
width and height is output to the log. Change the physical orientation of the device and
click the window to test again. Note that the logged information relates to the UI rather
than the physical orientation of the device.</p>
<pre><code>var win = Ti.UI.createWindow({
title: 'Click window to output UI dimensions',
backgroundColor: 'white',
orientationModes: [ Titanium.UI.PORTRAIT ], // UI restricted to portrait mode
fullscreen: false,
exitOnClose: true
});
var label = Ti.UI.createLabel({
text:'Hello world'
});
win.add(label);
function logDisplayCaps(){
Ti.API.info('Width x Height: ' + Ti.Platform.displayCaps.platformWidth + ' x ' + Ti.Platform.displayCaps.platformHeight);
}
win.addEventListener('click',function(e){
// as the UI orientation is restricted by orientationModes, this will only ever
// output the dimensions of the UI in portrait mode. For example, 480 x 800 for the
// Android device tested
logDisplayCaps();
});
win.open();
logDisplayCaps();
</code></pre>
*/
/**
* @property platformWidth
* @type Number
* @readonly
* <p>Absolute width of the display in relation to UI orientation. Measured in platform-specific
units; pixels on Android and density-independent pixels (dip) on iOS.</p>
* @description <p>This property depends on the orientation of the UI, rather than the physical orientation of
the device. While these may often be one in the same, it is not necessarily the case when
orientation is restricted by {@link Titanium.UI.Window#property-orientationModes}. See example for
clarification.</p>
* <h3>Examples</h3>
<h4>Platform Width and Height</h4>
<p>Create a window and limit it to portrait mode. Start the app and observe that the platform
width and height is output to the log. Change the physical orientation of the device and
click the window to test again. Note that the logged information relates to the UI rather
than the physical orientation of the device.</p>
<pre><code>var win = Ti.UI.createWindow({
title: 'Click window to output UI dimensions',
backgroundColor: 'white',
orientationModes: [ Titanium.UI.PORTRAIT ], // UI restricted to portrait mode
fullscreen: false,
exitOnClose: true
});
var label = Ti.UI.createLabel({
text:'Hello world'
});
win.add(label);
function logDisplayCaps(){
Ti.API.info('Width x Height: ' + Ti.Platform.displayCaps.platformWidth + ' x ' + Ti.Platform.displayCaps.platformHeight);
}
win.addEventListener('click',function(e){
// as the UI orientation is restricted by orientationModes, this will only ever
// output the dimensions of the UI in portrait mode. For example, 480 x 800 for the
// Android device tested
logDisplayCaps();
});
win.open();
logDisplayCaps();
</code></pre>
*/
/**
* @property xdpi
* @type Number
* @readonly
* <p>Physical pixels per inch of the display in the X dimension.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property ydpi
* @type Number
* @readonly
* <p>Physical pixels per inch of the display in the Y dimension.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.Platform
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Platform/Platform.yml
* <p>The top-level Platform module. The Platform module is used to access the device's platform-related
functionality.</p>
* <h3>Examples</h3>
<h4>Battery Event Example</h4>
<p>Obtaining battery data when the battery state changes.</p>
<pre><code>Titanium.Platform.addEventListener('battery', function(e){
Ti.API.info('The battery state has changed to ' + e.state);
Ti.API.info('The battery level is ' + e.level);
Ti.API.info('The battery event source is ' + e.source);
Ti.API.info('The battery event name ' + e.type);
});
</code></pre>
*/
/**
* @event battery
* <p>Fired when the battery state changes. This is measured in 5% increments on iPhone/iPad.</p>
* @param {Number} state
<p>The battery state.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Platform#property-BATTERY_STATE_CHARGING}
<li> {@link Titanium.Platform#property-BATTERY_STATE_FULL}
<li> {@link Titanium.Platform#property-BATTERY_STATE_UNKNOWN}
<li> {@link Titanium.Platform#property-BATTERY_STATE_UNPLUGGED}
</ul></p>
* @param {Number} level
<p>Percentage battery power level.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method createUUID
* <p>Creates a globally-unique identifier.</p>
* @returns {String}
*/
/**
* @method canOpenURL
* <p>Returns whether the system is configured with a default application to handle the URL's protocol.</p>
* @description <p>On Mobile Web, this method always returns true, even if the browser can't open the specific URL,
unless the URL is empty or undefined.</p>
<p>On iOS, this method might return false if you have not whitelisted the URL schemes you query in your <a href="http://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference-section-29004921_tiapp.xmlandtimodule.xmlReference-iOS9SecurityandcanOpenUrl">tiapp.xml</a>.</p>
* @param {String} url
<p>The url to check.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method openURL
* <p>Opens this URL using the system's default application for its protocol.</p>
* @param {String} url
<p>The url to open.</p>
* @returns {Boolean}
*/
/**
* @method is24HourTimeFormat
* <p>Returns whether the system settings are configured to show times in 24-hour format.</p>
* @description <p>On Mobile Web, this function always returns false.</p>
* @returns {Boolean}
*/
/**
* @method getAddress
* <p>Gets the value of the {@link Titanium.Platform#property-address} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getArchitecture
* <p>Gets the value of the {@link Titanium.Platform#property-architecture} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAvailableMemory
* <p>Gets the value of the {@link Titanium.Platform#property-availableMemory} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBatteryLevel
* <p>Gets the value of the {@link Titanium.Platform#property-batteryLevel} property.</p>
* @returns {Number}
*/
/**
* @method getBatteryMonitoring
* <p>Gets the value of the {@link Titanium.Platform#property-batteryMonitoring} property.</p>
* @returns {Boolean}
*/
/**
* @method setBatteryMonitoring
* <p>Sets the value of the {@link Titanium.Platform#property-batteryMonitoring} property.</p>
* @param {Boolean} batteryMonitoring
<p>New value for the property.</p>
*/
/**
* @method getBatteryState
* <p>Gets the value of the {@link Titanium.Platform#property-batteryState} property.</p>
* @returns {Number}
*/
/**
* @method getId
* <p>Gets the value of the {@link Titanium.Platform#property-id} property.</p>
* @returns {String}
*/
/**
* @method getLocale
* <p>Gets the value of the {@link Titanium.Platform#property-locale} property.</p>
* @returns {String}
*/
/**
* @method getMacaddress
* <p>Gets the value of the {@link Titanium.Platform#property-macaddress} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getManufacturer
* <p>Gets the value of the {@link Titanium.Platform#property-manufacturer} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getModel
* <p>Gets the value of the {@link Titanium.Platform#property-model} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.Platform#property-name} property.</p>
* @returns {String}
*/
/**
* @method getNetmask
* <p>Gets the value of the {@link Titanium.Platform#property-netmask} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getOsname
* <p>Gets the value of the {@link Titanium.Platform#property-osname} property.</p>
* @returns {String}
*/
/**
* @method getOstype
* <p>Gets the value of the {@link Titanium.Platform#property-ostype} property.</p>
* @returns {String}
*/
/**
* @method getProcessorCount
* <p>Gets the value of the {@link Titanium.Platform#property-processorCount} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getRuntime
* <p>Gets the value of the {@link Titanium.Platform#property-runtime} property.</p>
* @returns {String}
*/
/**
* @method getUsername
* <p>Gets the value of the {@link Titanium.Platform#property-username} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getVersion
* <p>Gets the value of the {@link Titanium.Platform#property-version} property.</p>
* @returns {String}
*/
/**
* @method getDisplayCaps
* <p>Gets the value of the {@link Titanium.Platform#property-displayCaps} property.</p>
* @returns {Titanium.Platform.DisplayCaps}
*/
/**
* @property address
* @type String
* @readonly
* <p>System's WIFI IP address. No other network types are supported.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property architecture
* @type String
* @readonly
* <p>System's processor architecture.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property availableMemory
* @type Number
* @readonly
* <p>System's unused memory, measured in megabytes on iOS and bytes on Android.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property batteryLevel
* @type Number
* @readonly
* <p>Battery level in percent, accessible only when <code>batteryMonitoring</code> is enabled. Measured
in 5% increments on iPhone/iPad.</p>
*/
/**
* @property [batteryMonitoring=false]
* @type Boolean
* <p>Determines whether battery monitoring is enabled.</p>
*/
/**
* @property batteryState
* @type Number
* @readonly
* <p>Indicates the state of the battery. Accessible only when <code>batteryMonitoring</code> is enabled.</p>
* @description <p>On Mobile Web, battery state will either be charging, unplugged, or unknown. Full charge state
is not supported.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Platform#property-BATTERY_STATE_CHARGING}
<li> {@link Titanium.Platform#property-BATTERY_STATE_FULL}
<li> {@link Titanium.Platform#property-BATTERY_STATE_UNKNOWN}
<li> {@link Titanium.Platform#property-BATTERY_STATE_UNPLUGGED}
</ul></p>
*/
/**
* @property id
* @type String
* @readonly
* <p>Applications's globally-unique ID (UUID).</p>
* @description <p>On Android, this may be the UDID (unique device ID). For iOS, this
is a unique identifier for this install of the application.</p>
<p>Previously on iOS this may have been a UDID, but access to
this has been restricted by Apple. For more information, see
<a href="https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIDevice_Class/DeprecationAppendix/AppendixADeprecatedAPI.html#//apple_ref/occ/instp/UIDevice/uniqueIdentifier">Apple's uniqueIdentifier</a>
documentation.</p>
*/
/**
* @property locale
* @type String
* @readonly
* <p>System's default language.</p>
* @description <p>Locale, as a combination of ISO 2-letter language and country codes. For example,
<code>en-US</code> or <code>en-GB</code>. See the
<a href="http://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1</a> and
<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements">ISO 3166-1 alpha-2</a>
sections of wikipedia for reference.</p>
*/
/**
* @property macaddress
* @type String
* @readonly
* <p>System's network interface mac address, or app UUID.</p>
* @description <p>On iOS, this value is the app's UUID. Apple does not allow
access to any hardware identifier information as it can be used for
unique device identification, which they have prohibited.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property manufacturer
* @type String
* @readonly
* <p>Manufacturer of the device.</p>
* @description <p>Returns the manufacturer of the device, for example, <code>motorola</code>.
Virtual devices return <code>unknown</code>.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property model
* @type String
* @readonly
* <p>Model of the device.</p>
* @description <p>An identifier of the hardware model of the device. For example, <code>HTC Sensation Z710e</code>.</p>
<p>Virtual devices will also return a value. For example, <code>sdk</code> for the standard Android SDK
and <code>google_sdk</code> for the enhanced Android Google APIs SDK running in an emulator, and
<code>Simulator</code> for iOS running in a simulator.</p>
<p>Mobile Web will return the browser Agent information, such as
<code>Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0</code> for
Firefox 12 running on Ubuntu.</p>
* <h3>Examples</h3>
<h4>Testing for a Virtual Device</h4>
<pre><code>Determine whether the application is running on a virtual device.
if (Ti.Platform.model === 'Simulator' || Ti.Platform.model.indexOf('sdk') !== -1 ){
alert('Accelerometer does not work on a virtual device');
} else {
// Add Accelerometer event listener
}</code></pre>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property name
* @type String
* @readonly
* <p>Name of the platform. Returns <code>android</code> for the Android platform, <code>iPhone OS</code> for the iOS
platform (iPhone, iPad, or iPod Touch), <code>windows</code> for the Windows platform, and <code>mobileweb</code> for the Mobile Web platform.</p>
<p>Since iOS 10 this property returns <code>iOS</code> for for the iOS platform (iPhone, iPad, or iPod Touch).</p>
*/
/**
* @property netmask
* @type String
* @readonly
* <p>System's WIFI network mask. No other network types are supported.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property osname
* @type String
* @readonly
* <p>Short name of the system's Operating System. Returns <code>android</code> for the Android platfrom,
<code>iphone</code> for the iPhone or iPod Touch, <code>ipad</code> for the iPad, <code>windowsphone</code> for Windows Phone, <code>windowsstore</code> for Windows Store, and <code>mobileweb</code> for the Mobile Web
platform.</p>
*/
/**
* @property ostype
* @type String
* @readonly
* <p>Operating System architecture. On Android, this is <code>32bit</code>.</p>
*/
/**
* @property processorCount
* @type Number
* @readonly
* <p>Number of processing cores.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property runtime
* @type String
* @readonly
* <p>Short name of the JavaScript runtime in use.</p>
* @description <p>On iOS this is "javascriptcore", on Android either "v8" or "rhino" and on Mobile Web it is
determined by the browser used.</p>
*/
/**
* @property username
* @type String
* @readonly
* <p>System name, if set. On iOS, this can be found in Settings > General > About > Name.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property version
* @type String
* @readonly
* <p>System's OS version.</p>
*/
/**
* @property displayCaps
* @type Titanium.Platform.DisplayCaps
* @readonly
* <p>Returns the DisplayCaps object.</p>
* @description <p>Note that the <code>displayCaps</code> property begins with a lowercase letter, which differentiates it
from the <code>DisplayCaps</code> object that it returns.</p>
*/
/**
* @property BATTERY_STATE_CHARGING
* @type Number
* @readonly
* <p>Constant to indicate that the system is plugged in and currently being charged.</p>
*/
/**
* @property BATTERY_STATE_FULL
* @type Number
* @readonly
* <p>Constant to indicate that the battery is fully charged.</p>
* @description <p>On Mobile Web, <code>BATTERY_STATE_FULL</code> is defined, but will never be a valid state.</p>
*/
/**
* @property BATTERY_STATE_UNKNOWN
* @type Number
* @readonly
* <p>Constant to indicate that the battery state is not known or monitoring is disabled.</p>
*/
/**
* @property BATTERY_STATE_UNPLUGGED
* @type Number
* @readonly
* <p>Constant to indicate that the system is unplugged.</p>
*/
/**
* @class Titanium.Stream
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Stream/Stream.yml
* <p>Stream module containing stream utility methods.</p>
* @description <p>This module provides a set of methods for interacting with
{@link Titanium.IOStream IOStream} objects, including asynchronous versions of the
<code>read</code> and <code>write</code> methods offered by all stream objects. These
methods should be used in any place where reading from or writing
to a stream might block.</p>
<p>See also:</p>
<ul>
<li>{@link Titanium.IOStream}</li>
<li>{@link Titanium.BlobStream}</li>
<li>{@link Titanium.BufferStream}</li>
<li>{@link Titanium.Filesystem.FileStream}</li>
<li>{@link Titanium.Network.Socket.TCP}</li>
</ul>
* <h3>Examples</h3>
<h4>Stream.pump Example</h4>
<p>The following example shows how to use the {@link Titanium.Stream#method-pump pump} method.</p>
<pre><code>var pumpCallback = function(arg) {
if(arg.bytesProcessed == -1) {
Ti.API.info("At end of stream.");
} else {
Ti.API.info(String.format("Received %.0f bytes. Total: %.0f bytes.",
arg.bytesProcessed, arg.totalBytesProcessed));
// do something useful with the data in arg.buffer
}
}
Ti.Stream.pump(inputStream, pumpCallback, 1024);
</code></pre><h4>Write Stream to File</h4>
<p>The following example uses the {@link Titanium.Stream#method-writeStream writeStream} method
to copy the contents of an input stream to a file. This can be used for any kind
of input stream -- <code>BufferStream</code>, <code>FileStream</code>, or <code>Socket.TCP</code>.</p>
<pre><code>var outFileStream = Ti.Filesystem.getFile('outfile.txt').open(Ti.Filesystem.MODE_WRITE);
// writes all data from inputStream to outFileStream in chunks of 1024 bytes
var bytesWritten = Ti.Stream.writeStream(inputStream, outFileStream, 1024);
Ti.API.info('Wrote ' + bytesWritten + ' bytes, closing both streams.');
inputStream.close();
outFileStream.close();
</code></pre>
*/
/**
* @method createStream
* <p>Creates stream from a <code>Buffer</code> or <code>Blob</code> object.</p>
* @description <p>Returns {@link Titanium.BufferStream} or {@link Titanium.BlobStream} depending on whether a
<code>Buffer</code> or <code>Blob</code> is provided as the <code>source</code> property in <code>params</code>. </p>
<p><code>Blob</code> obects are read only. Throws an exception if <code>MODE_WRITE</code> or <code>MODE_APPEND</code> is
specified along with a blob object.</p>
* @param {CreateStreamArgs} params
<p>Parameter object, for specifying the source object and mode.</p>
* @returns {Titanium.IOStream}
*/
/**
* @method read
* <p>Asynchronously reads data from an {@link Titanium.IOStream IOStream} into a buffer.</p>
* @description <p>Reads data from the stream and writes it to the buffer. The first byte is
written to <code>buffer[offset]</code>. Reads until the provided buffer is full, the end of
the stream is detected, or the requested number of bytes have been read. Does not
resize the supplied buffer.</p>
<p>A request must include both <code>offset</code> and <code>length</code> parameters, or omit them both.</p>
<p>If the stream is not readable, an error is reported:</p>
<ul>
<li><p>On iOS, throws an exception.</p></li>
<li><p>On Android, calls the callback with an error.</p></li>
</ul>
<p>If <code>offset</code> is past the last byte of the buffer, throws an exception.</p>
* @param {Titanium.IOStream} sourceStream
<p>Stream to read from.</p>
* @param {Titanium.Buffer} buffer
<p>Buffer to read into.</p>
* @param {Number} offset (optional)
<p>Offset to start reading stream data from, in bytes.
If specified, <code>length</code> must be specified as well.</p>
* @param {Number} length (optional)
<p>Number of bytes of data to read from the stream.
If specified, <code>offset</code> must be specified as well.</p>
* @param {Callback<ReadCallbackArgs>} resultsCallback
<p>Function to call with the results of the read operation.</p>
*/
/**
* @method readAll
* <p>Reads all data from the specified {@link Titanium.IOStream IOStream}.</p>
* @description <p>Reads data from the stream, either synchronously or asynchronously.</p>
<p>Throws an exception if a read error is encountered or data can't be written to the
buffer.</p>
<p>If the optional <code>buffer</code> and <code>resultsCallback</code> arguments are specified, the read operation
takes place asynchronously, and the results are passed to the callback.
The data is written to the provided buffer, which is resized if necessary.</p>
<p>If the <code>buffer</code> and <code>resultsCallback</code> arguments are omitted, a new buffer is
allocated and returned.</p>
* @param {Titanium.IOStream} sourceStream
<p>Stream to read from.</p>
* @param {Titanium.Buffer} buffer (optional)
<p>Buffer to read into. If specified, <code>resultsCallback</code> must be specified as
well.</p>
* @param {Callback<ReadCallbackArgs>} resultsCallback (optional)
<p>Function to call with the results of the read operation.
If specified, <code>resultsCallback</code> must be specified as well.</p>
* @returns {Titanium.Buffer/void}
*/
/**
* @method write
* <p>Asynchronously writes data from a buffer to an {@link Titanium.IOStream IOStream}.</p>
* @description <p>Data is read from the buffer and written to the stream. </p>
<p>If the <code>offset</code> and <code>length</code> arguments are specified, data is read from the buffer
starting at <code>offset</code>, up to <code>offset+length-1</code> or the end of the buffer, whichever
comes first.</p>
<p>If <code>offset</code> and <code>length</code> are omitted, the entire buffer is written to the stream.</p>
<p>If the output stream is not writable, an error is reported:</p>
<ul>
<li><p>On iOS, an exception is thrown.</p></li>
<li><p>On Android, the callback is invoked with an error.</p></li>
</ul>
* @param {Titanium.IOStream} outputStream
<p>Stream to write to.</p>
* @param {Titanium.Buffer} buffer
<p>Buffer to write from.</p>
* @param {Number} offset (optional)
<p>Offset to start writing buffer data from.
If specified, <code>length</code> must be specified as well.</p>
* @param {Number} length (optional)
<p>Bytes of data to write. If specified, <code>offset</code> must be specified as well.</p>
* @param {Callback<WriteCallbackArgs>} resultsCallback
<p>Function to call with the results of the write operation.</p>
*/
/**
* @method writeStream
* <p>Writes all data from an input stream to an output stream.</p>
* @description <p>If the optional <code>resultsCallback</code> argument is supplied, the operation is
performed asynchronously.</p>
<p>If the callback is omitted, this method is synchronous, and blocks until all data has been written. <br>
The synchronous version Returns the total number of bytes written.</p>
<p>If no data can be read from the input stream because the input
stream is at end of stream, behavior varies by platform:</p>
<ul>
<li><p>iOS throws an exception.</p></li>
<li><p>Android returns 0, or calls the callback with <code>bytesProcessed</code> set to 0.</p></li>
</ul>
* @param {Titanium.IOStream} inputStream
<p>Stream to read from.</p>
* @param {Titanium.IOStream} outputStream
<p>Stream to write to.</p>
* @param {Number} maxChunkSize
<p>Maximum number of bytes to copy from <code>inputStream</code> to <code>outputStream</code> in a
single operation.</p>
* @param {Callback<WriteStreamCallbackArgs>} resultsCallback (optional)
<p>Function to call with the results of the <code>writeStream</code> operation.</p>
*/
/**
* @method pump
* <p>Reads data from input stream and passes it to a handler method.</p>
* @description <p>After the end of the input stream is reached, the handler is called
a final time with no data and <code>bytesProcessed</code> set to -1 to indicate
the end of the input data.</p>
* @param {Titanium.IOStream} inputStream
<p>Stream to pump from.</p>
* @param {Callback<PumpCallbackArgs>} handler
<p>Handler method that will receive data from <code>inputStream</code>.</p>
* @param {Number} maxChunkSize
<p>Maximum number of bytes to pass to <code>handler</code> in a single call.</p>
* @param {Boolean} isAsync (optional)
<p>Specifies if the <code>pump</code> operation should run asynchronously.</p>
*/
/**
* @property MODE_APPEND
* @type Number
* @readonly
* <p>Use with {@link Titanium.Stream#method-createStream createStream} to open a stream in append
mode.</p>
*/
/**
* @property MODE_READ
* @type Number
* @readonly
* <p>Use with {@link Titanium.Stream#method-createStream createStream} to open a stream in read
mode.</p>
*/
/**
* @property MODE_WRITE
* @type Number
* @readonly
* <p>Use with {@link Titanium.Stream#method-createStream createStream} to open a stream in write
mode.</p>
*/
/**
* @class CreateStreamArgs
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Stream/Stream.yml
* <p>Argument passed to {@link Titanium.Stream#method-createStream createStream}.</p>
*/
/**
* @property source
* @type Titanium.Blob/Titanium.Buffer
* <p>Object that the stream will read from or write to.</p>
*/
/**
* @property mode
* @type Number
* <p>Mode to open the stream in.</p>
* @description <p>For <code>Blob</code> objects, only <code>MODE_READ</code> is supported.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.Stream#property-MODE_APPEND}
<li> {@link Titanium.Stream#property-MODE_READ}
<li> {@link Titanium.Stream#property-MODE_WRITE}
</ul></p>
*/
/**
* @class ReadCallbackArgs
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Stream/Stream.yml
* <p>Argument passed to the read callback when an asynchronous {@link Titanium.Stream#method-read read} operation
finishes.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded.</p>
* @description <p>Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Will be undefined if <code>success</code> is <code>true</code>.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property code
* @type Number
* <p>Error code. Returns 0 if <code>success</code> is <code>true</code>.</p>
* @description <p>Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property source
* @type Titanium.IOStream
* <p>Stream being read.</p>
*/
/**
* @property bytesProcessed
* @type Number
* <p>Number of bytes processed, or -1 in the event of an error or end of stream.</p>
*/
/**
* @property errorState
* @type Number
* <p>Whether an error was encountered. Set to 1 in the case of an error, 0
otherwise.</p>
* @deprecated 3.1.0
* @platform android 1.7
*/
/**
* @property errorDescription
* @type String
* <p>Text description of the error.</p>
* @deprecated 3.1.0
*/
/**
* @class WriteCallbackArgs
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Stream/Stream.yml
* <p>Argument passed to the write callback when an asynchronous
{@link Titanium.Stream#method-write write} operation
finishes.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded.</p>
* @description <p>Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Will be undefined if <code>success</code> is <code>true</code>.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property code
* @type Number
* <p>Error code. Returns 0 if <code>success</code> is <code>true</code>.</p>
* @description <p>Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property source
* @type Titanium.IOStream
* <p>Stream being written to.</p>
*/
/**
* @property bytesProcessed
* @type Number
* <p>Number of bytes processed, or -1 in the event of an error or end of stream.</p>
*/
/**
* @property errorState
* @type Number
* <p>Whether an error was encountered. Set to 1 in the case of an error, 0
otherwise.</p>
* @deprecated 3.1.0
* @platform android 1.7
*/
/**
* @property errorDescription
* @type String
* <p>Text description of the error.</p>
* @deprecated 3.1.0
*/
/**
* @class WriteStreamCallbackArgs
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Stream/Stream.yml
* <p>Argument passed to the callback when an asynchronous
{@link Titanium.Stream#method-writeStream writeStream} operation finishes.</p>
*/
/**
* @property fromStream
* @type Titanium.IOStream
* <p>Stream being read from.</p>
*/
/**
* @property toStream
* @type Titanium.IOStream
* <p>Stream being written to.</p>
*/
/**
* @property bytesProcessed
* @type Number
* <p>Number of bytes processed, or -1 in the event of an error or end of stream.</p>
*/
/**
* @property errorState
* @type Number
* <p>Whether an error was encountered. Set to 1 in the case of an error, 0
otherwise.</p>
* @deprecated 3.1.0
* @platform android 1.7
*/
/**
* @property errorDescription
* @type String
* <p>Text description of the error.</p>
* @deprecated 3.1.0
*/
/**
* @class PumpCallbackArgs
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Stream/Stream.yml
* <p>Argument passed to the callback each time the
{@link Titanium.Stream#method-pump pump} operation has new data to deliver.</p>
* @description <p>A callback with <code>bytesProcessed</code> set to -1 indicates the end of the
pump operation, either because of an error or because the end of the
stream has been reached.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded.</p>
* @description <p>Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Will be undefined if <code>success</code> is <code>true</code>.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property code
* @type Number
* <p>Error code. Returns 0 if <code>success</code> is <code>true</code>.</p>
* @description <p>Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property source
* @type Titanium.IOStream
* <p>Stream being read from.</p>
*/
/**
* @property buffer
* @type Titanium.Buffer
* <p>Buffer object holding the data currently being pumped to the handler method.</p>
*/
/**
* @property bytesProcessed
* @type Number
* <p>Number of bytes being passed to this invocation of the handler, or
-1 in the event of an error or end of stream.</p>
*/
/**
* @property totalBytesProcessed
* @type Number
* <p>Total number of bytes read from the stream so far,
including the data passed to this current invocation of the handler.</p>
*/
/**
* @property errorState
* @type Number
* <p>Whether an error was encountered. Set to 1 in the case of an error, 0
otherwise.</p>
* @deprecated 3.1.0
* @platform android 1.7
*/
/**
* @property errorDescription
* @type String
* <p>Text description of the error.</p>
* @deprecated 3.1.0
*/
/**
* @class Titanium
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Titanium.yml
* <p>The top-level Titanium module.</p>
* @description <p>The Titanium module provides the Titanium Mobile API, allowing developers to access native
features of each target environment. Currently, the Android, iOS and Mobile Web (beta)
environments are supported.</p>
<h4>Titanium Namespace</h4>
<p>The complete Titanium API is accessible from the <code>Titanium</code> namespace but, for convenience and
brevity, the alias <code>Ti</code> is also provided. As the <code>Titanium</code> namespace is functionally-identical
to its <code>Ti</code> alias, it is always recommended to use <code>Ti</code> in your code.</p>
<p>For example, the following pairs of Titanium calls behave exactly the same.</p>
<pre><code>Titanium.API.info('Hello Titanium!');
Ti.API.info('Hello Titanium!');
Titanium.Utils.sha256('Hello Titanium!');
Ti.Utils.sha256('Hello Titanium!');
Titanium.App.Properties.setString('hello_msg','Hello Titanium!');
Ti.App.Properties.setString('hello_msg','Hello Titanium!');
Titanium.Database.open('mydb');
Ti.Database.open('mydb');
</code></pre>
<h4>Global APIs</h4>
<p>Titanium includes a number of built-in JavaScript objects that are not part of the Titanium
namespace, including JSON parsing, String formatting, timers, and the CommonJS <code>require</code> function.
See {@link Global Global APIs} for details.</p>
*/
/**
* @method include
* <p>Includes JavaScript code from one or more files.</p>
* @deprecated 3.3.0 Create a CommonJS module and use the `require()` method to include external JavaScript code.
* @description <p>Note that this mechanism is not supported with Alloy projects.</p>
<p>The <code>include</code> method has several interesting quirks:</p>
<ul>
<li><p>The included JavaScript is interpreted in the current root execution
context -- that is, either <code>app.js</code> or in the root context of a window
opened with the <code>url</code> property. For example, in the following code
snippet, the included code in <code>some_module.js</code> has access to
<code>globalVar</code>, but <em>not</em> to the local variable, <code>localVar</code>:</p>
<pre><code>var globalVar = {};
function loadModule() {
var localVar = "A local value.";
Ti.include('some_module.js');
};
loadModule();
</code></pre></li>
<li><p>The included filename is interpreted <em>local to the current file</em>. For
example, suppose <code>a.js</code> includes <code>dir/b.js.</code> If <code>b.js</code> includes another file,
<code>c.js</code>, this is interpreted as <code>dir/c.js</code>.</p></li>
<li><p>Calling <code>include</code> from an event handler does not work consistently across
platforms.</p></li>
<li><p>Calling <code>include</code> on a non-existent file causes a runtime error.
See also {@link Global#method-require CommonJS Require}.</p></li>
</ul>
* @param {String} name
<p>Filename(s) to include.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method createBuffer
* <p>Creates a new buffer based on the params.</p>
* <h3>Examples</h3>
<h4>Create a buffer with 1K bytes</h4>
<pre><code>var buffer = Ti.createBuffer({ length: 1024 });</code></pre><h4>Create a buffer with string</h4>
<p>Create a buffer with the string "hello world" encoded in UTF-8</p>
<pre><code>var buffer = Ti.createBuffer({ value: "hello world" });
</code></pre><h4>Create a buffer with encoded float</h4>
<p>Create a buffer with the encoded value of the double-precision floating point
number 1.234567 in Big Endian (network) byte order</p>
<pre><code>var buffer = Ti.createBuffer({ value: 1.234567, type: Ti.Codec.TYPE_DOUBLE, byteOrder: Ti.Codec.BIG_ENDIAN });
</code></pre>
* @param {CreateBufferArgs} params
<p>creation arguments</p>
* @returns {Titanium.Buffer}The new buffer.
*/
/**
* @method createProxy
* <p>Creates and returns an instance of {@link Titanium.Proxy}.</p>
* @param {Dictionary<Titanium.Proxy>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.Proxy} except those marked not-creation or read-only.</p>
* @returns {Titanium.Proxy}
*/
/**
* @method getVersion
* <p>Gets the value of the {@link Titanium#property-version} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getBuildDate
* <p>Gets the value of the {@link Titanium#property-buildDate} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getBuildHash
* <p>Gets the value of the {@link Titanium#property-buildHash} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getUserAgent
* <p>Gets the value of the {@link Titanium#property-userAgent} property.</p>
* @returns {String}
*/
/**
* @method setUserAgent
* <p>Sets the value of the {@link Titanium#property-userAgent} property.</p>
* @param {String} userAgent
<p>New value for the property.</p>
*/
/**
* @property version
* @type String
* @readonly
* <p>Version of Titanium that is executing.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property buildDate
* @type String
* @readonly
* <p>Date of the Titanium build.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property buildHash
* @type String
* @readonly
* <p>Git hash of the Titanium build.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property userAgent
* @type String
* <p>User-agent string used by Titanium.</p>
* @description <p>On Mobile Web, the browser's user agent cannot be overridden. Writing to this property has no
effect and reading the property will always return the browser's user agent.</p>
*/
/**
* @class CreateBufferArgs
* @platform android 1.7
* @platform iphone 1.7
* @platform ipad 1.7
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Titanium.yml
* <p>Arguments to be passed to createBuffer</p>
*/
/**
* @property value
* @type String/Number
* <p>An initial value which will be encoded and placed in the buffer. If value is a Number, type must also be set. (this is simply a convenient way of calling {@link Titanium.Codec#method-encodeString} or {@link Titanium.Codec#method-encodeNumber} and placing the encoded value in the returned buffer.)</p>
*/
/**
* @property [length=0, unless `value` is specified, in which case the length of the encoded data is used.]
* @type Number
* <p>The length of the buffer.</p>
*/
/**
* @property [type={@link Titanium.Codec#property-CHARSET_UTF8} if `value` is a String, If `value` is a Number, this argument is required]
* @type String
* <p>The type of data encoding to use with <code>value</code>.</p>
*/
/**
* @property [byteOrder=The OS native byte order is used by default. See {@link Titanium.Codec#method-getNativeByteOrder}]
* @type Number
* <p>The byte order of this buffer.</p>
*/
/**
* @class Titanium.UI.2DMatrix
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/2DMatrix.yml
* <p>The 2D Matrix is an object for holding values for an affine transformation matrix.</p>
* @description <p>A 2D matrix is used to rotate, scale, translate, or skew the objects in a two-dimensional space.
A 2D affine transformation can be represented by a 3 by 3 matrix:</p>
<table>
<tr><td><i>a</i></td><td><i>b</i></td><td>0</td></tr>
<tr><td><i>c</i></td><td><i>d</i></td><td>0</td></tr>
<tr><td><i>tx</i></td><td><i>ty</i></td><td>1</td></tr>
</table>
<p>The third column is constant (0,0,1). </p>
<p>On iOS and Mobile Web, the matrix terms, <code>a</code>, <code>b</code>, <code>c</code>, <code>d</code>, <code>tx</code>, and <code>ty</code>,
are available as properties. On Android, the matrix terms are not available as properties.</p>
<p>Use the {@link Titanium.UI#method-create2DMatrix} method to create a new 2D matrix. You can
pass an optional {@link MatrixCreationDict} dictionary to the method to initialize the
matrix. For example, the following creates a new matrix with a 45 degree rotation. </p>
<pre><code>var m = Ti.UI.create2DMatrix({
rotate: 45
});
</code></pre>
<p>If you pass no arguments, <code>create2DMatrix</code> returns an identity matrix.</p>
* <h3>Examples</h3>
<h4>Apply a 2D Matrix to a Label</h4>
<p>The following uses a 2D matrix to translate a label in the y direction.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var label = Ti.UI.createLabel({
font:{fontSize:50},
text:'Titanium',
textAlign:'center',
top: 100
});
win.add(label);
var button = Ti.UI.createButton({
title:'Animate',
bottom:20,
width:200, height:40
});
win.add(button);
button.addEventListener('click', function(){
var t1 = Ti.UI.create2DMatrix();
t1 = t1.translate(0, 300);
var a1 = Ti.UI.createAnimation();
a1.transform = t1;
a1.duration = 800;
label.animate(a1);
});
win.open();
</code></pre>
*/
/**
* @method invert
* <p>Returns a matrix constructed by inverting this matrix.</p>
* @returns {Titanium.UI.2DMatrix}
*/
/**
* @method multiply
* <p>Returns a matrix constructed by combining two existing matrices.</p>
* @description <p>The argument, <code>t2</code> is concatenated to the matrix instance against which the function is invoked. The
resulting matrix is the result of multiplying this matrix by <code>t2</code>. You might perform several
multiplications in order to create a single matrix that contains the cumulative effects of
several transformations. </p>
<p>Note that matrix operations are not commutative -- the order in which you concatenate matrices
is important. That is, the result of multiplying matrix <code>t1</code> by matrix <code>t2</code> does not necessarily
equal the result of multiplying matrix <code>t2</code> by matrix <code>t1</code>.</p>
* @param {Titanium.UI.2DMatrix} t2
<p>The second matrix.</p>
* @returns {Titanium.UI.2DMatrix}
*/
/**
* @method rotate
* <p>Returns a matrix constructed by rotating this matrix.</p>
* @description <p>There are two distinct versions of this method, depending on whether one argument
or two are specified. </p>
<ul>
<li><code>rotate(angle)</code>. The standard <code>rotate</code> method.</li>
<li><code>rotate(fromAngle, toAngle)</code>. Android only. Used for specifying rotation
animations.</li>
</ul>
<p>In both cases, a positive value specifies clockwise rotation and a negative value
specifies counter-clockwise rotation. </p>
<p>Details for each version are discussed below.</p>
<h4>rotate(angle)</h4>
<p>Returns a matrix constructed by rotating this matrix.</p>
<p>Note that the resulting matrix only expresses the final transformation, not the
direction of the rotation. For example, the matrix produced by <code>m1.rotate(-10)</code>
is identical to the matrix produced by <code>m1.rotate(350)</code> and <code>m1.rotate(710)</code>.</p>
<p>Note that if you specify a rotation matrix as the <code>transform</code> property of an
animation, the animation animates the view from its current rotation to the
rotation represented by the matrix by its shortest path. So to rotate a view
in a complete circle, the easiest method is to chain together three animations,
rotating 120 degrees each time.</p>
<p>For the purposes of animation, it should be noted that the rotation angle is
normalized to the range -180 <= angle < 180. In other
words, an angle of 180 degrees is normalized to -180. This makes no difference
except when determining which direction an animation rotates. 179 degrees rotates
rotate clockwise, but 180 degrees is normalized to -180, so rotates counter-clockwise.</p>
<h4>rotate(angle, toAngle) -- Android Only</h4>
<p>This is an Android-specific method used for creating rotation animations.
Returns a <code>2DMatrix</code> object that represents a rotation from <code>angle</code> to <code>toAngle</code>. </p>
<p>Angles are specified in degrees. Positive values represent clockwise rotation, and negative values
represent counter-clockwise rotation. Values are not normalized, so for example an
angle of 720 degrees represents two complete clockwise revolutions.</p>
<p>The resulting object cannot be expressed as an affine transform, but can be used with the
{@link Titanium.UI.Animation#property-transform} property to specify a rotation animation.</p>
* @param {Number} angle
<p>Angle to rotate to, in degrees. On Android, if <code>angleTo</code> is specified, this specifies
the starting angle for a rotation animation.</p>
* @param {Number} toAngle (optional)
<p>Ending angle for a rotation animation, in degrees. Android only.</p>
* @returns {Titanium.UI.2DMatrix}
*/
/**
* @method scale
* <p>Returns a <code>2DMatrix</code> object that specifies a scaling animation from one scale to another.</p>
* @description <p>There are two distinct versions of this method, depending on whether two arguments
or four are specified. </p>
<ul>
<li><code>scale(sx, sy)</code>. The standard <code>scale</code> method.</li>
<li><code>scale(fromSx, fromSy, toSx, toSy)</code>. Android only. Used for specifying a
scaling animation from one size to another.</li>
</ul>
<h4>scale(sx, sy)</h4>
<p>Returns a matrix constructed by applying a scale transform to this matrix.
Scaling the current matrix by <code>sx</code> along the X axis and by <code>sy</code> along the Y axis.</p>
<h4>scale(sx, sy, toSx, toSy) -- Android Only</h4>
<p>This Android-specific method returns a <code>2DMatrix</code> object that can be used to
create a scaling animation from one scale factor to another scale factor. </p>
<p>The resulting object cannot be expressed as an affine transform, but can be used with the
{@link Titanium.UI.Animation#property-transform} property to specify a scaling animation.</p>
* @param {Number} sx
<p>Horizontal scaling factor. If <code>toSx</code> and <code>toSy</code> are specified,
this specifies the starting horizontal scaling factor, at the beginning
of an animation.</p>
* @param {Number} sy
<p>Vertical scaling factor. If <code>toSx</code> and <code>toSy</code> are specified,
this specifies the starting vertical scaling factor, at the beginning of
an animation.</p>
* @param {Number} toSx (optional)
<p>Ending horizontal scaling factor, at the end of an animation.
If specified, <code>toSy</code> must be specified as well. Android only.</p>
* @param {Number} toSy (optional)
<p>Ending vertical scaling factor, at the end of an animation.
If specified, <code>toSx</code> must be specified as well. Android only.</p>
* @returns {Titanium.UI.2DMatrix}
*/
/**
* @method translate
* <p>Returns a matrix constructed by applying a translation transform to this matrix.</p>
* @param {Number} tx
<p>Horizontal component of the translation.</p>
* @param {Number} ty
<p>Vertical component of the translation.</p>
* @returns {Titanium.UI.2DMatrix}
*/
/**
* @method getA
* <p>Gets the value of the {@link Titanium.UI.2DMatrix#property-a} property.</p>
* @returns {Number}
*/
/**
* @method setA
* <p>Sets the value of the {@link Titanium.UI.2DMatrix#property-a} property.</p>
* @param {Number} a
<p>New value for the property.</p>
*/
/**
* @method getB
* <p>Gets the value of the {@link Titanium.UI.2DMatrix#property-b} property.</p>
* @returns {Number}
*/
/**
* @method setB
* <p>Sets the value of the {@link Titanium.UI.2DMatrix#property-b} property.</p>
* @param {Number} b
<p>New value for the property.</p>
*/
/**
* @method getC
* <p>Gets the value of the {@link Titanium.UI.2DMatrix#property-c} property.</p>
* @returns {Number}
*/
/**
* @method setC
* <p>Sets the value of the {@link Titanium.UI.2DMatrix#property-c} property.</p>
* @param {Number} c
<p>New value for the property.</p>
*/
/**
* @method getD
* <p>Gets the value of the {@link Titanium.UI.2DMatrix#property-d} property.</p>
* @returns {Number}
*/
/**
* @method setD
* <p>Sets the value of the {@link Titanium.UI.2DMatrix#property-d} property.</p>
* @param {Number} d
<p>New value for the property.</p>
*/
/**
* @method getTx
* <p>Gets the value of the {@link Titanium.UI.2DMatrix#property-tx} property.</p>
* @returns {Number}
*/
/**
* @method setTx
* <p>Sets the value of the {@link Titanium.UI.2DMatrix#property-tx} property.</p>
* @param {Number} tx
<p>New value for the property.</p>
*/
/**
* @method getTy
* <p>Gets the value of the {@link Titanium.UI.2DMatrix#property-ty} property.</p>
* @returns {Number}
*/
/**
* @method setTy
* <p>Sets the value of the {@link Titanium.UI.2DMatrix#property-ty} property.</p>
* @param {Number} ty
<p>New value for the property.</p>
*/
/**
* @property a
* @type Number
* <p>The entry at position [1,1] in the matrix.</p>
*/
/**
* @property b
* @type Number
* <p>The entry at position [1,2] in the matrix.</p>
*/
/**
* @property c
* @type Number
* <p>The entry at position [2,1] in the matrix.</p>
*/
/**
* @property d
* @type Number
* <p>The entry at position [2,2] in the matrix.</p>
*/
/**
* @property tx
* @type Number
* <p>The entry at position [3,1] in the matrix.</p>
*/
/**
* @property ty
* @type Number
* <p>The entry at position [3,2] in the matrix.</p>
*/
/**
* @class MatrixCreationDict
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/2DMatrix.yml
* <p>Simple object passed to {@link Titanium.UI#method-create2DMatrix} to initialize a matrix.</p>
* @description <p>The matrix is initialized with the specified transforms.</p>
<p>On iOS, rotation is always performed first, regardless of the order the
properties are specified in.</p>
<p>On Android, specifying both <code>scale</code> and <code>rotate</code> the same dictionary results
in an incorrect transformation.</p>
*/
/**
* @property [scale=1]
* @type Number
* <p>Scale the matrix by the specified scaling factor. The same scaling factor is used
for both horizontal and vertical scaling.</p>
*/
/**
* @property [rotate=No rotation.]
* @type Number
* <p>Rotation angle, in degrees. See the {@link Titanium.UI.2DMatrix#method-rotate rotate} method
for a discussion of rotation.</p>
*/
/**
* @property [anchorPoint=(0.5, 0.5)]
* @type Dictionary
* <p>Point to rotate around, specified as a dictionary object with <code>x</code> and <code>y</code>
properties, where { x: 0.5, y: 0.5 } represents the center of whatever is being
rotated.</p>
* @platform android 0.8
*/
/**
* @class Titanium.UI.3DMatrix
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/3DMatrix.yml
* <p>The 3D Matrix is an object for holding values for a 3D affine transform.</p>
* @description <p>The 3DMatrix is created by {@link Titanium.UI#method-create3DMatrix}. A 3D transform is
used to rotate, scale, translate, or skew the objects in three-dimensional
space. A 3D transform is represented by a 4 by 4 matrix.</p>
<p>You create an <code>identity matrix</code> by creating a 3D Matrix with an empty
constructor.</p>
* <h3>Examples</h3>
<h4>Apply a 3D Matrix to a Label</h4>
<p>Move a label through a translation that repositions it from 100px to 200px from the top of
the display.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var label = Ti.UI.createLabel({
font:{fontSize:50},
text:'Titanium',
textAlign:'center',
top: 100
});
win.add(label);
var button = Ti.UI.createButton({
title:'Animate',
bottom:20,
width:200, height:40
});
win.add(button);
button.addEventListener('click', function(){
var t1 = Ti.UI.create3DMatrix();
t1 = t1.translate(0, 100, 200);
t1.m34 = 1.0/-90;
var a1 = Ti.UI.createAnimation();
a1.transform = t1;
a1.duration = 800;
label.animate(a1);
});
win.open();
</code></pre>
*/
/**
* @method invert
* <p>Returns a matrix constructed by inverting this matrix.</p>
* @returns {Titanium.UI.3DMatrix}
*/
/**
* @method multiply
* <p>Returns a matrix constructed by combining two existing matrix.</p>
* @description <p>The result of this function is the first matrix multiplied by the second matrix. You might perform
several multiplications in order to create a single matrix that contains the cumulative effects of
several transformations. Note that matrix operations are not commutative - the order in which
you concatenate matrices is important. That is, the result of multiplying matrix t1 by matrix t2
does not necessarily equal the result of multiplying matrix t2 by matrix t1.</p>
* @param {Titanium.UI.3DMatrix} t2
<p>Matrix to concatenate to this matrix.</p>
* @returns {Titanium.UI.3DMatrix}
*/
/**
* @method rotate
* <p>Returns a matrix constructed by rotating this matrix.</p>
* @param {Number} angle
<p>The angle, in degrees, by which to rotate the matrix. A positive value specifies counterclockwise rotation and a negative value specifies clockwise rotation.</p>
* @param {Number} x
<p>The x part of the vector about which to rotate.</p>
* @param {Number} y
<p>The y part of the vector about which to rotate.</p>
* @param {Number} z
<p>The z part of the vector about which to rotate.</p>
* @returns {Titanium.UI.3DMatrix}
*/
/**
* @method scale
* <p>Returns a matrix constructed by scaling this matrix.</p>
* @param {Number} sx
<p>The value by which to scale x values of the matrix.</p>
* @param {Number} sy
<p>The value by which to scale y values of the matrix.</p>
* @param {Number} sz
<p>The value by which to scale z values of the matrix.</p>
* @returns {Titanium.UI.3DMatrix}
*/
/**
* @method translate
* <p>Returns a matrix constructed by translating an existing matrix.</p>
* @param {Number} tx
<p>The value by which to move x values with the matrix.</p>
* @param {Number} ty
<p>The value by which to move y values with the matrix.</p>
* @param {Number} tz
<p>The value by which to move z values with the matrix.</p>
* @returns {Titanium.UI.3DMatrix}
*/
/**
* @method getM11
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m11} property.</p>
* @returns {Number}
*/
/**
* @method setM11
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m11} property.</p>
* @param {Number} m11
<p>New value for the property.</p>
*/
/**
* @method getM12
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m12} property.</p>
* @returns {Number}
*/
/**
* @method setM12
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m12} property.</p>
* @param {Number} m12
<p>New value for the property.</p>
*/
/**
* @method getM13
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m13} property.</p>
* @returns {Number}
*/
/**
* @method setM13
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m13} property.</p>
* @param {Number} m13
<p>New value for the property.</p>
*/
/**
* @method getM14
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m14} property.</p>
* @returns {Number}
*/
/**
* @method setM14
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m14} property.</p>
* @param {Number} m14
<p>New value for the property.</p>
*/
/**
* @method getM21
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m21} property.</p>
* @returns {Number}
*/
/**
* @method setM21
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m21} property.</p>
* @param {Number} m21
<p>New value for the property.</p>
*/
/**
* @method getM22
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m22} property.</p>
* @returns {Number}
*/
/**
* @method setM22
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m22} property.</p>
* @param {Number} m22
<p>New value for the property.</p>
*/
/**
* @method getM23
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m23} property.</p>
* @returns {Number}
*/
/**
* @method setM23
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m23} property.</p>
* @param {Number} m23
<p>New value for the property.</p>
*/
/**
* @method getM24
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m24} property.</p>
* @returns {Number}
*/
/**
* @method setM24
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m24} property.</p>
* @param {Number} m24
<p>New value for the property.</p>
*/
/**
* @method getM31
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m31} property.</p>
* @returns {Number}
*/
/**
* @method setM31
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m31} property.</p>
* @param {Number} m31
<p>New value for the property.</p>
*/
/**
* @method getM32
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m32} property.</p>
* @returns {Number}
*/
/**
* @method setM32
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m32} property.</p>
* @param {Number} m32
<p>New value for the property.</p>
*/
/**
* @method getM33
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m33} property.</p>
* @returns {Number}
*/
/**
* @method setM33
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m33} property.</p>
* @param {Number} m33
<p>New value for the property.</p>
*/
/**
* @method getM34
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m34} property.</p>
* @returns {Number}
*/
/**
* @method setM34
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m34} property.</p>
* @param {Number} m34
<p>New value for the property.</p>
*/
/**
* @method getM41
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m41} property.</p>
* @returns {Number}
*/
/**
* @method setM41
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m41} property.</p>
* @param {Number} m41
<p>New value for the property.</p>
*/
/**
* @method getM42
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m42} property.</p>
* @returns {Number}
*/
/**
* @method setM42
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m42} property.</p>
* @param {Number} m42
<p>New value for the property.</p>
*/
/**
* @method getM43
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m43} property.</p>
* @returns {Number}
*/
/**
* @method setM43
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m43} property.</p>
* @param {Number} m43
<p>New value for the property.</p>
*/
/**
* @method getM44
* <p>Gets the value of the {@link Titanium.UI.3DMatrix#property-m44} property.</p>
* @returns {Number}
*/
/**
* @method setM44
* <p>Sets the value of the {@link Titanium.UI.3DMatrix#property-m44} property.</p>
* @param {Number} m44
<p>New value for the property.</p>
*/
/**
* @property m11
* @type Number
* <p>The entry at position [1,1] in the matrix.</p>
*/
/**
* @property m12
* @type Number
* <p>The entry at position [1,2] in the matrix.</p>
*/
/**
* @property m13
* @type Number
* <p>The entry at position [1,3] in the matrix.</p>
*/
/**
* @property m14
* @type Number
* <p>The entry at position [1,4] in the matrix.</p>
*/
/**
* @property m21
* @type Number
* <p>The entry at position [2,1] in the matrix.</p>
*/
/**
* @property m22
* @type Number
* <p>The entry at position [2,2] in the matrix.</p>
*/
/**
* @property m23
* @type Number
* <p>The entry at position [2,3] in the matrix.</p>
*/
/**
* @property m24
* @type Number
* <p>The entry at position [2,4] in the matrix.</p>
*/
/**
* @property m31
* @type Number
* <p>The entry at position [3,1] in the matrix.</p>
*/
/**
* @property m32
* @type Number
* <p>The entry at position [3,2] in the matrix.</p>
*/
/**
* @property m33
* @type Number
* <p>The entry at position [3,3] in the matrix.</p>
*/
/**
* @property m34
* @type Number
* <p>The entry at position [3,4] in the matrix.</p>
*/
/**
* @property m41
* @type Number
* <p>The entry at position [4,1] in the matrix.</p>
*/
/**
* @property m42
* @type Number
* <p>The entry at position [4,2] in the matrix.</p>
*/
/**
* @property m43
* @type Number
* <p>The entry at position [4,3] in the matrix.</p>
*/
/**
* @property m44
* @type Number
* <p>The entry at position [4,4] in the matrix.</p>
*/
/**
* @class Titanium.UI.ActivityIndicator
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ActivityIndicator.yml
* <p>An activity indicator that lets the user know an action is taking place.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/activityindicator/activityindicator_android.png" height="75" /></td>
<td><img src="images/activityindicator/activityindicator_ios.png" height="75" /></td>
<td><img src="images/activityindicator/activityindicator_mobileweb.png" height="75" /></td>
<td><img src="images/activityindicator/activityindicator_wp.png" height="75" /></td>
</tr>
<tr><th>Android</th><th>iOS</th><th>Mobile Web</th><th>Windows Phone</th></tr>
</table>
<p>An activity indicator can be used to show the progress of an operation in the UI to let the
user know that some action is taking place. An activity indicator consists of a spinning
animation and an optional text message, and is used to indicate an ongoing activity of
indeterminate length. To show progress, use {@link Titanium.UI.ProgressBar} instead.</p>
<p>Use the {@link Titanium.UI#method-createActivityIndicator} method or <strong><code><ActivityIndicator></code></strong> Alloy element to
create an <code>ActivityIndicator</code> object.</p>
<p><code>ActivityIndicator</code> is a view and, like any view, must be added to a window or other top-level
view before it can be shown. Unlike most views, <code>ActivityIndicator</code> is hidden by
default and must be shown explicitly by calling its {@link Titanium.UI.ActivityIndicator#method-show} method.</p>
<h4>Android Platform Notes</h4>
<p>Prior to SDK 3.0, activity indicator on Android produced a modal dialog containing a spinner or
progress bar. In SDK 3.0, this legacy Android activity indicator was renamed to
{@link Titanium.UI.Android.ProgressIndicator}.</p>
<p>In SDK 3.0, use <code>ActivityIndicator</code> for a view that can be added as a child of another view.
Use <code>ProgressIndicator</code> to display a progress indicator in a modal dialog or window title bar.</p>
* <h3>Examples</h3>
<h4>Simple Activity Indicator</h4>
<p>Open a yellow window immediately after a blue window. Show an activity indicator while
some code executes and hide it on completion. Then close the yellow window.</p>
<pre><code>Ti.UI.backgroundColor = 'white';
var win1 = Ti.UI.createWindow({
backgroundColor: 'blue'
});
var win2 = Ti.UI.createWindow({
backgroundColor: 'yellow',
fullscreen: true
});
var activityIndicator = Ti.UI.createActivityIndicator({
color: 'green',
font: {fontFamily:'Helvetica Neue', fontSize:26, fontWeight:'bold'},
message: 'Loading...',
style: Ti.UI.ActivityIndicatorStyle.DARK,
top:10,
left:10,
height:Ti.UI.SIZE,
width:Ti.UI.SIZE
});
// The activity indicator must be added to a window or view for it to appear
win2.add(activityIndicator);
// eventListeners must always be loaded before the event is likely to fire
// hence, the open() method must be positioned before the window is opened
win2.addEventListener('open', function (e) {
activityIndicator.show();
// do some work that takes 6 seconds
// ie. replace the following setTimeout block with your code
setTimeout(function(){
e.source.close();
activityIndicator.hide();
}, 6000);
});
win1.open();
win2.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as two Alloy views.</p>
<p>win1.xml:</p>
<pre><code><Alloy>
<Window onOpen="openWin2" backgroundColor="blue" />
</Alloy>
</code></pre>
<p>win1.js:</p>
<pre><code>function openWin2 () {
var win2 = Alloy.createController('win2').getView();
win2.open();
}
</code></pre>
<p>win2.xml:</p>
<pre><code><Alloy>
<Window onOpen="showIndicator" fullscreen="true" backgroundColor="yellow">
<!-- Define the styling properties in the TSS file -->
<ActivityIndicator id="activityIndicator" message="Loading..."/>
</Window>
</Alloy>
</code></pre>
<p>win2.js:</p>
<pre><code>function showIndicator(e){
$.activityIndicator.show();
// do some work that takes 6 seconds
// ie. replace the following setTimeout block with your code
setTimeout(function(){
e.source.close();
$.activityIndicator.hide();
}, 6000);
}
</code></pre>
*/
/**
* @event longclick
* @hide
* <p>Fired when the device detects a long click.</p>
* @description <p>A long click is generated by touching and holding on the touchscreen or holding down the
trackball button. </p>
<p>The event occurs before the finger/button is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>As the trackball can fire this event, it is not intended to return the <code>x</code> and <code>y</code>
coordinates of the touch, even when it is generated by the touchscreen. </p>
<p>A <code>longclick</code> blocks a <code>click</code>, meaning that a <code>click</code> event will not fire when a
<code>longclick</code> listener exists.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event click
* @hide
* <p>Fired when the device detects a click against the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event focus
* @hide
* <p>Fired when the view element gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event postlayout
* @hide
* <p>Fired when a layout cycle is finished.</p>
* @description <p>This event is fired when the view and its ancestors have been laid out.
The {@link Titanium.UI.View#property-rect rect} and {@link Titanium.UI.View#property-size size} values
should be usable when this event is fired.</p>
<p>This event is typically triggered by either changing layout
properties or by changing the orientation of the device. Note that changing the
layout of child views or ancestors can also trigger a relayout of this view.
On Mobile Web, this event can also be triggered by resizing the browser window.</p>
<p>Note that altering any properties that affect layout from the <code>postlayout</code> callback
may result in an endless loop.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @event keypressed
* @hide
* <p>Fired when a hardware key is pressed in the view.</p>
* @description <p>A keypressed event is generated by pressing a hardware key. On Android, this event can only be
fired when the property {@link Titanium.UI.View#property-focusable focusable} is set to true. On iOS the
event is generated only when using {@link Titanium.UI.TextArea Ti.UI.TextArea}, {@link Titanium.UI.TextField Ti.UI.TextField}
and {@link Titanium.UI.SearchBar Ti.UI.SearchBar}.</p>
* @param {Number} keyCode
<p>The code for the physical key that was pressed. For more details, see <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a>. This API is experimental and subject to change.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method animate
* @hide
* <p>Animates this view.</p>
* @description <p>The {@link Titanium.UI.Animation Animation} object or dictionary passed to this method defines
the end state for the animation, the duration of the animation, and other properties.</p>
<p>Note that if you use <code>animate</code> to move a view, the view's actual <em>position</em> is changed, but
its layout properties, such as <code>top</code>, <code>left</code>, <code>center</code> and so on are not changed--these
reflect the original values set by the user, not the actual position of the view.</p>
<p>The {@link Titanium.UI.View#property-rect rect} property can be used to determine the actual size and
position of the view. Note that on Mobile Web, the <code>rect</code> property is not updated after
animation. This is a known issue <a href="https://jira.appcelerator.org/browse/TIMOB-8930">TIMOB-8930</a>.</p>
* @param {Titanium.UI.Animation/Dictionary<Titanium.UI.Animation>} animation
<p>Either a dictionary of animation properties or an
{@link Titanium.UI.Animation Animation} object.</p>
* @param {Callback<Object>} callback
<p>Function to be invoked upon completion of the animation.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method remove
* <p>Removes a child from this activity indicator's hierarchy.</p>
* @description <p>Adding children to an <code>ActivityIndicator</code> is not supported on all platforms.</p>
<p>See also: {@link Titanium.UI.ActivityIndicator#method-add add}, {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method toImage
* @hide
* <p>Returns an image of the rendered view, as a Blob.</p>
* @description <p>The <code>honorScaleFactor</code> method is only supported on iOS.</p>
* @param {Callback<Titanium.Blob>} callback (optional)
<p>Function to be invoked upon completion. If non-null, this method will be performed
asynchronously. If null, it will be performed immediately.</p>
* @param {Boolean} honorScaleFactor (optional)
<p>Determines whether the image is scaled based on scale factor of main screen. (iOS only) </p>
<p>When set to true, image is scale factor is honored. When set to false, the image in the
blob has the same dimensions for retina and non-retina devices.</p>
* @returns {Titanium.Blob}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method convertPointToView
* @hide
* <p>Translates a point from this view's coordinate system to another view's coordinate system.</p>
* @description <p>Returns <code>null</code> if either view is not in the view hierarchy. </p>
<p>Keep in mind that views may be removed from the view hierarchy if their window is blurred
or if the view is offscreen (such as in some situations with {@link Titanium.UI.ScrollableView}).</p>
<p>If this view is a {@link Titanium.UI.ScrollView}, the view's x and y offsets are subtracted from
the return value.</p>
* @param {Point} point
<p>A point in this view's coordinate system. </p>
<p>If this argument is missing an <code>x</code> or <code>y</code> property, or the properties can not be
converted into numbers, an exception will be raised.</p>
* @param {Titanium.UI.View} destinationView
<p>View that specifies the destination coordinate system to convert to. If this argument
is not a view, an exception will be raised.</p>
* @returns {Point}
* @platform android 1.8
* @platform iphone 1.8
* @platform ipad 1.8
* @platform mobileweb 2.0
* @platform windowsphone 4.1.0
*/
/**
* @method add
* <p>Adds a child to this activity indicator's hierarchy.</p>
* @description <p>Adding children to an <code>ActivityIndicator</code> is not supported on all platforms.</p>
<p>If you need to display views on top of this object, consider using
another view as a container for both this object and the views you want
to appear on top of it.</p>
<p>See also: {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method hide
* <p>Hides the activity indicator and stops the animation.</p>
* @param {AnimationOption} options (optional)
<p>Animation options for Android. <strong>Since Release 5.1.0.</strong></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method show
* <p>Shows the activity indicator and starts the animation.</p>
* @param {AnimationOption} options (optional)
<p>Animation options for Android. <strong>Since Release 5.1.0.</strong></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAccessibilityHidden
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-accessibilityHidden} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHidden
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-accessibilityHidden} property.</p>
* @param {Boolean} accessibilityHidden
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityHint
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-accessibilityHint} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHint
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-accessibilityHint} property.</p>
* @param {String} accessibilityHint
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityLabel
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-accessibilityLabel} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityLabel
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-accessibilityLabel} property.</p>
* @param {String} accessibilityLabel
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityValue
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-accessibilityValue} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityValue
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-accessibilityValue} property.</p>
* @param {String} accessibilityValue
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAnchorPoint
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-anchorPoint} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setAnchorPoint
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-anchorPoint} property.</p>
* @param {Point} anchorPoint
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getAnimatedCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-animatedCenter} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundRepeat
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundRepeat} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundRepeat
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundRepeat} property.</p>
* @param {Boolean} backgroundRepeat
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundLeftCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundLeftCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundLeftCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundLeftCap} property.</p>
* @param {Number} backgroundLeftCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundTopCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundTopCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundTopCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundTopCap} property.</p>
* @param {Number} backgroundTopCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBorderColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-borderColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setBorderColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-borderColor} property.</p>
* @param {String} borderColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getClipMode
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-clipMode} property.</p>
* @returns {Number}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setClipMode
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-clipMode} property.</p>
* @param {Number} clipMode
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getFocusable
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-focusable} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setFocusable
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-focusable} property.</p>
* @param {Boolean} focusable
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getOverrideCurrentAnimation
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-overrideCurrentAnimation} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
*/
/**
* @method setOverrideCurrentAnimation
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-overrideCurrentAnimation} property.</p>
* @param {Boolean} overrideCurrentAnimation
<p>New value for the property.</p>
* @platform android 3.3.0
*/
/**
* @method getPullBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-pullBackgroundColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setPullBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-pullBackgroundColor} property.</p>
* @param {String} pullBackgroundColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getSoftKeyboardOnFocus
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-softKeyboardOnFocus} property.</p>
* @returns {Number}
* @platform android 0.9
*/
/**
* @method setSoftKeyboardOnFocus
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-softKeyboardOnFocus} property.</p>
* @param {Number} softKeyboardOnFocus
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getTintColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-tintColor} property.</p>
* @returns {String}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setTintColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getTransform
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-transform} property.</p>
* @returns {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setTransform
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-transform} property.</p>
* @param {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix} transform
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getViewShadowRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-viewShadowRadius} property.</p>
* @returns {Number}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-viewShadowRadius} property.</p>
* @param {Number} viewShadowRadius
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getViewShadowColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-viewShadowColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-viewShadowColor} property.</p>
* @param {String} viewShadowColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getViewShadowOffset
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-viewShadowOffset} property.</p>
* @returns {Point}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowOffset
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-viewShadowOffset} property.</p>
* @param {Point} viewShadowOffset
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getHorizontalWrap
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-horizontalWrap} property.</p>
* @returns {Boolean}
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method setHorizontalWrap
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-horizontalWrap} property.</p>
* @param {Boolean} horizontalWrap
<p>New value for the property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method getKeepScreenOn
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-keepScreenOn} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setKeepScreenOn
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-keepScreenOn} property.</p>
* @param {Boolean} keepScreenOn
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getBackgroundDisabledColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundDisabledColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundDisabledColor} property.</p>
* @param {String} backgroundDisabledColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundDisabledImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundDisabledImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundDisabledImage} property.</p>
* @param {String} backgroundDisabledImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundFocusedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundFocusedColor} property.</p>
* @param {String} backgroundFocusedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundFocusedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundFocusedImage} property.</p>
* @param {String} backgroundFocusedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundGradient
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundGradient} property.</p>
* @returns {Gradient}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundGradient
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundGradient} property.</p>
* @param {Gradient} backgroundGradient
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundSelectedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundSelectedColor} property.</p>
* @param {String} backgroundSelectedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundSelectedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundSelectedImage} property.</p>
* @param {String} backgroundSelectedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBorderRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-borderRadius} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBorderRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-borderRadius} property.</p>
* @param {Number} borderRadius
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBorderWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-borderWidth} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBorderWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-borderWidth} property.</p>
* @param {Number} borderWidth
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getOpacity
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-opacity} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setOpacity
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-opacity} property.</p>
* @param {Number} opacity
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getRect
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-rect} property.</p>
* @returns {Dimension}
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getSize
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-size} property.</p>
* @returns {Dimension}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTouchEnabled
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-touchEnabled} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTouchEnabled
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-touchEnabled} property.</p>
* @param {Boolean} touchEnabled
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getVisible
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-visible} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setVisible
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-visible} property.</p>
* @param {Boolean} visible
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getZIndex
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-zIndex} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setZIndex
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getChildren
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-children} property.</p>
* @returns {Titanium.UI.View[]}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTop
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-top} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTop
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-top} property.</p>
* @param {Number/String} top
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getLeft
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-left} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setLeft
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-left} property.</p>
* @param {Number/String} left
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBottom
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-bottom} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBottom
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-bottom} property.</p>
* @param {Number/String} bottom
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-center} property.</p>
* @returns {Point}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setCenter
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-center} property.</p>
* @param {Point} center
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getRight
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-right} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setRight
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-right} property.</p>
* @param {Number/String} right
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getWidth
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-width} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setWidth
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-width} property.</p>
* @param {String} width
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getHeight
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-height} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setHeight
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-height} property.</p>
* @param {String} height
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getLayout
* @hide
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-layout} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setLayout
* @hide
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-layout} property.</p>
* @param {String} layout
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-style} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-style} property.</p>
* @param {Number} style
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getIndicatorDiameter
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-indicatorDiameter} property.</p>
* @returns {String}
* @platform mobileweb 2.1.0
*/
/**
* @method setIndicatorDiameter
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-indicatorDiameter} property.</p>
* @param {String} indicatorDiameter
<p>New value for the property.</p>
* @platform mobileweb 2.1.0
*/
/**
* @method getColor
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-color} property.</p>
* @returns {String}
*/
/**
* @method setColor
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-color} property.</p>
* @param {String} color
<p>New value for the property.</p>
*/
/**
* @method getFont
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-font} property.</p>
* @returns {Font}
*/
/**
* @method setFont
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-font} property.</p>
* @param {Font} font
<p>New value for the property.</p>
*/
/**
* @method getMessage
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-message} property.</p>
* @returns {String}
*/
/**
* @method setMessage
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-message} property.</p>
* @param {String} message
<p>New value for the property.</p>
*/
/**
* @method getMessageid
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-messageid} property.</p>
* @returns {String}
*/
/**
* @method setMessageid
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-messageid} property.</p>
* @param {String} messageid
<p>New value for the property.</p>
*/
/**
* @method getIndicatorColor
* <p>Gets the value of the {@link Titanium.UI.ActivityIndicator#property-indicatorColor} property.</p>
* @returns {String}
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method setIndicatorColor
* <p>Sets the value of the {@link Titanium.UI.ActivityIndicator#property-indicatorColor} property.</p>
* @param {String} indicatorColor
<p>New value for the property.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
* @platform windowsphone 4.1.0
*/
/**
* @property [accessibilityHidden=false]
* @hide
* @type Boolean
* <p>Whether the view should be "hidden" from (i.e., ignored by) the accessibility service.</p>
* <p> <b>Requires:</b>
Android 4.0 and later
iOS 5.0 and later
</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityElementsHidden</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility
Protocol</a>.
The native property is only available in iOS 5.0 and later; if
<code>accessibilityHidden</code> is specified on earlier versions of iOS, it is ignored.</p>
<p>On Android, setting <code>accessibilityHidden</code> calls the native
<a href="http://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29">View.setImportantForAccessibility</a>
method. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and
later; if this property is specified on earlier versions of Android, it is ignored.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityHint=]
* @hide
* @type String
* <p>Briefly describes what performing an action (such as a click) on the view will do.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityHint</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityValue} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityLabel=Title or label of the control.]
* @hide
* @type String
* <p>A succint label identifying the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityLabel</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityValue} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityValue=State or value of the control.]
* @hide
* @type String
* <p>A string describing the value (if any) of the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityValue</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [anchorPoint=Center of this view.]
* @hide
* @type Point
* <p>Coordinate of the view about which to pivot an animation.</p>
* @description <p>Used on iOS only. For Android, use {@link Titanium.UI.Animation#property-anchorPoint}. </p>
<p>Anchor point is specified as a fraction of the view's size. For example, <code>{0, 0}</code> is at
the view's top-left corner, <code>{0.5, 0.5}</code> at its center and <code>{1, 1}</code> at its bottom-right
corner. </p>
<p>See the "Using an anchorPoint" example in {@link Titanium.UI.Animation} for a demonstration.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property animatedCenter
* @hide
* @type Point
* @readonly
* <p>Current position of the view during an animation.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundRepeat=false]
* @hide
* @type Boolean
* <p>Determines whether to tile a background across a view.</p>
* @description <p>Setting this to <code>true</code> makes the set <code>backgroundImage</code> repeat across the view as a series
of tiles. The tiling begins in the upper-left corner, where the upper-left corner of the
background image is rendered. The image is then tiled to fill the available space of the
view.</p>
<p>Note that setting this to <code>true</code> may incur performance penalties for large views or
background images, as the tiling must be redone whenever a view is resized.</p>
<p>On iOS, the following views do not currently support tiled backgrounds:</p>
<ul>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.TextField}</li>
<li>{@link Titanium.UI.Label}</li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundLeftCap=0]
* @hide
* @type Number
* <p>Size of the left end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundTopCap=0]
* @hide
* @type Number
* <p>Size of the top end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [borderColor=Same as the normal background color of this view (Android, Mobile Web), black (iOS).]
* @hide
* @type String
* <p>Border color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [clipMode=Undefined. Behaves as if set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT}.]
* @hide
* @type Number
* <p>View's clipping behavior.</p>
* @description <p>Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_ENABLED} enforces all child views to be clipped to this views bounds.
Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_DISABLED} allows child views to be drawn outside the bounds of this view.
When set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT} or when this property is not set, clipping behavior is inferred.
See section on iOS Clipping Behavior in {@link Titanium.UI.View}.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [focusable=false]
* @hide
* @type Boolean
* <p>Whether view should be focusable while navigating with the trackball.</p>
* @platform android 0.9
*/
/**
* @property [overrideCurrentAnimation=undefined but behaves as false]
* @hide
* @type Boolean
* @creationOnly
* <p>When on, animate call overrides current animation if applicable.</p>
* @description <p>If this property is set to false, the animate call is ignored if the view is currently being animated.</p>
* @platform android 3.3.0
*/
/**
* @property [pullBackgroundColor=Undefined. Results in a light grey background color on the wrapper view.]
* @hide
* @type String
* <p>Background color of the wrapper view when this view is used as either <Titanium.UI.ListView.pullView> or {@link Titanium.UI.TableView#property-headerPullView}.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [softKeyboardOnFocus={@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}]
* @hide
* @type Number
* <p>Determines keyboard behavior when this view is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_HIDE_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_SHOW_ON_FOCUS}
</ul></p>
* @platform android 0.9
*/
/**
* @property [tintColor=]
* @hide
* @type String
* <p>The view's tintColor. This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of UIView on iOS. If no value is specified,
the tintColor of the View is inherited from its superview. </p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property [transform=Identity matrix]
* @hide
* @type Titanium.UI.2DMatrix/Titanium.UI.3DMatrix
* <p>Transformation matrix to apply to the view.</p>
* @description <p>Android and Mobile Web only support 2DMatrix transforms.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [viewShadowRadius=Undefined. Behaves as if set to 3.]
* @hide
* @type Number
* <p>Determines the blur radius used to create the shadow.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [viewShadowColor=Undefined. Behaves as if transparent.]
* @hide
* @type String
* <p>Determines the color of the shadow.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [viewShadowOffset=Undefined. Behaves as if set to (0,-3)]
* @hide
* @type Point
* <p>Determines the offset for the shadow of the view.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [horizontalWrap=true]
* @hide
* @type Boolean
* <p>Determines whether the layout has wrapping behavior.</p>
* @description <p>For more information, see the discussion of horizontal layout mode in the description of
the {@link Titanium.UI.View#property-layout layout} property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @property [keepScreenOn=false]
* @hide
* @type Boolean
* <p>Determines whether to keep the device screen on.</p>
* @description <p>When <code>true</code> the screen will not power down. Note: enabling this feature will use more
power, thereby adversely affecting run time when on battery.</p>
* @platform android 0.9
*/
/**
* @property [backgroundDisabledColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Disabled background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundDisabledImage=If `backgroundDisabledImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is disabled.
]
* @hide
* @type String
* <p>Disabled background image for the view, specified as a local file path or URL.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Focused background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>For normal views, the focused color is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedImage=If `backgroundFocusedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is focused.
]
* @hide
* @type String
* <p>Focused background image for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the focused background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundGradient=No gradient]
* @hide
* @type Gradient
* <p>A background gradient for the view.</p>
* @description <p>A gradient can be defined as either linear or radial. A linear gradient varies continuously
along a line between the <code>startPoint</code> and <code>endPoint</code>.</p>
<p>A radial gradient is interpolated between two circles, defined by <code>startPoint</code> and
<code>startRadius</code> and <code>endPoint</code> and <code>endRadius</code> respectively.</p>
<p>The start and end points and radius values can be defined in device units, in the view's
coordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center
point of the view can be specified as:</p>
<pre><code>{ x: 30, y: 30 }
</code></pre>
<p>Or:
{ x: '50%', y: '50%' }</p>
<p>When specifying multiple colors, you can specify an <em>offset</em> value for each color, defining
how far into the gradient it takes effect. For example, the following color array specifies
a gradient that goes from red to blue back to red: </p>
<pre><code>colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]
</code></pre>
<p>Mobile Web has two limitations: backfillStart and backfillEnd are ignored and the system
behaves as if they are true, and endPoint is not supported for radial gradients. </p>
<p>Android currently only supports linear gradients. It also ignores backfillStart and backfillEnd
treating them as if they are true.</p>
* <h3>Examples</h3>
<h4>Linear and Radial Gradients</h4>
<p>The following code excerpt creates two views, one with a linear gradient and one with
a radial gradient.</p>
<pre><code>var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var radialGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'radial',
startPoint: { x: 50, y: 50 },
endPoint: { x: 50, y: 50 },
colors: [ 'red', 'blue'],
startRadius: '90%',
endRadius: 0,
backfillStart: true
}
});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],
}
});
win1.add(radialGradient);
win1.add(linearGradient);
win1.open();
</code></pre>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundImage=Default behavior when `backgroundImage` is unspecified depends on the type of view and
the platform. For generic views, no image is used. For most controls (buttons, text
fields, and so on), platform-specific default images are used.
]
* @hide
* @type String
* <p>Background image for the view, specified as a local file path or URL.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedColor=Background color of this view.]
* @hide
* @type String
* <p>Selected background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p><code>focusable</code> must be true for normal views.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedImage=If `backgroundSelectedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is selected.
]
* @hide
* @type String
* <p>Selected background image url for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the selected background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [borderRadius=0]
* @hide
* @type Number
* <p>Radius for the rounded corners of the view's border.</p>
* @description <p>Each corner is rounded using an arc of a circle.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [borderWidth=0]
* @hide
* @type Number
* <p>Border width of the view.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [opacity=1.0 (opaque)]
* @hide
* @type Number
* <p>Opacity of this view, from 0.0 (transparent) to 1.0 (opaque).</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property rect
* @hide
* @type Dimension
* @readonly
* <p>The bounding box of the view relative to its parent, in system units.</p>
* @description <p>The view's bounding box is defined by its size and position. </p>
<p>The view's size is <code>rect.width</code> x <code>rect.height</code>. The view's top-left position relative to
its parent is (<code>rect.x</code> , <code>rect.y</code>). </p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property size
* @hide
* @type Dimension
* @readonly
* <p>The size of the view in system units. </p>
* @description <p>Although property returns a {@link Dimension} dictionary, only the <code>width</code> and <code>height</code>
properties are valid. The position properties--<code>x</code> and <code>y</code>--are always 0.</p>
<p>To find the position <em>and</em> size of the view, use the {@link Titanium.UI.View#property-rect rect}
property instead.</p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [touchEnabled=true]
* @hide
* @type Boolean
* <p>Determines whether view should receive touch events.</p>
* @description <p>If false, will forward the events to peers.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [visible=true]
* @hide
* @type Boolean
* <p>Determines whether the view is visible.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property zIndex
* @hide
* @type Number
* <p>Z-index stack order position, relative to other sibling views.</p>
* @description <p>A view does not have a default z-index value, meaning that it is undefined by default.
When this property is explicitly set, regardless of its value, it causes the view to be
positioned in front of any sibling that has an undefined z-index.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property children
* @hide
* @type Titanium.UI.View[]
* @readonly
* <p>Array of this view's child views.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundColor=Transparent]
* @hide
* @type String
* <p>Background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property top
* @type Number/String
* <p>Top position of the view.</p>
* @description <p>Determines the absolute position of the view relative to its parent. </p>
<p>Can be either a float value or a dimension string (for example <code>100</code> or<code>'50%'</code>.)</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property left
* @type Number/String
* <p>Left position of the view.</p>
* @description <p>Determines the absolute position of the view relative to its parent. </p>
<p>Can be either a float value or a dimension string (for example <code>100</code> or <code>'50%'</code>.)</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property bottom
* @type Number/String
* <p>Bottom position of the view.</p>
* @description <p>Determines the absolute position of the view relative to its parent. </p>
<p>Can be either a float value or a dimension string (for example <code>100</code> or <code>'50%'</code>.)</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property center
* @hide
* @type Point
* <p>View's center position, in the parent view's coordinates.</p>
* @description <p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property right
* @type Number/String
* <p>Right position of the view.</p>
* @description <p>Determines the absolute position of the view relative to its parent. </p>
<p>Can be either a float value or a dimension string (for example <code>100</code> or <code>'50%'</code>.)</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property width
* @type String
* <p>Width of the view. Only accepts value of {@link Titanium.UI#property-SIZE}, which must be explicitly set in order to
display the message and to position the view correctly.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values: </p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</li>
</ul>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p>
<p>This is an input property for specifying the view's width dimension. To determine
the view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property height
* @type String
* <p>Width of the view. Only accepts value of {@link Titanium.UI#property-SIZE}, which must be explicitly set in order to
display the message and to position the view correctly.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values:</p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li><p>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</p>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p></li>
</ul>
<p>This is an input property for specifying the view's height dimension. To determine the
view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [layout=Composite layout]
* @hide
* @type String
* <p>Specifies how the view positions its children.
One of: 'composite', 'vertical', or 'horizontal'.</p>
* @description <p>There are three layout options:</p>
<ul>
<li><p><code>composite</code> (or <code>absolute</code>). Default layout. A child view is positioned based on its
positioning properties or "pins" (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code> and <code>center</code>).
If no positioning properties are specified, the child is centered. </p>
<p>The child is always sized based on its <code>width</code> and <code>height</code> properties, if these are
specified. If the child's height or width is <em>not</em> specified explicitly, it may be
calculated implicitly from the positioning properties. For example, if both <code>left</code> and
<code>center.x</code> are specified, they can be used to calculate the width of the child control. </p>
<p>Because the size and position properties can conflict, there is a specific precedence
order for the layout properties. For vertical positioning, the precedence
order is: <code>height</code>, <code>top</code>, <code>center.y</code>, <code>bottom</code>.</p>
<p>The following table summarizes the various combinations of properties that can
be used for vertical positioning, in order from highest precedence to lowest.
(For example, if <code>height</code>, <code>center.y</code> and <code>bottom</code> are all specified, the
<code>height</code> and <code>center.y</code> values take precedence.)</p>
<table cellpadding="6px" border="1" rules="all">
<tr>
<th>Scenario</th><th>Behavior</th>
</tr>
<tr>
<td>`height` & `top` specified</td><td>Child positioned `top` unit from
parent's top, using specified `height`;
any `center.y` and `bottom` values are ignored.</td>
</tr>
<tr>
<td>`height` & `center.y` specified</td><td>Child positioned with center at
`center.y`, using specified `height`; any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`height` & `bottom` specified</td><td>Child positioned `bottom` units from
parent's bottom, using specified `height`.</td>
</tr>
<tr>
<td>`top` & `center.y` specified</td><td>Child positioned with top edge `top` units from
parent's top and center at `center.y`. Height is determined implicitly;
any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`top` & `bottom` specified</td><td>Child positioned with top edge `top` units from
parent's top and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly. </td>
</tr>
<tr>
<td>Only `top` specified</td><td>Child positioned `top` units from parent's
top, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`center.y` and `bottom` specified</td><td>Child positioned with center at
`center.y` and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly.</td>
</tr>
<tr>
<td>Only `center.y` specified</td><td>Child positioned with center at
`center.y`, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>Only `bottom` specified</td><td>Child positioned with bottom edge `bottom`
units from parent's bottom, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`height`, `top`, `center.y`, and `bottom` unspecified</td><td>Child
centered vertically in the parent and uses the default height calculation
for the child view type.</td>
</tr>
</table>
<p>Horizontal positioning works like vertical positioning, except that the
precedence is <code>width</code>, <code>left</code>, <code>center.x</code>, <code>right</code>. </p>
<p>For complete details on composite layout rules, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>
in the Titanium Mobile Guides. </p>
<ul><li><code>vertical</code>. Children are laid out vertically from top to bottom. The first child
is laid out <code>top</code> units from its parent's bounding box. Each subsequent child is
laid out below the previous child. The space between children is equal to the
upper child's <code>bottom</code> value plus the lower child's <code>top</code> value. </li></ul>
<p>Each child is positioned horizontally as in the composite layout mode. </p>
<ul><li><code>horizontal</code>. Horizontal layouts have different behavior depending on whether wrapping
is enabled. Wrapping is enabled by default (the <code>horizontalWrap</code> property is <code>true</code>).</li></ul>
<p>With wrapping behavior, the children are laid out horizontally from left to right,
<em>in rows</em>. If a child requires more horizontal space than exists in the current row,
it is wrapped to a new row. The height of each row is equal to the maximum height of
the children in that row.</p>
<p>Wrapping behavior is available on iOS, Android and Mobile Web (Release 2.1.0 and later).
When the <code>horizontalWrap</code> property is set to true, the first row is placed at the top of the
parent view, and successive rows are placed below the first row. Each child is
positioned vertically <em>within its row</em> somewhat like composite layout mode.
In particular: </p>
<ul><li>If neither <code>top</code> or <code>bottom</code> is specified, the child is centered in the
row.</li>
<li>If either <code>top</code> or <code>bottom</code> is specified, the child is aligned to either
the top or bottom of the row, with the specified amount of padding.</li>
<li>If <em>both</em> <code>top</code> and <code>bottom</code> is specified for a given child, the properties
are both treated as padding.</li></ul>
<p>If the <code>horizontalWrap</code> property is false, the behavior is more equivalent to a vertical layout.
Children are laid or horizontally from left to right in a single row. The <code>left</code> and
<code>right</code> properties are used as padding between the children, and the <code>top</code> and <code>bottom</code>
properties are used to position the children vertically.</p>
<p>On Mobile Web <em>prior to</em> Release 2.1.0, the horizontal layout does not wrap by default,
and does not support the <code>horizontalWrap</code> property. On Android and iOS <em>prior to</em> Release
2.1.0, the horizontal layout always wraps and the <code>horizontalWrap</code> property is not supported.</p></li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [style={@link Titanium.UI.ActivityIndicatorStyle#property-PLAIN}]
* @type Number
* <p>The style for the activity indicator.</p>
* @description <p>One of the activity indicator style constants.</p>
<p>On Mobile Web, setting the style automatically sets the indicator color and diameter.</p>
<p>See also: {@link Titanium.UI.ActivityIndicator#property-indicatorColor indicatorColor},
{@link Titanium.UI.ActivityIndicator#property-indicatorDiameter indicatorDiameter}</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.ActivityIndicatorStyle#property-BIG}
<li> {@link Titanium.UI.ActivityIndicatorStyle#property-BIG_DARK}
<li> {@link Titanium.UI.ActivityIndicatorStyle#property-DARK}
<li> {@link Titanium.UI.ActivityIndicatorStyle#property-PLAIN}
</ul></p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [indicatorDiameter=36]
* @type String
* <p>Diameter of the indicator.</p>
* @description <p>The diameter of the animated indicator, exclusive of any message text.</p>
* @platform mobileweb 2.1.0
*/
/**
* @property color
* @type String
* <p>Color of the message text, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property font
* @type Font
* <p>Font used for the message text.</p>
*/
/**
* @property message
* @type String
* <p>Message text.</p>
*/
/**
* @property messageid
* @type String
* <p>Key identifying a string in the locale file to use for the message text.</p>
* @description <p>Only one of <code>message</code> or <code>messageid</code> should be specified.</p>
*/
/**
* @property [indicatorColor=<pre>#fff</pre>]
* @type String
* <p>Color of the animated indicator.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.UI.ActivityIndicatorStyle
* @platform android 3.0.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 2.1.0
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ActivityIndicatorStyle.yml
* <p>A set of constants for the styles available for {@link Titanium.UI.ActivityIndicator} objects.</p>
*/
/**
* @property BIG
* @type Number
* @readonly
* <p>Large white spinning indicator.</p>
* @description <p>Used with the {@link Titanium.UI.ActivityIndicator#property-style} property.</p>
<p>One of the group of activity indicator style constants
{@link Titanium.UI.ActivityIndicatorStyle#property-DARK DARK},
{@link Titanium.UI.ActivityIndicatorStyle#property-BIG BIG},
{@link Titanium.UI.ActivityIndicatorStyle#property-BIG_DARK BIG},
and {@link Titanium.UI.ActivityIndicatorStyle#property-PLAIN PLAIN}.</p>
*/
/**
* @property BIG_DARK
* @type Number
* @readonly
* <p>Large gray spinning indicator. This constant is not available on iOS.</p>
* @description <p>Used with the {@link Titanium.UI.ActivityIndicator#property-style} property.</p>
<p>One of the group of activity indicator style constants
{@link Titanium.UI.ActivityIndicatorStyle#property-DARK DARK},
{@link Titanium.UI.ActivityIndicatorStyle#property-BIG BIG},
{@link Titanium.UI.ActivityIndicatorStyle#property-BIG_DARK BIG},
and {@link Titanium.UI.ActivityIndicatorStyle#property-PLAIN PLAIN}.</p>
* @platform android 3.0.0
* @platform mobileweb 2.1.0
* @platform windowsphone 4.1.0
*/
/**
* @property DARK
* @type Number
* @readonly
* <p>Small gray spinning indicator.</p>
* @description <p>Used with the {@link Titanium.UI.ActivityIndicator#property-style} property.</p>
<p>One of the group of activity indicator style constants
{@link Titanium.UI.ActivityIndicatorStyle#property-DARK DARK},
{@link Titanium.UI.ActivityIndicatorStyle#property-BIG BIG},
{@link Titanium.UI.ActivityIndicatorStyle#property-BIG_DARK BIG},
and {@link Titanium.UI.ActivityIndicatorStyle#property-PLAIN PLAIN}.</p>
*/
/**
* @property PLAIN
* @type Number
* @readonly
* <p>Small white spinning indicator (default).</p>
* @description <p>Used with the {@link Titanium.UI.ActivityIndicator#property-style} property.</p>
<p>One of the group of activity indicator style constants
{@link Titanium.UI.ActivityIndicatorStyle#property-DARK DARK},
{@link Titanium.UI.ActivityIndicatorStyle#property-BIG BIG},
{@link Titanium.UI.ActivityIndicatorStyle#property-BIG_DARK BIG},
and {@link Titanium.UI.ActivityIndicatorStyle#property-PLAIN PLAIN}.</p>
*/
/**
* @class Titanium.UI.AlertDialog
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/AlertDialog.yml
* <p>An alert dialog is a modal view that includes an optional title, a message and buttons,
positioned in the middle of the display.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/alertdialog/alertdialog_android.png" height="75" /></td>
<td><img src="images/alertdialog/alertdialog_ios.png" height="75" /></td>
<td><img src="images/alertdialog/alertdialog_mobileweb.png" height="75" /></td>
<td><img src="images/alertdialog/alertdialog_wp.png" height="75" /></td>
</tr>
<tr><th>Android</th><th>iOS</th><th>Mobile Web</th><th>Windows Phone</th></tr>
</table>
<p>An alert dialog is created using {@link Titanium.UI#method-createAlertDialog} or <strong><code><AlertDialog></code></strong> Alloy element.</p>
<p>Although this dialog always appears in the middle of the display (not touching the edges),
other aspects of its aesthetics and the way the user interacts with it are different for each
platform, as described below.</p>
<h4>Android</h4>
<p>On Android, the default alert dialog displays text information, via a title and message, without
any buttons. As the user can use the system hardware <code>back</code> button to dismiss it, a button is
optional.</p>
<p>Buttons are shown if the <code>buttonNames</code> property is defined, and are rendered horizontally below
the message.</p>
<p>To create a custom layout, a view may be added and, in turn, a hierarchy of views added to that
child view.</p>
<h4>iOS</h4>
<p>On iOS, the default alert dialog displays text information, via a title and message, with
a single button to allow it to be dismissed.</p>
<p>Buttons are defined using the <code>buttonNames</code> property and are rendered vertically below
the message. Alert dialogs are automatically cancelled when the application is
paused/suspended. This behavior can avoided by setting <code>persistent</code> property on alert dialog
to be <code>true</code>.</p>
<p>The <code>style</code> property can be used to allow the user to enter plain text,
obscured text or login identifier and password. Entered values can be captured with listening
<code>cancel</code> event.</p>
<p>Starting at Titanium SDK 5.1.0, you can also specify the <code>placeholder</code>, <code>keyboardType</code> and <code>returnKeyType</code>
properties when using the alert dialog style {@link Titanium.UI.iOS.AlertDialogStyle#property-PLAIN_TEXT_INPUT} or
{@link Titanium.UI.iOS.AlertDialogStyle#property-SECURE_TEXT_INPUT}.
When using the alert dialog style {@link Titanium.UI.iOS.AlertDialogStyle#property-LOGIN_AND_PASSWORD_INPUT}, you can
specify the <code>loginPlaceholder</code>, <code>loginKeyboardType</code> and <code>loginReturnKeyType</code> properties for the login field,
as well as the <code>passwordPlaceholder</code>, <code>passwordKeyboardType</code> and <code>passwordReturnKeyType</code> properties for the password field.</p>
<h4>Global Alias</h4>
<p>A global method <code>alert()</code> is aliased to this object, and can be invoked with a single message.
For example</p>
<pre><code>alert('this is a message');
</code></pre>
<p>This will generate an alert with a title of "Alert" and an "OK" button.</p>
<h4>Caveats</h4>
<p>Multiple alerts should not be shown at once.</p>
<p>The <code>title</code> and <code>ok</code> properties cannot be changed while the alert dialog is being displayed. On
Android only, you can change the <code>message</code> property while the alert dialog is being displayed.</p>
* <h3>Examples</h3>
<h4>Single-button Alert Dialog (using alias)</h4>
<p>Create a single-button alert dialog using the global <code>alert()</code> alias.</p>
<pre><code>Ti.UI.setBackgroundColor('white');
var win = Ti.UI.createWindow({
title: 'Click window to test',
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false
});
win.addEventListener('click', function(e){
alert('The file has been deleted');
});
win.open();
</code></pre><h4>Single-button Alert Dialog (standard)</h4>
<p>Create a single-button alert dialog, without explicitly defining it using the <code>buttonNames</code>
property, which is invoked when the app window is clicked.</p>
<pre><code>Ti.UI.setBackgroundColor('white');
var win = Ti.UI.createWindow({
title: 'Click window to test',
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false
});
win.addEventListener('click', function(e){
var dialog = Ti.UI.createAlertDialog({
message: 'The file has been deleted',
ok: 'Okay',
title: 'File Deleted'
});
dialog.show();
});
win.open();
</code></pre><h4>Three-button Alert Dialog</h4>
<p>Create a three-button alert dialog, which is invoked when the app window is clicked.
Output a message to the log when the cancel button is clicked.</p>
<pre><code>Ti.UI.setBackgroundColor('white');
var win = Ti.UI.createWindow({
title: 'Click window to test',
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false
});
win.addEventListener('click', function(e){
var dialog = Ti.UI.createAlertDialog({
cancel: 1,
buttonNames: ['Confirm', 'Cancel', 'Help'],
message: 'Would you like to delete the file?',
title: 'Delete'
});
dialog.addEventListener('click', function(e){
if (e.index === e.source.cancel){
Ti.API.info('The cancel button was clicked');
}
Ti.API.info('e.cancel: ' + e.cancel);
Ti.API.info('e.source.cancel: ' + e.source.cancel);
Ti.API.info('e.index: ' + e.index);
});
dialog.show();
});
win.open();
</code></pre><h4>Alert Dialog with Plain Text Input (iOS 5 and later)</h4>
<p>Create an alert dialog and allow the user enter plain text, which is invoked when the
app window is clicked.
Output entered text value to the log when the OK button is clicked.</p>
<pre><code>Ti.UI.setBackgroundColor('white');
var win = Ti.UI.createWindow({
title: 'Click window to test'
});
win.addEventListener('click', function(e){
var dialog = Ti.UI.createAlertDialog({
title: 'Enter text',
style: Ti.UI.iOS.AlertDialogStyle.PLAIN_TEXT_INPUT,
buttonNames: ['OK']
});
dialog.addEventListener('click', function(e){
Ti.API.info('e.text: ' + e.text);
});
dialog.show();
});
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous three-button alert dialog example as an Alloy view.</p>
<p>alertdialog.xml:</p>
<pre><code><Alloy>
<Window id="win" onClick="showDialog" title="Click window to test" backgroundColor="white"
exitOnClose="true" fullscreen="false" >
<AlertDialog id="dialog" onClick="doClick" title="Delete"
message="Would you like to delete the file?" cancel="1">
<!-- The ButtonNames tag sets the buttonNames property. -->
<ButtonNames>
<ButtonName>Confirm</ButtonName>
<ButtonName>Cancel</ButtonName>
<ButtonName>Help</ButtonName>
</ButtonNames>
</AlertDialog>
</Window>
</Alloy>
</code></pre>
<p>alertdialog.js:</p>
<pre><code>function showDialog(){
$.dialog.show();
};
function doClick(e){
Ti.API.info('e.text: ' + e.text);
};
</code></pre>
*/
/**
* @event longclick
* @hide
* <p>Fired when the device detects a long click.</p>
* @description <p>A long click is generated by touching and holding on the touchscreen or holding down the
trackball button. </p>
<p>The event occurs before the finger/button is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>As the trackball can fire this event, it is not intended to return the <code>x</code> and <code>y</code>
coordinates of the touch, even when it is generated by the touchscreen. </p>
<p>A <code>longclick</code> blocks a <code>click</code>, meaning that a <code>click</code> event will not fire when a
<code>longclick</code> listener exists.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event click
* <p>Fired when a button in the dialog is clicked.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Boolean/Number} cancel
<p>Boolean type on Android and Mobile Web; Number on iOS. </p>
<p>On Android and Mobile Web, indicates whether the cancel button was clicked, in which
case returns <code>true</code>. </p>
<p>On iOS, the value of the {@link Titanium.UI.AlertDialog#property-cancel cancel} property is
returned, if defined, or <code>-1</code> otherwise. </p>
<p>See the <code>Three-button Alert Dialog</code> example for a cross-platform workaround for this
parity issue.</p>
* @param {Number} index
<p>Index of the button that was clicked.</p>
* @param {String} (iphone ipad) login
<p>Value of login field if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-LOGIN_AND_PASSWORD_INPUT}.</p>
* @param {String} (iphone ipad) password
<p>Value of password field if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-LOGIN_AND_PASSWORD_INPUT}.</p>
* @param {String} (iphone ipad) text
<p>Value of text field if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-PLAIN_TEXT_INPUT} or
{@link Titanium.UI.iOS.AlertDialogStyle#property-SECURE_TEXT_INPUT}.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event focus
* @hide
* <p>Fired when the view element gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event postlayout
* @hide
* <p>Fired when a layout cycle is finished.</p>
* @description <p>This event is fired when the view and its ancestors have been laid out.
The {@link Titanium.UI.View#property-rect rect} and {@link Titanium.UI.View#property-size size} values
should be usable when this event is fired.</p>
<p>This event is typically triggered by either changing layout
properties or by changing the orientation of the device. Note that changing the
layout of child views or ancestors can also trigger a relayout of this view.
On Mobile Web, this event can also be triggered by resizing the browser window.</p>
<p>Note that altering any properties that affect layout from the <code>postlayout</code> callback
may result in an endless loop.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @event keypressed
* @hide
* <p>Fired when a hardware key is pressed in the view.</p>
* @description <p>A keypressed event is generated by pressing a hardware key. On Android, this event can only be
fired when the property {@link Titanium.UI.View#property-focusable focusable} is set to true. On iOS the
event is generated only when using {@link Titanium.UI.TextArea Ti.UI.TextArea}, {@link Titanium.UI.TextField Ti.UI.TextField}
and {@link Titanium.UI.SearchBar Ti.UI.SearchBar}.</p>
* @param {Number} keyCode
<p>The code for the physical key that was pressed. For more details, see <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a>. This API is experimental and subject to change.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method animate
* @hide
* <p>Animates this view.</p>
* @description <p>The {@link Titanium.UI.Animation Animation} object or dictionary passed to this method defines
the end state for the animation, the duration of the animation, and other properties.</p>
<p>Note that if you use <code>animate</code> to move a view, the view's actual <em>position</em> is changed, but
its layout properties, such as <code>top</code>, <code>left</code>, <code>center</code> and so on are not changed--these
reflect the original values set by the user, not the actual position of the view.</p>
<p>The {@link Titanium.UI.View#property-rect rect} property can be used to determine the actual size and
position of the view. Note that on Mobile Web, the <code>rect</code> property is not updated after
animation. This is a known issue <a href="https://jira.appcelerator.org/browse/TIMOB-8930">TIMOB-8930</a>.</p>
* @param {Titanium.UI.Animation/Dictionary<Titanium.UI.Animation>} animation
<p>Either a dictionary of animation properties or an
{@link Titanium.UI.Animation Animation} object.</p>
* @param {Callback<Object>} callback
<p>Function to be invoked upon completion of the animation.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method remove
* @hide
* <p>Removes a child view from this view's hierarchy.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method toImage
* @hide
* <p>Returns an image of the rendered view, as a Blob.</p>
* @description <p>The <code>honorScaleFactor</code> method is only supported on iOS.</p>
* @param {Callback<Titanium.Blob>} callback (optional)
<p>Function to be invoked upon completion. If non-null, this method will be performed
asynchronously. If null, it will be performed immediately.</p>
* @param {Boolean} honorScaleFactor (optional)
<p>Determines whether the image is scaled based on scale factor of main screen. (iOS only) </p>
<p>When set to true, image is scale factor is honored. When set to false, the image in the
blob has the same dimensions for retina and non-retina devices.</p>
* @returns {Titanium.Blob}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method convertPointToView
* @hide
* <p>Translates a point from this view's coordinate system to another view's coordinate system.</p>
* @description <p>Returns <code>null</code> if either view is not in the view hierarchy. </p>
<p>Keep in mind that views may be removed from the view hierarchy if their window is blurred
or if the view is offscreen (such as in some situations with {@link Titanium.UI.ScrollableView}).</p>
<p>If this view is a {@link Titanium.UI.ScrollView}, the view's x and y offsets are subtracted from
the return value.</p>
* @param {Point} point
<p>A point in this view's coordinate system. </p>
<p>If this argument is missing an <code>x</code> or <code>y</code> property, or the properties can not be
converted into numbers, an exception will be raised.</p>
* @param {Titanium.UI.View} destinationView
<p>View that specifies the destination coordinate system to convert to. If this argument
is not a view, an exception will be raised.</p>
* @returns {Point}
* @platform android 1.8
* @platform iphone 1.8
* @platform ipad 1.8
* @platform mobileweb 2.0
* @platform windowsphone 4.1.0
*/
/**
* @method add
* @hide
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>The child view is added as the last child in this view's hierarchy. </p>
<p>Although all views inherit from {@link Titanium.UI.View}, not all views are capable of
containing other views. In particular:</p>
<ul>
<li>Some views are not designed to be containers at all.</li>
<li>Some views are special-purpose containers that can only contain certain other
views.</li>
<li>Some views are top-level containers that cannot (or should not) be added to other views.</li>
</ul>
<h4>Non-Container Views</h4>
<p>The following views are not intended to act as containers that can hold other
views:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator ActivityIndicator}</li>
<li>{@link Titanium.UI.Button Button}</li>
<li>{@link Titanium.UI.ImageView ImageView}</li>
<li>{@link Titanium.UI.Label Label}</li>
<li>{@link Titanium.UI.ProgressBar ProgressBar}</li>
<li>{@link Titanium.UI.SearchBar SearchBar}</li>
<li>{@link Titanium.UI.Slider Slider}</li>
<li>{@link Titanium.UI.Switch Switch}</li>
<li>{@link Titanium.UI.TableView TableView}</li>
<li>{@link Titanium.UI.TextArea TextArea}</li>
<li>{@link Titanium.UI.TextField TextField}</li>
<li>{@link Titanium.UI.WebView WebView}</li>
</ul>
<p>Adding children to the these views <em>may</em> be supported on some platforms,
but is not guaranteed to work across platforms. Where it is supported, it may not
work as expected.</p>
<p>For maximum portability, these views should be treated as if they do not support children. <br>
Instead of adding children to these views, applications can positon other views as
siblings. For example, instead of adding a button as a child of a <code>WebView</code>, you can add
the button to the web view's parent such that it appears on top of the web view. </p>
<h4>Special-Purpose Containers</h4>
<p>A few view objects act as special-purpose containers--that is, they only manage
certain types of children, and many of them support a special means of adding
these children, instead of the general <code>add</code> method. These containers include:</p>
<ul>
<li><p>{@link Titanium.UI.ButtonBar ButtonBar} and {@link Titanium.UI.iOS.TabbedBar TabbedBar} are designed
to hold their own internally-created buttons, assigned by adding strings to the "labels" array.
Views added using the <code>add</code> method are displayed on top of these buttons.</p></li>
<li><p>{@link Titanium.UI.Picker Picker}. Can only hold <code>PickerRows</code> and <code>PickerColumns</code>, which
are added using the <code>add</code> method. Adding other types of views to a <code>Picker</code> is not
supported.</p></li>
<li><p>{@link Titanium.UI.TableView TableView} is a specialized container for
<code>TableViewSection</code> and <code>TableViewRow</code> objects. These objects must be
added using the properties and methods that <code>TableView</code> provides
for adding and removing sectons and rows.</p>
<p>On some platforms, it is possible to add arbitrary child views to a table view
using the <code>add</code> method. However, this is not guaranteed to work on all platforms,
and in general, should be avoided.</p></li>
<li><p>{@link Titanium.UI.TableViewSection TableViewSection} is a specialized container
for <code>TableViewRow</code> objects, which <em>are</em> added using the <code>add</code> method. The <code>add</code> method
on <code>TableViewSection</code> can only be used to add <code>TableViewRow</code> objects.</p></li>
<li><p>{@link Titanium.UI.iOS.Toolbar Toolbar} is designed to hold buttons and certain
other controls, added to its <code>items</code> array. Views added using the <code>add</code> method are
displayed on top of the controls in the <code>items</code> array.</p></li>
<li><p>The <code>Tab</code>, <code>TabGroup</code>, <code>NavigationGroup</code>, <code>NavigationWindow</code> and <code>SplitWindow</code> objects are
special containers that manage windows. These are discussed in the
"Top-Level Containers" section.</p></li>
</ul>
<h4>Top-Level Containers</h4>
<p>There are certain top-level containers that are not intended to be added
as the children of other views. These top-level containers include
{@link Titanium.UI.Window}, {@link Titanium.UI.iPad.SplitWindow}, {@link Titanium.UI.iOS.NavigationWindow},
and {@link Titanium.UI.TabGroup}. Other types of views must be added
to a top-level container in order to be displayed on screen.</p>
<p>The special containers {@link Titanium.UI.MobileWeb.NavigationGroup},
{@link Titanium.UI.iOS.NavigationWindow}, {@link Titanium.UI.iPad.SplitWindow},
{@link Titanium.UI.Tab}, and {@link Titanium.UI.TabGroup} manage windows.
These managed windows may be referred to as <em>children</em> of the
container, but they are not added using the <code>add</code> method.</p>
<p>Note that although a <code>NavigationGroup</code> manages windows, it is not itself a
top-level container. It must be added to a <code>Window</code> in order to be displayed.</p>
<p><code>Tab</code> is another kind of special container: it is not itself a top-level container,
but can only be used within a <code>TabGroup</code>. You cannot <code>add</code> a <code>Tab</code> to an arbitrary
container.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method hide
* <p>Hides this dialog.</p>
* @param {AnimationOption} options (optional)
<p>Animation options for Android. <strong>Since Release 5.1.0.</strong></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method show
* <p>Shows this dialog.</p>
* @param {AnimationOption} options (optional)
<p>Animation options for Android. <strong>Since Release 5.1.0.</strong></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAccessibilityHidden
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-accessibilityHidden} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHidden
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-accessibilityHidden} property.</p>
* @param {Boolean} accessibilityHidden
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityHint
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-accessibilityHint} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHint
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-accessibilityHint} property.</p>
* @param {String} accessibilityHint
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityLabel
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-accessibilityLabel} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityLabel
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-accessibilityLabel} property.</p>
* @param {String} accessibilityLabel
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityValue
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-accessibilityValue} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityValue
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-accessibilityValue} property.</p>
* @param {String} accessibilityValue
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAnchorPoint
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-anchorPoint} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setAnchorPoint
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-anchorPoint} property.</p>
* @param {Point} anchorPoint
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getAnimatedCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-animatedCenter} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundRepeat
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-backgroundRepeat} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundRepeat
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-backgroundRepeat} property.</p>
* @param {Boolean} backgroundRepeat
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundLeftCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-backgroundLeftCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundLeftCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-backgroundLeftCap} property.</p>
* @param {Number} backgroundLeftCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundTopCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-backgroundTopCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundTopCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-backgroundTopCap} property.</p>
* @param {Number} backgroundTopCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBorderColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-borderColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setBorderColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-borderColor} property.</p>
* @param {String} borderColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getClipMode
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-clipMode} property.</p>
* @returns {Number}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setClipMode
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-clipMode} property.</p>
* @param {Number} clipMode
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getFocusable
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-focusable} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setFocusable
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-focusable} property.</p>
* @param {Boolean} focusable
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getOverrideCurrentAnimation
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-overrideCurrentAnimation} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
*/
/**
* @method setOverrideCurrentAnimation
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-overrideCurrentAnimation} property.</p>
* @param {Boolean} overrideCurrentAnimation
<p>New value for the property.</p>
* @platform android 3.3.0
*/
/**
* @method getPullBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-pullBackgroundColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setPullBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-pullBackgroundColor} property.</p>
* @param {String} pullBackgroundColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getSoftKeyboardOnFocus
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-softKeyboardOnFocus} property.</p>
* @returns {Number}
* @platform android 0.9
*/
/**
* @method setSoftKeyboardOnFocus
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-softKeyboardOnFocus} property.</p>
* @param {Number} softKeyboardOnFocus
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getTintColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-tintColor} property.</p>
* @returns {String}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setTintColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getTransform
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-transform} property.</p>
* @returns {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setTransform
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-transform} property.</p>
* @param {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix} transform
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getViewShadowRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-viewShadowRadius} property.</p>
* @returns {Number}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-viewShadowRadius} property.</p>
* @param {Number} viewShadowRadius
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getViewShadowColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-viewShadowColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-viewShadowColor} property.</p>
* @param {String} viewShadowColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getViewShadowOffset
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-viewShadowOffset} property.</p>
* @returns {Point}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowOffset
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-viewShadowOffset} property.</p>
* @param {Point} viewShadowOffset
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getHorizontalWrap
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-horizontalWrap} property.</p>
* @returns {Boolean}
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method setHorizontalWrap
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-horizontalWrap} property.</p>
* @param {Boolean} horizontalWrap
<p>New value for the property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method getKeepScreenOn
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-keepScreenOn} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setKeepScreenOn
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-keepScreenOn} property.</p>
* @param {Boolean} keepScreenOn
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getBackgroundDisabledColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-backgroundDisabledColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-backgroundDisabledColor} property.</p>
* @param {String} backgroundDisabledColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundDisabledImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-backgroundDisabledImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-backgroundDisabledImage} property.</p>
* @param {String} backgroundDisabledImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-backgroundFocusedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-backgroundFocusedColor} property.</p>
* @param {String} backgroundFocusedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-backgroundFocusedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-backgroundFocusedImage} property.</p>
* @param {String} backgroundFocusedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundGradient
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-backgroundGradient} property.</p>
* @returns {Gradient}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundGradient
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-backgroundGradient} property.</p>
* @param {Gradient} backgroundGradient
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-backgroundImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-backgroundSelectedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-backgroundSelectedColor} property.</p>
* @param {String} backgroundSelectedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-backgroundSelectedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-backgroundSelectedImage} property.</p>
* @param {String} backgroundSelectedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBorderRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-borderRadius} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBorderRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-borderRadius} property.</p>
* @param {Number} borderRadius
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBorderWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-borderWidth} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBorderWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-borderWidth} property.</p>
* @param {Number} borderWidth
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getOpacity
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-opacity} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setOpacity
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-opacity} property.</p>
* @param {Number} opacity
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getRect
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-rect} property.</p>
* @returns {Dimension}
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getSize
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-size} property.</p>
* @returns {Dimension}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTouchEnabled
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-touchEnabled} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTouchEnabled
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-touchEnabled} property.</p>
* @param {Boolean} touchEnabled
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getVisible
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-visible} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setVisible
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-visible} property.</p>
* @param {Boolean} visible
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getZIndex
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-zIndex} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setZIndex
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getChildren
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-children} property.</p>
* @returns {Titanium.UI.View[]}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-backgroundColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTop
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-top} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTop
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-top} property.</p>
* @param {Number/String} top
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getLeft
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-left} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setLeft
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-left} property.</p>
* @param {Number/String} left
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBottom
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-bottom} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBottom
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-bottom} property.</p>
* @param {Number/String} bottom
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-center} property.</p>
* @returns {Point}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setCenter
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-center} property.</p>
* @param {Point} center
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getRight
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-right} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setRight
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-right} property.</p>
* @param {Number/String} right
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-width} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-width} property.</p>
* @param {Number/String} width
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getHeight
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-height} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setHeight
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-height} property.</p>
* @param {Number/String} height
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getLayout
* @hide
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-layout} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setLayout
* @hide
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-layout} property.</p>
* @param {String} layout
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getCanceledOnTouchOutside
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-canceledOnTouchOutside} property.</p>
* @returns {Boolean}
* @platform android 6.0.0
*/
/**
* @method setCanceledOnTouchOutside
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-canceledOnTouchOutside} property.</p>
* @param {Boolean} canceledOnTouchOutside
<p>New value for the property.</p>
* @platform android 6.0.0
*/
/**
* @method getDestructive
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-destructive} property.</p>
* @returns {Number}
* @platform iphone 3.5.0
* @platform ipad 3.5.0
*/
/**
* @method setDestructive
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-destructive} property.</p>
* @param {Number} destructive
<p>New value for the property.</p>
* @platform iphone 3.5.0
* @platform ipad 3.5.0
*/
/**
* @method getPreferred
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-preferred} property.</p>
* @returns {Number}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setPreferred
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-preferred} property.</p>
* @param {Number} preferred
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getKeyboardType
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-keyboardType} property.</p>
* @returns {Number}
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method setKeyboardType
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-keyboardType} property.</p>
* @param {Number} keyboardType
<p>New value for the property.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method getKeyboardAppearance
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-keyboardAppearance} property.</p>
* @returns {Number}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setKeyboardAppearance
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-keyboardAppearance} property.</p>
* @param {Number} keyboardAppearance
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getLoginPlaceholder
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-loginPlaceholder} property.</p>
* @deprecated 5.4.0 Use <Titanium.UI.AlertDialog.loginHintText> instead.
* @returns {String}
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method setLoginPlaceholder
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-loginPlaceholder} property.</p>
* @deprecated 5.4.0 Use <Titanium.UI.AlertDialog.loginHintText> instead.
* @param {String} loginPlaceholder
<p>New value for the property.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method getLoginHintText
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-loginHintText} property.</p>
* @returns {String}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method setLoginHintText
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-loginHintText} property.</p>
* @param {String} loginHintText
<p>New value for the property.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method getLoginReturnKeyType
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-loginReturnKeyType} property.</p>
* @returns {Number}
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 5.1.0
*/
/**
* @method setLoginReturnKeyType
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-loginReturnKeyType} property.</p>
* @param {Number} loginReturnKeyType
<p>New value for the property.</p>
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 5.1.0
*/
/**
* @method getLoginKeyboardType
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-loginKeyboardType} property.</p>
* @returns {Number}
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 5.1.0
*/
/**
* @method setLoginKeyboardType
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-loginKeyboardType} property.</p>
* @param {Number} loginKeyboardType
<p>New value for the property.</p>
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 5.1.0
*/
/**
* @method getMessageid
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-messageid} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setMessageid
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-messageid} property.</p>
* @param {String} messageid
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getOk
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-ok} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setOk
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-ok} property.</p>
* @param {String} ok
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getOkid
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-okid} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setOkid
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-okid} property.</p>
* @param {String} okid
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getPasswordPlaceholder
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-passwordPlaceholder} property.</p>
* @deprecated 5.4.0 Use <Titanium.UI.AlertDialog.passwordHintText> instead.
* @returns {String}
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method setPasswordPlaceholder
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-passwordPlaceholder} property.</p>
* @deprecated 5.4.0 Use <Titanium.UI.AlertDialog.passwordHintText> instead.
* @param {String} passwordPlaceholder
<p>New value for the property.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method getPasswordHintText
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-passwordHintText} property.</p>
* @returns {String}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method setPasswordHintText
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-passwordHintText} property.</p>
* @param {String} passwordHintText
<p>New value for the property.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method getPasswordReturnKeyType
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-passwordReturnKeyType} property.</p>
* @returns {Number}
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 5.1.0
*/
/**
* @method setPasswordReturnKeyType
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-passwordReturnKeyType} property.</p>
* @param {Number} passwordReturnKeyType
<p>New value for the property.</p>
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 5.1.0
*/
/**
* @method getPasswordKeyboardType
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-passwordKeyboardType} property.</p>
* @returns {Number}
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 5.1.0
*/
/**
* @method setPasswordKeyboardType
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-passwordKeyboardType} property.</p>
* @param {Number} passwordKeyboardType
<p>New value for the property.</p>
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 5.1.0
*/
/**
* @method getPlaceholder
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-placeholder} property.</p>
* @deprecated 5.4.0 Use <Titanium.UI.AlertDialog.hintText> instead.
* @returns {String}
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method setPlaceholder
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-placeholder} property.</p>
* @deprecated 5.4.0 Use <Titanium.UI.AlertDialog.hintText> instead.
* @param {String} placeholder
<p>New value for the property.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method getHintText
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-hintText} property.</p>
* @returns {String}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method setHintText
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-hintText} property.</p>
* @param {String} hintText
<p>New value for the property.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method getPersistent
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-persistent} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setPersistent
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-persistent} property.</p>
* @param {Boolean} persistent
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getReturnKeyType
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-returnKeyType} property.</p>
* @returns {Number}
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method setReturnKeyType
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-returnKeyType} property.</p>
* @param {Number} returnKeyType
<p>New value for the property.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-style} property.</p>
* @returns {Number}
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-style} property.</p>
* @param {Number} style
<p>New value for the property.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getButtonNames
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-buttonNames} property.</p>
* @returns {String[]}
*/
/**
* @method setButtonNames
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-buttonNames} property.</p>
* @param {Array<String>} buttonNames
<p>New value for the property.</p>
*/
/**
* @method getCancel
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-cancel} property.</p>
* @returns {Number}
*/
/**
* @method setCancel
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-cancel} property.</p>
* @param {Number} cancel
<p>New value for the property.</p>
*/
/**
* @method getMessage
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-message} property.</p>
* @returns {String}
*/
/**
* @method setMessage
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-message} property.</p>
* @param {String} message
<p>New value for the property.</p>
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getTitleid
* <p>Gets the value of the {@link Titanium.UI.AlertDialog#property-titleid} property.</p>
* @returns {String}
*/
/**
* @method setTitleid
* <p>Sets the value of the {@link Titanium.UI.AlertDialog#property-titleid} property.</p>
* @param {String} titleid
<p>New value for the property.</p>
*/
/**
* @property [accessibilityHidden=false]
* @hide
* @type Boolean
* <p>Whether the view should be "hidden" from (i.e., ignored by) the accessibility service.</p>
* <p> <b>Requires:</b>
Android 4.0 and later
iOS 5.0 and later
</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityElementsHidden</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility
Protocol</a>.
The native property is only available in iOS 5.0 and later; if
<code>accessibilityHidden</code> is specified on earlier versions of iOS, it is ignored.</p>
<p>On Android, setting <code>accessibilityHidden</code> calls the native
<a href="http://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29">View.setImportantForAccessibility</a>
method. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and
later; if this property is specified on earlier versions of Android, it is ignored.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityHint=]
* @hide
* @type String
* <p>Briefly describes what performing an action (such as a click) on the view will do.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityHint</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityValue} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityLabel=Title or label of the control.]
* @hide
* @type String
* <p>A succint label identifying the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityLabel</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityValue} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityValue=State or value of the control.]
* @hide
* @type String
* <p>A string describing the value (if any) of the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityValue</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [anchorPoint=Center of this view.]
* @hide
* @type Point
* <p>Coordinate of the view about which to pivot an animation.</p>
* @description <p>Used on iOS only. For Android, use {@link Titanium.UI.Animation#property-anchorPoint}. </p>
<p>Anchor point is specified as a fraction of the view's size. For example, <code>{0, 0}</code> is at
the view's top-left corner, <code>{0.5, 0.5}</code> at its center and <code>{1, 1}</code> at its bottom-right
corner. </p>
<p>See the "Using an anchorPoint" example in {@link Titanium.UI.Animation} for a demonstration.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property animatedCenter
* @hide
* @type Point
* @readonly
* <p>Current position of the view during an animation.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundRepeat=false]
* @hide
* @type Boolean
* <p>Determines whether to tile a background across a view.</p>
* @description <p>Setting this to <code>true</code> makes the set <code>backgroundImage</code> repeat across the view as a series
of tiles. The tiling begins in the upper-left corner, where the upper-left corner of the
background image is rendered. The image is then tiled to fill the available space of the
view.</p>
<p>Note that setting this to <code>true</code> may incur performance penalties for large views or
background images, as the tiling must be redone whenever a view is resized.</p>
<p>On iOS, the following views do not currently support tiled backgrounds:</p>
<ul>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.TextField}</li>
<li>{@link Titanium.UI.Label}</li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundLeftCap=0]
* @hide
* @type Number
* <p>Size of the left end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundTopCap=0]
* @hide
* @type Number
* <p>Size of the top end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [borderColor=Same as the normal background color of this view (Android, Mobile Web), black (iOS).]
* @hide
* @type String
* <p>Border color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [clipMode=Undefined. Behaves as if set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT}.]
* @hide
* @type Number
* <p>View's clipping behavior.</p>
* @description <p>Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_ENABLED} enforces all child views to be clipped to this views bounds.
Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_DISABLED} allows child views to be drawn outside the bounds of this view.
When set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT} or when this property is not set, clipping behavior is inferred.
See section on iOS Clipping Behavior in {@link Titanium.UI.View}.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [focusable=false]
* @hide
* @type Boolean
* <p>Whether view should be focusable while navigating with the trackball.</p>
* @platform android 0.9
*/
/**
* @property [overrideCurrentAnimation=undefined but behaves as false]
* @hide
* @type Boolean
* @creationOnly
* <p>When on, animate call overrides current animation if applicable.</p>
* @description <p>If this property is set to false, the animate call is ignored if the view is currently being animated.</p>
* @platform android 3.3.0
*/
/**
* @property [pullBackgroundColor=Undefined. Results in a light grey background color on the wrapper view.]
* @hide
* @type String
* <p>Background color of the wrapper view when this view is used as either <Titanium.UI.ListView.pullView> or {@link Titanium.UI.TableView#property-headerPullView}.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [softKeyboardOnFocus={@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}]
* @hide
* @type Number
* <p>Determines keyboard behavior when this view is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_HIDE_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_SHOW_ON_FOCUS}
</ul></p>
* @platform android 0.9
*/
/**
* @property [tintColor=]
* @hide
* @type String
* <p>The view's tintColor. This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of UIView on iOS. If no value is specified,
the tintColor of the View is inherited from its superview. </p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property [transform=Identity matrix]
* @hide
* @type Titanium.UI.2DMatrix/Titanium.UI.3DMatrix
* <p>Transformation matrix to apply to the view.</p>
* @description <p>Android and Mobile Web only support 2DMatrix transforms.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [viewShadowRadius=Undefined. Behaves as if set to 3.]
* @hide
* @type Number
* <p>Determines the blur radius used to create the shadow.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [viewShadowColor=Undefined. Behaves as if transparent.]
* @hide
* @type String
* <p>Determines the color of the shadow.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [viewShadowOffset=Undefined. Behaves as if set to (0,-3)]
* @hide
* @type Point
* <p>Determines the offset for the shadow of the view.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [horizontalWrap=true]
* @hide
* @type Boolean
* <p>Determines whether the layout has wrapping behavior.</p>
* @description <p>For more information, see the discussion of horizontal layout mode in the description of
the {@link Titanium.UI.View#property-layout layout} property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @property [keepScreenOn=false]
* @hide
* @type Boolean
* <p>Determines whether to keep the device screen on.</p>
* @description <p>When <code>true</code> the screen will not power down. Note: enabling this feature will use more
power, thereby adversely affecting run time when on battery.</p>
* @platform android 0.9
*/
/**
* @property [backgroundDisabledColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Disabled background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundDisabledImage=If `backgroundDisabledImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is disabled.
]
* @hide
* @type String
* <p>Disabled background image for the view, specified as a local file path or URL.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Focused background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>For normal views, the focused color is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedImage=If `backgroundFocusedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is focused.
]
* @hide
* @type String
* <p>Focused background image for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the focused background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundGradient=No gradient]
* @hide
* @type Gradient
* <p>A background gradient for the view.</p>
* @description <p>A gradient can be defined as either linear or radial. A linear gradient varies continuously
along a line between the <code>startPoint</code> and <code>endPoint</code>.</p>
<p>A radial gradient is interpolated between two circles, defined by <code>startPoint</code> and
<code>startRadius</code> and <code>endPoint</code> and <code>endRadius</code> respectively.</p>
<p>The start and end points and radius values can be defined in device units, in the view's
coordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center
point of the view can be specified as:</p>
<pre><code>{ x: 30, y: 30 }
</code></pre>
<p>Or:
{ x: '50%', y: '50%' }</p>
<p>When specifying multiple colors, you can specify an <em>offset</em> value for each color, defining
how far into the gradient it takes effect. For example, the following color array specifies
a gradient that goes from red to blue back to red: </p>
<pre><code>colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]
</code></pre>
<p>Mobile Web has two limitations: backfillStart and backfillEnd are ignored and the system
behaves as if they are true, and endPoint is not supported for radial gradients. </p>
<p>Android currently only supports linear gradients. It also ignores backfillStart and backfillEnd
treating them as if they are true.</p>
* <h3>Examples</h3>
<h4>Linear and Radial Gradients</h4>
<p>The following code excerpt creates two views, one with a linear gradient and one with
a radial gradient.</p>
<pre><code>var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var radialGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'radial',
startPoint: { x: 50, y: 50 },
endPoint: { x: 50, y: 50 },
colors: [ 'red', 'blue'],
startRadius: '90%',
endRadius: 0,
backfillStart: true
}
});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],
}
});
win1.add(radialGradient);
win1.add(linearGradient);
win1.open();
</code></pre>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundImage=Default behavior when `backgroundImage` is unspecified depends on the type of view and
the platform. For generic views, no image is used. For most controls (buttons, text
fields, and so on), platform-specific default images are used.
]
* @hide
* @type String
* <p>Background image for the view, specified as a local file path or URL.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedColor=Background color of this view.]
* @hide
* @type String
* <p>Selected background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p><code>focusable</code> must be true for normal views.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedImage=If `backgroundSelectedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is selected.
]
* @hide
* @type String
* <p>Selected background image url for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the selected background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [borderRadius=0]
* @hide
* @type Number
* <p>Radius for the rounded corners of the view's border.</p>
* @description <p>Each corner is rounded using an arc of a circle.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [borderWidth=0]
* @hide
* @type Number
* <p>Border width of the view.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [opacity=1.0 (opaque)]
* @hide
* @type Number
* <p>Opacity of this view, from 0.0 (transparent) to 1.0 (opaque).</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property rect
* @hide
* @type Dimension
* @readonly
* <p>The bounding box of the view relative to its parent, in system units.</p>
* @description <p>The view's bounding box is defined by its size and position. </p>
<p>The view's size is <code>rect.width</code> x <code>rect.height</code>. The view's top-left position relative to
its parent is (<code>rect.x</code> , <code>rect.y</code>). </p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property size
* @hide
* @type Dimension
* @readonly
* <p>The size of the view in system units. </p>
* @description <p>Although property returns a {@link Dimension} dictionary, only the <code>width</code> and <code>height</code>
properties are valid. The position properties--<code>x</code> and <code>y</code>--are always 0.</p>
<p>To find the position <em>and</em> size of the view, use the {@link Titanium.UI.View#property-rect rect}
property instead.</p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [touchEnabled=true]
* @hide
* @type Boolean
* <p>Determines whether view should receive touch events.</p>
* @description <p>If false, will forward the events to peers.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [visible=true]
* @hide
* @type Boolean
* <p>Determines whether the view is visible.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property zIndex
* @hide
* @type Number
* <p>Z-index stack order position, relative to other sibling views.</p>
* @description <p>A view does not have a default z-index value, meaning that it is undefined by default.
When this property is explicitly set, regardless of its value, it causes the view to be
positioned in front of any sibling that has an undefined z-index.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property children
* @hide
* @type Titanium.UI.View[]
* @readonly
* <p>Array of this view's child views.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundColor=Transparent]
* @hide
* @type String
* <p>Background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property top
* @hide
* @type Number/String
* <p>The view's top position.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property left
* @hide
* @type Number/String
* <p>View's left position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property bottom
* @hide
* @type Number/String
* <p>View's bottom position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the parent
view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or a
dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property center
* @hide
* @type Point
* <p>View's center position, in the parent view's coordinates.</p>
* @description <p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property right
* @hide
* @type Number/String
* <p>View's right position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property width
* @hide
* @type Number/String
* <p>View's width, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values: </p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</li>
</ul>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p>
<p>This is an input property for specifying the view's width dimension. To determine
the view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property height
* @hide
* @type Number/String
* <p>View height, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values:</p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li><p>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</p>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p></li>
</ul>
<p>This is an input property for specifying the view's height dimension. To determine the
view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [layout=Composite layout]
* @hide
* @type String
* <p>Specifies how the view positions its children.
One of: 'composite', 'vertical', or 'horizontal'.</p>
* @description <p>There are three layout options:</p>
<ul>
<li><p><code>composite</code> (or <code>absolute</code>). Default layout. A child view is positioned based on its
positioning properties or "pins" (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code> and <code>center</code>).
If no positioning properties are specified, the child is centered. </p>
<p>The child is always sized based on its <code>width</code> and <code>height</code> properties, if these are
specified. If the child's height or width is <em>not</em> specified explicitly, it may be
calculated implicitly from the positioning properties. For example, if both <code>left</code> and
<code>center.x</code> are specified, they can be used to calculate the width of the child control. </p>
<p>Because the size and position properties can conflict, there is a specific precedence
order for the layout properties. For vertical positioning, the precedence
order is: <code>height</code>, <code>top</code>, <code>center.y</code>, <code>bottom</code>.</p>
<p>The following table summarizes the various combinations of properties that can
be used for vertical positioning, in order from highest precedence to lowest.
(For example, if <code>height</code>, <code>center.y</code> and <code>bottom</code> are all specified, the
<code>height</code> and <code>center.y</code> values take precedence.)</p>
<table cellpadding="6px" border="1" rules="all">
<tr>
<th>Scenario</th><th>Behavior</th>
</tr>
<tr>
<td>`height` & `top` specified</td><td>Child positioned `top` unit from
parent's top, using specified `height`;
any `center.y` and `bottom` values are ignored.</td>
</tr>
<tr>
<td>`height` & `center.y` specified</td><td>Child positioned with center at
`center.y`, using specified `height`; any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`height` & `bottom` specified</td><td>Child positioned `bottom` units from
parent's bottom, using specified `height`.</td>
</tr>
<tr>
<td>`top` & `center.y` specified</td><td>Child positioned with top edge `top` units from
parent's top and center at `center.y`. Height is determined implicitly;
any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`top` & `bottom` specified</td><td>Child positioned with top edge `top` units from
parent's top and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly. </td>
</tr>
<tr>
<td>Only `top` specified</td><td>Child positioned `top` units from parent's
top, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`center.y` and `bottom` specified</td><td>Child positioned with center at
`center.y` and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly.</td>
</tr>
<tr>
<td>Only `center.y` specified</td><td>Child positioned with center at
`center.y`, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>Only `bottom` specified</td><td>Child positioned with bottom edge `bottom`
units from parent's bottom, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`height`, `top`, `center.y`, and `bottom` unspecified</td><td>Child
centered vertically in the parent and uses the default height calculation
for the child view type.</td>
</tr>
</table>
<p>Horizontal positioning works like vertical positioning, except that the
precedence is <code>width</code>, <code>left</code>, <code>center.x</code>, <code>right</code>. </p>
<p>For complete details on composite layout rules, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>
in the Titanium Mobile Guides. </p>
<ul><li><code>vertical</code>. Children are laid out vertically from top to bottom. The first child
is laid out <code>top</code> units from its parent's bounding box. Each subsequent child is
laid out below the previous child. The space between children is equal to the
upper child's <code>bottom</code> value plus the lower child's <code>top</code> value. </li></ul>
<p>Each child is positioned horizontally as in the composite layout mode. </p>
<ul><li><code>horizontal</code>. Horizontal layouts have different behavior depending on whether wrapping
is enabled. Wrapping is enabled by default (the <code>horizontalWrap</code> property is <code>true</code>).</li></ul>
<p>With wrapping behavior, the children are laid out horizontally from left to right,
<em>in rows</em>. If a child requires more horizontal space than exists in the current row,
it is wrapped to a new row. The height of each row is equal to the maximum height of
the children in that row.</p>
<p>Wrapping behavior is available on iOS, Android and Mobile Web (Release 2.1.0 and later).
When the <code>horizontalWrap</code> property is set to true, the first row is placed at the top of the
parent view, and successive rows are placed below the first row. Each child is
positioned vertically <em>within its row</em> somewhat like composite layout mode.
In particular: </p>
<ul><li>If neither <code>top</code> or <code>bottom</code> is specified, the child is centered in the
row.</li>
<li>If either <code>top</code> or <code>bottom</code> is specified, the child is aligned to either
the top or bottom of the row, with the specified amount of padding.</li>
<li>If <em>both</em> <code>top</code> and <code>bottom</code> is specified for a given child, the properties
are both treated as padding.</li></ul>
<p>If the <code>horizontalWrap</code> property is false, the behavior is more equivalent to a vertical layout.
Children are laid or horizontally from left to right in a single row. The <code>left</code> and
<code>right</code> properties are used as padding between the children, and the <code>top</code> and <code>bottom</code>
properties are used to position the children vertically.</p>
<p>On Mobile Web <em>prior to</em> Release 2.1.0, the horizontal layout does not wrap by default,
and does not support the <code>horizontalWrap</code> property. On Android and iOS <em>prior to</em> Release
2.1.0, the horizontal layout always wraps and the <code>horizontalWrap</code> property is not supported.</p></li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property androidView
* @type Titanium.UI.View
* <p>View to load inside the message area, to create a custom layout.</p>
* @description <p>In an Alloy application you can specify this property with either an <code><AndroidView/></code> or
<code><View/></code> element inside the <code><AlertDialog/></code> element, for example:</p>
<pre><code><Alloy>
<AlertDialog onClick="doClick" title="Delete"
message="Would you like to delete the file?" cancel="1">
<!-- Add View or AndroidView for the androidView property -->
<View platform="android">
<Label color="red" text="Warning! This change is permanent and you cannot undo it!" />
</View>
<ButtonNames>
<ButtonName>Confirm</ButtonName>
<ButtonName>Cancel</ButtonName>
</ButtonNames>
</AlertDialog>
</Alloy>
</code></pre>
* @platform android 0.8
*/
/**
* @property [canceledOnTouchOutside=true on Android]
* @type Boolean
* <p>When this is set to <code>true</code>, the dialog is canceled when touched outside the window's bounds.</p>
* @platform android 6.0.0
*/
/**
* @property [destructive=-1]
* @type Number
* <p>Index to define the destructive button.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Note that this property is only available on iOS 8 or above. Setting to -1 disables this option.</p>
* @platform iphone 3.5.0
* @platform ipad 3.5.0
*/
/**
* @property [preferred=-1]
* @type Number
* <p>Index to define the preferred button.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>When you specify a preferred action, the alert dialog highlights the text of that
action to give it emphasis. (If the alert also contains a cancel button, the preferred
action receives the highlighting instead of the cancel button.) If the iOS device is
connected to a physical keyboard, pressing the Return key triggers the preferred action.</p>
<p>Note that this property is only available on iOS 9 or above.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property [keyboardType={@link Titanium.UI#property-KEYBOARD_TYPE_DEFAULT}]
* @type Number
* <p>Keyboard type to display when this text field inside the dialog is focused.</p>
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-PLAIN_TEXT_INPUT} or
{@link Titanium.UI.iOS.AlertDialogStyle#property-SECURE_TEXT_INPUT}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_DECIMAL_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_ASCII}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_EMAIL}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NAMEPHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBERS_PUNCTUATION}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBER_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_PHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_WEBSEARCH}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_TWITTER}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_URL}
</ul></p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property [keyboardAppearance={@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}]
* @type Number
* <p>Keyboard appearance to be displayed when the text field inside the dialog is focused.</p>
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-PLAIN_TEXT_INPUT} or
{@link Titanium.UI.iOS.AlertDialogStyle#property-SECURE_TEXT_INPUT}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_ALERT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DARK}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_LIGHT}
</ul></p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property loginPlaceholder
* @type String
* <p>Placeholder of the login text field inside the dialog.</p>
* @deprecated 5.4.0 Use <Titanium.UI.AlertDialog.loginHintText> instead.
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-LOGIN_AND_PASSWORD_INPUT}.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property loginHintText
* @type String
* <p>Hint text of the login text field inside the dialog.</p>
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-LOGIN_AND_PASSWORD_INPUT}.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property [loginReturnKeyType={@link Titanium.UI#property-RETURNKEY_NEXT}]
* @type Number
* <p>Specifies the text to display on the keyboard <code>Return</code> key when this field is focused.</p>
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-LOGIN_AND_PASSWORD_INPUT}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-RETURNKEY_CONTINUE}
<li> {@link Titanium.UI#property-RETURNKEY_DEFAULT}
<li> {@link Titanium.UI#property-RETURNKEY_DONE}
<li> {@link Titanium.UI#property-RETURNKEY_EMERGENCY_CALL}
<li> {@link Titanium.UI#property-RETURNKEY_GO}
<li> {@link Titanium.UI#property-RETURNKEY_GOOGLE}
<li> {@link Titanium.UI#property-RETURNKEY_JOIN}
<li> {@link Titanium.UI#property-RETURNKEY_NEXT}
<li> {@link Titanium.UI#property-RETURNKEY_ROUTE}
<li> {@link Titanium.UI#property-RETURNKEY_SEARCH}
<li> {@link Titanium.UI#property-RETURNKEY_SEND}
<li> {@link Titanium.UI#property-RETURNKEY_YAHOO}
</ul></p>
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 5.1.0
*/
/**
* @property [loginKeyboardType={@link Titanium.UI#property-KEYBOARD_DEFAULT}]
* @type Number
* <p>Keyboard type to display when this text field inside the dialog is focused.</p>
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-LOGIN_AND_PASSWORD_INPUT}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_ALERT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DARK}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_LIGHT}
<li> {@link Titanium.UI#property-KEYBOARD_ASCII}
<li> {@link Titanium.UI#property-KEYBOARD_DECIMAL_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_EMAIL}
<li> {@link Titanium.UI#property-KEYBOARD_NAMEPHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_NUMBERS_PUNCTUATION}
<li> {@link Titanium.UI#property-KEYBOARD_NUMBER_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_PHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_URL}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_DECIMAL_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_ASCII}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_EMAIL}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NAMEPHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBERS_PUNCTUATION}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBER_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_PHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_WEBSEARCH}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_TWITTER}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_URL}
</ul></p>
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 5.1.0
*/
/**
* @property messageid
* @type String
* <p>Key identifying a string in the locale file to use for the message text.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property ok
* @type String
* <p>Text for the <code>OK</code> button.</p>
* @description <p>This property is useful when only one button is required, as it negates the need to define
the <code>buttonNames</code> property. If <code>buttonNames</code> is defined, this property is ignored.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property okid
* @type String
* <p>Key identifying a string in the locale file to use for the <code>ok</code> text.</p>
* @description <p>If <code>buttonNames</code> is defined, this property is ignored.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property passwordPlaceholder
* @type String
* <p>Placeholder of the password text field inside the dialog.</p>
* @deprecated 5.4.0 Use <Titanium.UI.AlertDialog.passwordHintText> instead.
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-LOGIN_AND_PASSWORD_INPUT}.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property passwordHintText
* @type String
* <p>Hint text of the password text field inside the dialog.</p>
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-LOGIN_AND_PASSWORD_INPUT}.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property [passwordReturnKeyType={@link Titanium.UI#property-RETURNKEY_DONE}]
* @type Number
* <p>Specifies the text to display on the keyboard <code>Return</code> key when this field is focused.</p>
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-LOGIN_AND_PASSWORD_INPUT}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-RETURNKEY_CONTINUE}
<li> {@link Titanium.UI#property-RETURNKEY_DEFAULT}
<li> {@link Titanium.UI#property-RETURNKEY_DONE}
<li> {@link Titanium.UI#property-RETURNKEY_EMERGENCY_CALL}
<li> {@link Titanium.UI#property-RETURNKEY_GO}
<li> {@link Titanium.UI#property-RETURNKEY_GOOGLE}
<li> {@link Titanium.UI#property-RETURNKEY_JOIN}
<li> {@link Titanium.UI#property-RETURNKEY_NEXT}
<li> {@link Titanium.UI#property-RETURNKEY_ROUTE}
<li> {@link Titanium.UI#property-RETURNKEY_SEARCH}
<li> {@link Titanium.UI#property-RETURNKEY_SEND}
<li> {@link Titanium.UI#property-RETURNKEY_YAHOO}
</ul></p>
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 5.1.0
*/
/**
* @property [passwordKeyboardType={@link Titanium.UI#property-KEYBOARD_DEFAULT}]
* @type Number
* <p>Keyboard type to display when this text field inside the dialog is focused.</p>
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-LOGIN_AND_PASSWORD_INPUT}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_ALERT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DARK}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_LIGHT}
<li> {@link Titanium.UI#property-KEYBOARD_ASCII}
<li> {@link Titanium.UI#property-KEYBOARD_DECIMAL_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_EMAIL}
<li> {@link Titanium.UI#property-KEYBOARD_NAMEPHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_NUMBERS_PUNCTUATION}
<li> {@link Titanium.UI#property-KEYBOARD_NUMBER_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_PHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_URL}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_DECIMAL_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_ASCII}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_EMAIL}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NAMEPHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBERS_PUNCTUATION}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBER_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_PHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_WEBSEARCH}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_TWITTER}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_URL}
</ul></p>
* @platform android 5.1.0
* @platform iphone 5.1.0
* @platform ipad 5.1.0
* @platform mobileweb 5.1.0
*/
/**
* @property placeholder
* @type String
* <p>Placeholder of the text field inside the dialog.</p>
* @deprecated 5.4.0 Use <Titanium.UI.AlertDialog.hintText> instead.
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-PLAIN_TEXT_INPUT} or
{@link Titanium.UI.iOS.AlertDialogStyle#property-SECURE_TEXT_INPUT}.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property hintText
* @type String
* <p>Hint text of the text field inside the dialog.</p>
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-PLAIN_TEXT_INPUT} or
{@link Titanium.UI.iOS.AlertDialogStyle#property-SECURE_TEXT_INPUT}.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property [persistent=false on iOS, true on Android]
* @type Boolean
* <p>Boolean value indicating if the alert dialog should only be cancelled by user gesture or by hide method.</p>
* @description <p>This property is useful to ensure that the alert dialog will not be ignored
by the user when the application is paused/suspended.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [returnKeyType={@link Titanium.UI#property-RETURNKEY_DEFAULT}]
* @type Number
* <p>Specifies the text to display on the keyboard <code>Return</code> key when this field is focused.</p>
* @description <p>Note that this property is only available if dialog <code>style</code> property is defined as
{@link Titanium.UI.iOS.AlertDialogStyle#property-PLAIN_TEXT_INPUT} or
{@link Titanium.UI.iOS.AlertDialogStyle#property-SECURE_TEXT_INPUT}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-RETURNKEY_CONTINUE}
<li> {@link Titanium.UI#property-RETURNKEY_DEFAULT}
<li> {@link Titanium.UI#property-RETURNKEY_DONE}
<li> {@link Titanium.UI#property-RETURNKEY_EMERGENCY_CALL}
<li> {@link Titanium.UI#property-RETURNKEY_GO}
<li> {@link Titanium.UI#property-RETURNKEY_GOOGLE}
<li> {@link Titanium.UI#property-RETURNKEY_JOIN}
<li> {@link Titanium.UI#property-RETURNKEY_NEXT}
<li> {@link Titanium.UI#property-RETURNKEY_ROUTE}
<li> {@link Titanium.UI#property-RETURNKEY_SEARCH}
<li> {@link Titanium.UI#property-RETURNKEY_SEND}
<li> {@link Titanium.UI#property-RETURNKEY_YAHOO}
</ul></p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property [style={@link Titanium.UI.iOS.AlertDialogStyle#property-DEFAULT}]
* @type Number
* <p>The style for the alert dialog.</p>
* @description <p>Style of the alert dialog, specified using one of the constants from
{@link Titanium.UI.iOS.AlertDialogStyle}. Using styles other than default one can break
your dialog layout if more than two buttons used. All styles can handle up to two
buttons comfortably, except for default style can handle up to six buttons when <code>title</code>
and <code>message</code> is empty or not given. Note that this property is only available on
iOS SDK 5 or above.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [buttonNames=No buttons (Android), Single "OK" button (iOS, Mobile Web)]
* @type String[]
* @creationOnly
* <p>Name of each button to create.</p>
* @description <p>On iOS, a button will automatically be created if none are explicitly defined, because
without it users would be unable to dismiss the dialog. Conversely, a dialog with no
buttons may be created on Android, as the hardware <code>back</code> button may be used instead.</p>
<p>A maximum of 3 buttons is supported on Android.</p>
<p>Alloy applications can specify this property with a <code><ButtonNames></code> element containing
one or more <code><ButtonName></code> elements (see example).</p>
<pre><code><Alloy>
<AlertDialog id="dialog" onClick="doClick" title="Decide!" message="Do you really want to do that?" cancel="1">
<ButtonNames>
<ButtonName>Confirm</ButtonName>
<ButtonName>Cancel</ButtonName>
<ButtonName>Help</ButtonName>
</ButtonNames>
</AlertDialog>
</Alloy>
</code></pre>
*/
/**
* @property [cancel=undefined (Android), -1 (iOS, Mobile Web)]
* @type Number
* <p>Index to define the cancel button.</p>
* @description <p>On iOS and Mobile Web, set to <code>-1</code> to disable the cancel option.</p>
*/
/**
* @property message
* @type String
* <p>Dialog message.</p>
*/
/**
* @property title
* @type String
* <p>Title of the dialog.</p>
* @description <p>If not set, a dialog with no title bar will be created.</p>
*/
/**
* @property titleid
* @type String
* <p>Key identifying a string in the locale file to use for the title text.</p>
*/
/**
* @class Titanium.UI.Android
* @platform android 1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Android/Android.yml
* <p>The Android-specific UI capabilities. All properties, methods and events in this namespace will
only work on Android systems.</p>
* <h3>Examples</h3>
<h4>Android Preferences Example</h4>
<p>Create preferences interface for the application.</p>
<h4><code>app.js</code></h4>
<pre><code>var button = Ti.UI.createButton({
title: 'Click to Open Preferences'
});
button.addEventListener('click', function() {
Ti.API.info('Current value for editText: ' + Ti.App.Properties.getString('editText'));
Ti.UI.Android.openPreferences();
});
Ti.UI.currentWindow.add(button);
</code></pre>
<h4><code>platform/android/res/xml/preferences.xml</code></h4>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="Preferences">
<PreferenceScreen
android:title="Misc. Preferences"
android:summary="Click to see more options">
<EditTextPreference
android:title="Edit Text Preference"
android:summary="You may enter a string"
android:defaultValue=""
android:key="editText" />
</PreferenceScreen>
<PreferenceCategory android:title="Category One">
<CheckBoxPreference
android:title="CheckBox Preference"
android:defaultValue="false"
android:summary="You may enter a boolean"
android:key="checkbox" />
<RingtonePreference
android:title="Ringtone Preference"
android:summary="You may pick a ringtone"
android:defaultValue=""
android:key="ringtone" />
</PreferenceCategory>
<PreferenceCategory android:title="Category Two">
<ListPreference
android:title="List Preference"
android:summary="You may chose from multiple choices"
android:key="list"
android:entries="@array/listNames"
android:entryValues="@array/listValues"
/>
</PreferenceCategory>
</PreferenceScreen>
</code></pre>
<h4><code>platform/android/res/values/array/array.xml</code></h4>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="listNames">
<item>5 Minutes</item>
<item>10 Minutes</item>
<item>15 Minutes</item>
<item>30 Minutes</item>
<item>60 Minutes</item>
</string-array>
<string-array name="listValues">
<item>5</item>
<item>10</item>
<item>15</item>
<item>30</item>
<item>60</item>
</string-array>
</resources>
</code></pre>
*/
/**
* @method hideSoftKeyboard
* <p>Hides the soft keyboard.</p>
* @description <p>Be aware that it is not currently possible in the native Android API to detect that the
keyboard is already visible or to globally show the keyboard.</p>
*/
/**
* @method openPreferences
* <p>Opens an application preferences dialog, using the native Android system settings interface,
defined by the platform-specific <code>preferences.xml</code> and <code>array.xml</code> files.</p>
* @description <p>The preferences configuration files must be created in the project folders,
<code>platform/android/res/xml/preferences.xml</code> and <code>platform/android/res/values/array/array.xml</code>.</p>
<p>The preferences values can be accessed via {@link Titanium.App.Properties}.</p>
<p>See the example for a demonstration, and the official Android Developer documentation for
the <a href="http://developer.android.com/guide/topics/ui/settings.html#DefiningPrefs">preferences.xml</a>
format.</p>
*/
/**
* @method createCardView
* <p>Creates and returns an instance of {@link Titanium.UI.Android.CardView}.</p>
* @param {Dictionary<Titanium.UI.Android.CardView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Android.CardView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Android.CardView}
* @platform android 5.1.0
*/
/**
* @method createProgressIndicator
* <p>Creates and returns an instance of {@link Titanium.UI.Android.ProgressIndicator}.</p>
* @param {Dictionary<Titanium.UI.Android.ProgressIndicator>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Android.ProgressIndicator} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Android.ProgressIndicator}
* @platform android 3.0.0
*/
/**
* @method createSearchView
* <p>Creates and returns an instance of {@link Titanium.UI.Android.SearchView}.</p>
* @param {Dictionary<Titanium.UI.Android.SearchView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Android.SearchView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Android.SearchView}
* @platform android 3.0.2
*/
/**
* @property GRAVITY_AXIS_CLIP
* @type Number
* @readonly
* <p>Raw bit controlling whether the right/bottom edge is clipped to its container, based on the gravity direction being applied.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_AXIS_PULL_AFTER
* @type Number
* @readonly
* <p>Raw bit controlling how the right/bottom edge is placed.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_AXIS_PULL_BEFORE
* @type Number
* @readonly
* <p>Raw bit controlling how the left/top edge is placed.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_AXIS_SPECIFIED
* @type Number
* @readonly
* <p>Raw bit indicating the gravity for an axis has been specified.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_AXIS_X_SHIFT
* @type Number
* @readonly
* <p>Bits defining the horizontal axis.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_AXIS_Y_SHIFT
* @type Number
* @readonly
* <p>Bits defining the vertical axis.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_BOTTOM
* @type Number
* @readonly
* <p>Push object to the bottom of its container, not changing its size.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_CENTER
* @type Number
* @readonly
* <p>Place the object in the center of its container in both the vertical and horizontal axis, not changing its size.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_CENTER_HORIZONTAL
* @type Number
* @readonly
* <p>Place object in the horizontal center of its container, not changing its size.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_CENTER_VERTICAL
* @type Number
* @readonly
* <p>Place object in the vertical center of its container, not changing its size.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_CLIP_HORIZONTAL
* @type Number
* @readonly
* <p>Flag to clip the edges of the object to its container along the horizontal axis.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_CLIP_VERTICAL
* @type Number
* @readonly
* <p>Flag to clip the edges of the object to its container along the vertical axis.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_DISPLAY_CLIP_HORIZONTAL
* @type Number
* @readonly
* <p>Special constant to enable clipping to an overall display along the horizontal dimension.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_DISPLAY_CLIP_VERTICAL
* @type Number
* @readonly
* <p>Special constant to enable clipping to an overall display along the vertical dimension.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_END
* @type Number
* @readonly
* <p>Push object to x-axis position at the end of its container, not changing its size.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_FILL
* @type Number
* @readonly
* <p>Grow the horizontal and vertical size of the object if needed so it completely fills its container.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_FILL_HORIZONTAL
* @type Number
* @readonly
* <p>Grow the horizontal size of the object if needed so it completely fills its container.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_FILL_VERTICAL
* @type Number
* @readonly
* <p>Grow the vertical size of the object if needed so it completely fills its container.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_HORIZONTAL_GRAVITY_MASK
* @type Number
* @readonly
* <p>Binary mask to get the absolute horizontal gravity of a gravity.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_LEFT
* @type Number
* @readonly
* <p>Push object to the left of its container, not changing its size.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_NO_GRAVITY
* @type Number
* @readonly
* <p>Constant indicating that no gravity has been set</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_RELATIVE_HORIZONTAL_GRAVITY_MASK
* @type Number
* @readonly
* <p>Binary mask for the horizontal gravity and script specific direction bit.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_RELATIVE_LAYOUT_DIRECTION
* @type Number
* @readonly
* <p>Raw bit controlling whether the layout direction is relative or not (GRAVITY_START/GRAVITY_END instead of absolute GRAVITY_LEFT/GRAVITY_RIGHT).</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_RIGHT
* @type Number
* @readonly
* <p>Push object to the right of its container, not changing its size.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_START
* @type Number
* @readonly
* <p>Push object to x-axis position at the start of its container, not changing its size.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_TOP
* @type Number
* @readonly
* <p>Push object to the top of its container, not changing its size.</p>
* @platform android 5.4.0
*/
/**
* @property GRAVITY_VERTICAL_GRAVITY_MASK
* @type Number
* @readonly
* <p>Binary mask to get the vertical gravity of a gravity.</p>
* @platform android 5.4.0
*/
/**
* @property LINKIFY_ALL
* @type Number
* @readonly
* <p>Converts all detectable types of data into clickable links.</p>
* @deprecated 3.0.0 Use <Titanium.UI.AUTOLINK_ALL> instead.
*/
/**
* @property LINKIFY_EMAIL_ADDRESSES
* @type Number
* @readonly
* <p>Converts strings formatted as email addresses into clickable links.</p>
* @deprecated 3.0.0 Use <Titanium.UI.AUTOLINK_EMAIL_ADDRESSES> instead.
*/
/**
* @property LINKIFY_MAP_ADDRESSES
* @type Number
* @readonly
* <p>Converts strings formatted as addresses into clickable links.</p>
* @deprecated 3.0.0 Use <Titanium.UI.AUTOLINK_MAP_ADDRESSES> instead.
*/
/**
* @property LINKIFY_PHONE_NUMBERS
* @type Number
* @readonly
* <p>Converts strings formatted as phone numbers into clickable links.</p>
* @deprecated 3.0.0 Use <Titanium.UI.AUTOLINK_PHONE_NUMBERS> instead.
*/
/**
* @property LINKIFY_WEB_URLS
* @type Number
* @readonly
* <p>Converts strings formatted as URLs into clickable links.</p>
* @deprecated 3.0.0 Use <Titanium.UI.AUTOLINK_URLS> instead.
*/
/**
* @property OVER_SCROLL_ALWAYS
* @type Number
* @readonly
* <p>Always allow a user to over-scroll this view, provided it is a view that can scroll.</p>
* @description <p>Use this with the following properties - {@link Titanium.UI.ScrollableView#property-overScrollMode}, {@link Titanium.UI.ScrollView#property-overScrollMode},
{@link Titanium.UI.TableView#property-overScrollMode} and {@link Titanium.UI.WebView#property-overScrollMode}. </p>
<p>Only applicable when {@link Titanium.Platform.Android#property-API_LEVEL} is 9 or above.</p>
* @platform android 3.1.0
*/
/**
* @property OVER_SCROLL_IF_CONTENT_SCROLLS
* @type Number
* @readonly
* <p>Allow a user to over-scroll this view only if the content is large enough to meaningfully scroll, provided it is a view that can scroll.</p>
* @description <p>Use this with the following properties - {@link Titanium.UI.ScrollableView#property-overScrollMode}, {@link Titanium.UI.ScrollView#property-overScrollMode},
{@link Titanium.UI.TableView#property-overScrollMode} and {@link Titanium.UI.WebView#property-overScrollMode}. </p>
<p>Only applicable when {@link Titanium.Platform.Android#property-API_LEVEL} is 9 or above.</p>
* @platform android 3.1.0
*/
/**
* @property OVER_SCROLL_NEVER
* @type Number
* @readonly
* <p>Never allow a user to over-scroll this view.</p>
* @description <p>Use this with the following properties - {@link Titanium.UI.ScrollableView#property-overScrollMode}, {@link Titanium.UI.ScrollView#property-overScrollMode},
{@link Titanium.UI.TableView#property-overScrollMode} and {@link Titanium.UI.WebView#property-overScrollMode}. </p>
<p>Only applicable when {@link Titanium.Platform.Android#property-API_LEVEL} is 9 or above.</p>
* @platform android 3.1.0
*/
/**
* @property PIXEL_FORMAT_A_8
* @type Number
* @readonly
* <p>Android A_8 pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_LA_88
* @type Number
* @readonly
* <p>Android LA_88 pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_L_8
* @type Number
* @readonly
* <p>Android L_8 pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_OPAQUE
* @type Number
* @readonly
* <p>Android OPAQUE pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_RGBA_4444
* @type Number
* @readonly
* <p>Android RGBA_4444 pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_RGBA_5551
* @type Number
* @readonly
* <p>Android RGBA_5551 pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_RGBA_8888
* @type Number
* @readonly
* <p>Android RGBA_8888 pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_RGBX_8888
* @type Number
* @readonly
* <p>Android RGBX_8888 pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_RGB_332
* @type Number
* @readonly
* <p>Android RGB_332 pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_RGB_565
* @type Number
* @readonly
* <p>Android RGB_565 pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_RGB_888
* @type Number
* @readonly
* <p>Android RGB_888 pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_TRANSLUCENT
* @type Number
* @readonly
* <p>Android TRANSLUCENT pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_TRANSPARENT
* @type Number
* @readonly
* <p>Android A_8 pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format can
improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PIXEL_FORMAT_UNKNOWN
* @type Number
* @readonly
* <p>Android UNKNOWN pixel format for {@link Titanium.UI.Window}. Selecting the correct pixel format
can improve image clarity and performance.</p>
* @description <p>See the Android Developer website for official documentation about the
<a href="http://developer.android.com/reference/android/graphics/PixelFormat.html">PixelFormat</a>
constants.</p>
* @platform android 1.8.0
*/
/**
* @property PROGRESS_INDICATOR_DIALOG
* @type Number
* @readonly
* <p>Display {@link Titanium.UI.Android.ProgressIndicator} as a modal dialog. (default)</p>
* @description <p>Used with the {@link Titanium.UI.Android.ProgressIndicator#property-location} property.</p>
* @platform android 3.0.0
*/
/**
* @property PROGRESS_INDICATOR_STATUS_BAR
* @type Number
* @readonly
* <p>Display {@link Titanium.UI.Android.ProgressIndicator} as a horizontal progress bar in the title of
the window.</p>
* @description <p>Used with the {@link Titanium.UI.Android.ProgressIndicator#property-location} property.</p>
* @platform android 3.0.0
*/
/**
* @property PROGRESS_INDICATOR_INDETERMINANT
* @type Number
* @readonly
* <p>Used with the {@link Titanium.UI.Android.ProgressIndicator#property-type} property to indicate an ongoing
activity of indeterminate length. (default)</p>
* @platform android 3.0.0
*/
/**
* @property PROGRESS_INDICATOR_DETERMINANT
* @type Number
* @readonly
* <p>Used with the {@link Titanium.UI.Android.ProgressIndicator#property-type} property to indicate an ongoing
activity of determinate length.</p>
* @platform android 3.0.0
*/
/**
* @property SOFT_INPUT_ADJUST_PAN
* @type Number
* @readonly
* @creationOnly
* <p>Pan the current heavyweight window when the input method (ie software keyboard) is shown, to
ensure that its contents are not obscured.</p>
* @description <p>Used with the {@link Titanium.UI.Window#property-windowSoftInputMode} property.</p>
<p>One of the group of soft input adjustment constants,
{@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_UNSPECIFIED SOFT_INPUT_ADJUST_UNSPECIFIED},
{@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_RESIZE SOFT_INPUT_ADJUST_RESIZE},
and {@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_PAN SOFT_INPUT_ADJUST_PAN}.</p>
*/
/**
* @property SOFT_INPUT_ADJUST_RESIZE
* @type Number
* @readonly
* @creationOnly
* <p>Resize the current heavyweight window when the input method (ie software keyboard) is shown,
to ensure that its contents are not obscured.</p>
* @description <p>Used with the {@link Titanium.UI.Window#property-windowSoftInputMode} property.</p>
<p>One of the group of soft input adjustment constants,
{@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_UNSPECIFIED SOFT_INPUT_ADJUST_UNSPECIFIED},
{@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_RESIZE SOFT_INPUT_ADJUST_RESIZE},
and {@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_PAN SOFT_INPUT_ADJUST_PAN}.</p>
*/
/**
* @property SOFT_INPUT_ADJUST_UNSPECIFIED
* @type Number
* @readonly
* @creationOnly
* <p>Use the system-default behavior to determine how the soft input area (ie software keyboard)
is accomodated by the current heavyweight window when it receives focus (default.)</p>
* @description <p>Depends on the <code>AndroidManifest.xml</code> setting if defined or system-default otherwise to
determine how to accomodate the soft keyboard when visible.</p>
<p>Used with the {@link Titanium.UI.Window#property-windowSoftInputMode} property.</p>
<p>One of the group of soft input adjustment constants,
{@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_UNSPECIFIED SOFT_INPUT_ADJUST_UNSPECIFIED},
{@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_RESIZE SOFT_INPUT_ADJUST_RESIZE},
and {@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_PAN SOFT_INPUT_ADJUST_PAN}.</p>
*/
/**
* @property SOFT_INPUT_STATE_ALWAYS_HIDDEN
* @type Number
* @readonly
* <p>Always hide the soft input area (ie software keyboard) when the current heavyweight window
receives focus.</p>
* @description <p>Note that the unresolved bug <a href="https://code.google.com/p/android/issues/detail?id=7115">#7115</a>
on the Official Android Project website affects this functionality.</p>
<p>Used with the {@link Titanium.UI.Window#property-windowSoftInputMode} property.</p>
<p>One of the group of soft input visibility constants,
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_ALWAYS_HIDDEN SOFT_INPUT_STATE_ALWAYS_HIDDEN},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_ALWAYS_VISIBLE SOFT_INPUT_STATE_ALWAYS_VISIBLE},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_HIDDEN SOFT_INPUT_STATE_HIDDEN},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_UNSPECIFIED SOFT_INPUT_STATE_UNSPECIFIED},
and {@link Titanium.UI.Android#property-SOFT_INPUT_STATE_VISIBLE SOFT_INPUT_STATE_VISIBLE}.</p>
*/
/**
* @property SOFT_INPUT_STATE_ALWAYS_VISIBLE
* @type Number
* @readonly
* <p>Always show the soft input area (ie software keyboard) when the current heavyweight window
receives focus.</p>
* @description <p>Used with the {@link Titanium.UI.Window#property-windowSoftInputMode} property.</p>
<p>This constant is one of the group of soft input visibility constants,
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_ALWAYS_HIDDEN SOFT_INPUT_STATE_ALWAYS_HIDDEN},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_ALWAYS_VISIBLE SOFT_INPUT_STATE_ALWAYS_VISIBLE},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_HIDDEN SOFT_INPUT_STATE_HIDDEN},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_UNSPECIFIED SOFT_INPUT_STATE_UNSPECIFIED},
and {@link Titanium.UI.Android#property-SOFT_INPUT_STATE_VISIBLE SOFT_INPUT_STATE_VISIBLE}.</p>
*/
/**
* @property SOFT_INPUT_STATE_HIDDEN
* @type Number
* @readonly
* <p>Attempt to hide the soft input area (ie software keyboard) when the current heavyweight
window receives focus.</p>
* @description <p>Used with the {@link Titanium.UI.Window#property-windowSoftInputMode} property.</p>
<p>This constant is one of the group of soft input visibility constants,
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_ALWAYS_HIDDEN SOFT_INPUT_STATE_ALWAYS_HIDDEN},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_ALWAYS_VISIBLE SOFT_INPUT_STATE_ALWAYS_VISIBLE},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_HIDDEN SOFT_INPUT_STATE_HIDDEN},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_UNSPECIFIED SOFT_INPUT_STATE_UNSPECIFIED},
and {@link Titanium.UI.Android#property-SOFT_INPUT_STATE_VISIBLE SOFT_INPUT_STATE_VISIBLE}.</p>
*/
/**
* @property SOFT_INPUT_STATE_UNSPECIFIED
* @type Number
* @readonly
* <p>Use the system-default behavior to determine whether to show the soft input area
(ie software keyboard) when the current heavyweight window receives focus.</p>
* @description <p>Used with the {@link Titanium.UI.Window#property-windowSoftInputMode} property.</p>
<p>This constant is one of the group of soft input visibility constants,
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_ALWAYS_HIDDEN SOFT_INPUT_STATE_ALWAYS_HIDDEN},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_ALWAYS_VISIBLE SOFT_INPUT_STATE_ALWAYS_VISIBLE},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_HIDDEN SOFT_INPUT_STATE_HIDDEN},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_UNSPECIFIED SOFT_INPUT_STATE_UNSPECIFIED},
and {@link Titanium.UI.Android#property-SOFT_INPUT_STATE_VISIBLE SOFT_INPUT_STATE_VISIBLE}.</p>
*/
/**
* @property SOFT_INPUT_STATE_VISIBLE
* @type Number
* @readonly
* <p>Attempt to show the soft input area (ie software keyboard) when the current heavyweight
window receives focus.</p>
* @description <p>Used with the {@link Titanium.UI.Window#property-windowSoftInputMode} property.</p>
<p>This constant is one of the group of soft input visibility constants,
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_ALWAYS_HIDDEN SOFT_INPUT_STATE_ALWAYS_HIDDEN},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_ALWAYS_VISIBLE SOFT_INPUT_STATE_ALWAYS_VISIBLE},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_HIDDEN SOFT_INPUT_STATE_HIDDEN},
{@link Titanium.UI.Android#property-SOFT_INPUT_STATE_UNSPECIFIED SOFT_INPUT_STATE_UNSPECIFIED},
and {@link Titanium.UI.Android#property-SOFT_INPUT_STATE_VISIBLE SOFT_INPUT_STATE_VISIBLE}.</p>
*/
/**
* @property SOFT_KEYBOARD_DEFAULT_ON_FOCUS
* @type Number
* @readonly
* <p>Use Android default behavior to handle keyboard visibility when a view receives focus.
(default)</p>
*/
/**
* @property SOFT_KEYBOARD_HIDE_ON_FOCUS
* @type Number
* @readonly
* <p>Attempt to hide the soft keyboard when a view receives focus. Note: system can override
request.</p>
*/
/**
* @property SOFT_KEYBOARD_SHOW_ON_FOCUS
* @type Number
* @readonly
* <p>Attempt to show the soft keyboard when a view receives focus. Note: system can override
request.</p>
*/
/**
* @property SWITCH_STYLE_CHECKBOX
* @type Number
* @readonly
* <p>Display a checkbox.</p>
* @description <p>Use with the {@link Titanium.UI.Switch#property-style} property.</p>
*/
/**
* @property SWITCH_STYLE_TOGGLEBUTTON
* @type Number
* @readonly
* <p>Display a toggle button.</p>
* @description <p>Use with the {@link Titanium.UI.Switch#property-style} property.</p>
*/
/**
* @property SWITCH_STYLE_SWITCH
* @type Number
* @readonly
* <p>Display a switch.</p>
* @description <p>Use with the {@link Titanium.UI.Switch#property-style} property.</p>
<p>Due to <a href="https://code.google.com/p/android/issues/detail?id=78262">Android issue #78262</a>,
the thumb (circle icon) may not appear on the switch.</p>
* @platform android 4.0.0
*/
/**
* @property WEBVIEW_PLUGINS_OFF
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.WebView#property-pluginState WebView.pluginState} to disable plugins in a web view.</p>
* @description <p>Content that requires a plugin, such as Flash Player, is not loaded, and any
alternative content is displayed instead.</p>
*/
/**
* @property WEBVIEW_PLUGINS_ON
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.WebView#property-pluginState WebView.pluginState} to enable plugins in a web view.</p>
* @description <p>Content that requires a plugin, such as Flash Player, is always loaded, whether or not a plugin is
available for the content.</p>
*/
/**
* @property WEBVIEW_PLUGINS_ON_DEMAND
* @type Number
* @readonly
* <p>Display a placeholder and only load plugins when user selects it.</p>
* @description <p>Content that requires a plugin, such as Flash Player, is replaced by a placeholder. When
the user clicks on the placeholder, the plugin is loaded and the content is displayed.</p>
<p>Use with {@link Titanium.UI.WebView#property-pluginState WebView.pluginState} to load plugins on demand.</p>
*/
/**
* @property WEBVIEW_LOAD_DEFAULT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.WebView#property-cacheMode WebView.cacheMode} to override how the cache is used in a web view.</p>
* @description <p>This is the default cache usage mode.</p>
* @platform android 3.2.0
*/
/**
* @property WEBVIEW_LOAD_NO_CACHE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.WebView#property-cacheMode WebView.cacheMode} to override how the cache is used in a web view.</p>
* @description <p>Don't use cache, load from the network.</p>
* @platform android 3.2.0
*/
/**
* @property WEBVIEW_LOAD_CACHE_ONLY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.WebView#property-cacheMode WebView.cacheMode} to override how the cache is used in a web view.</p>
* @description <p>Don't use network, load from the cache only.</p>
* @platform android 3.2.0
*/
/**
* @property WEBVIEW_LOAD_CACHE_ELSE_NETWORK
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.WebView#property-cacheMode WebView.cacheMode} to override how the cache is used in a web view.</p>
* @description <p>Use cached resources when they're available, even when they're expired. Otherwise load resources via network.</p>
* @platform android 3.2.0
*/
/**
* @property TRANSITION_EXPLODE
* @type Number
* @readonly
* <p>Moves views in or out from the edges of the scene. </p>
* @description <p>Use this only for activity transition.
Refers to <a href="http://developer.android.com/reference/android/transition/Explode.html">Explode</a> transition.</p>
* @platform android 5.2.0
*/
/**
* @property TRANSITION_FADE_IN
* @type Number
* @readonly
* <p>Fades in the views.</p>
* @description <p>Use this only for activity transition.
Refers to <a href="http://developer.android.com/reference/android/transition/Fade.html">Fade</a> transition.</p>
* @platform android 5.2.0
*/
/**
* @property TRANSITION_FADE_OUT
* @type Number
* @readonly
* <p>Fades out the views.</p>
* @description <p>Use this only for activity transition.
Refers to <a href="http://developer.android.com/reference/android/transition/Fade.html">Fade</a> transition.</p>
* @platform android 5.2.0
*/
/**
* @property TRANSITION_SLIDE_TOP
* @type Number
* @readonly
* <p>Moves views to top.</p>
* @description <p>Use this only for activity transition.
Refers to <a href="http://developer.android.com/reference/android/transition/Slide.html">Slide</a> transition.</p>
* @platform android 5.2.0
*/
/**
* @property TRANSITION_SLIDE_RIGHT
* @type Number
* @readonly
* <p>Moves views to right.</p>
* @description <p>Use this only for activity transition.
Refers to <a href="http://developer.android.com/reference/android/transition/Slide.html">Slide</a> transition.</p>
* @platform android 5.2.0
*/
/**
* @property TRANSITION_SLIDE_BOTTOM
* @type Number
* @readonly
* <p>Moves views to bottom.</p>
* @description <p>Use this only for activity transition.
Refers to <a href="http://developer.android.com/reference/android/transition/Slide.html">Slide</a> transition.</p>
* @platform android 5.2.0
*/
/**
* @property TRANSITION_SLIDE_LEFT
* @type Number
* @readonly
* <p>Moves views to left.</p>
* @description <p>Use this only for activity transition.
Refers to <a href="http://developer.android.com/reference/android/transition/Slide.html">Slide</a> transition.</p>
* @platform android 5.2.0
*/
/**
* @property TRANSITION_CHANGE_BOUNDS
* @type Number
* @readonly
* <p>Captures layout bounds of target views before and after the scene change and animates those changes during the transition.</p>
* @description <p>Use this only for shared element transition.
Refers to <a href="http://developer.android.com/reference/android/transition/ChangeBounds.html">ChangeBounds</a> transition.</p>
* @platform android 5.2.0
*/
/**
* @property TRANSITION_CHANGE_CLIP_BOUNDS
* @type Number
* @readonly
* <p>Captures the clip bounds before and after the scene change and animates those changes during the transition.</p>
* @description <p>Use this only for shared element transition.
Refers to <a href="http://developer.android.com/reference/android/transition/ChangeClipBounds.html">ChangeClipBounds</a> transition.</p>
* @platform android 5.2.0
*/
/**
* @property TRANSITION_CHANGE_TRANSFORM
* @type Number
* @readonly
* <p>Captures scale and rotation for Views before and after the scene change and animates those changes during the transition.</p>
* @description <p>Use this only for shared element transition.
Refers to <a href="http://developer.android.com/reference/android/transition/ChangeTransform.html">ChangeTransform</a> transition.</p>
* @platform android 5.2.0
*/
/**
* @property TRANSITION_CHANGE_IMAGE_TRANSFORM
* @type Number
* @readonly
* <p>Captures an ImageView's matrix before and after the scene change and animates it during the transition.</p>
* @description <p>Use this only for shared element transition.
Refers to <a href="http://developer.android.com/reference/android/transition/ChangeImageTransform.html">ChangeImageTransform</a> transition.</p>
* @platform android 5.2.0
*/
/**
* @property TRANSITION_NONE
* @type Number
* @readonly
* <p>Resets transition to platform default. </p>
* @description <p>Can be used with activity and shared element transtion.</p>
* @platform android 5.2.0
*/
/**
* @class Titanium.UI.Android.CardView
* @platform android 5.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Android/CardView.yml
* <p>An elevated view with rounded corners.</p>
* @description <p>CardView provides a layout container with rounded corners and a shadow indicating the
view is elevated.</p>
<p>Use a CardView to layout content that:</p>
<ul>
<li>Comprises multiple data types</li>
<li>Does not require direct comparison</li>
<li>Supports variable length content or displays more than three lines of text</li>
<li>Contains rich content or interactive elements, such as comments or a favorite button</li>
</ul>
<p>If you are displaying a collection of the same type in a uniform layout without many actions,
use a {@link Titanium.UI.ListView ListView} or {@link Titanium.UI.TableView TableView} instead.</p>
<p>For design guidelines, see
<a href="http://www.google.com/design/spec/components/cards.html">Google Design Guidelines: Cards</a></p>
<p>CardView does not support {@link Titanium.UI.View#property-backgroundImage} & {@link Titanium.UI.View#property-borderColor}.</p>
* <h3>Examples</h3>
<h4>CardView used in a ScrollView</h4>
<p>The following example creates a CardView used in a ScrollView.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor:'white',
title: 'Card Demo'
});
function createRow(i) {
var card = Ti.UI.Android.createCardView({
contentPadding: 20,
cardCornerRadius: 10,
cardUseCompatPadding: true
});
var label = Ti.UI.createLabel({
color:'black',
text: 'A long label with\na few line breaks\nand unicode (UTF8)\nsymbols such as\na white chess piece \u2655\nand the euro symbol \u20ac\nlooks like this!\n',
});
card.add(label);
return card;
}
var scrollView = Ti.UI.createScrollView({
layout: 'vertical'
});
for (var i = 0; i <= 20; i++) {
var row = createRow(i);
scrollView.add(row);
}
win.add(scrollView);
win.open();
</code></pre>
*/
/**
* @method getElevation
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-elevation} property.</p>
* @returns {Number}
* @platform android 5.1.2
*/
/**
* @method setElevation
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-elevation} property.</p>
* @param {Number} elevation
<p>New value for the property.</p>
* @platform android 5.1.2
*/
/**
* @method getBorderRadius
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-borderRadius} property.</p>
* @returns {Number}
* @platform android 5.1.2
*/
/**
* @method setBorderRadius
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-borderRadius} property.</p>
* @param {Number} borderRadius
<p>New value for the property.</p>
* @platform android 5.1.2
*/
/**
* @method getBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-backgroundColor} property.</p>
* @returns {String}
* @platform android 5.1.2
*/
/**
* @method setBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
* @platform android 5.1.2
*/
/**
* @method getCardBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-cardBackgroundColor} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.backgroundColor> instead.
* @returns {String}
*/
/**
* @method setCardBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-cardBackgroundColor} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.backgroundColor> instead.
* @param {String} cardBackgroundColor
<p>New value for the property.</p>
*/
/**
* @method getCardCornerRadius
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-cardCornerRadius} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.borderRadius> instead.
* @returns {Number}
*/
/**
* @method setCardCornerRadius
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-cardCornerRadius} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.borderRadius> instead.
* @param {Number} cardCornerRadius
<p>New value for the property.</p>
*/
/**
* @method getCardElevation
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-cardElevation} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.elevation> instead.
* @returns {Number}
*/
/**
* @method setCardElevation
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-cardElevation} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.elevation> instead.
* @param {Number} cardElevation
<p>New value for the property.</p>
*/
/**
* @method getCardMaxElevation
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-cardMaxElevation} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.maxElevation> instead.
* @returns {Number}
*/
/**
* @method setCardMaxElevation
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-cardMaxElevation} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.maxElevation> instead.
* @param {Number} cardMaxElevation
<p>New value for the property.</p>
*/
/**
* @method getMaxElevation
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-maxElevation} property.</p>
* @returns {Number}
* @platform android 5.1.2
*/
/**
* @method setMaxElevation
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-maxElevation} property.</p>
* @param {Number} maxElevation
<p>New value for the property.</p>
* @platform android 5.1.2
*/
/**
* @method getCardPreventCornerOverlap
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-cardPreventCornerOverlap} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.preventCornerOverlap> instead.
* @returns {Boolean}
*/
/**
* @method setCardPreventCornerOverlap
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-cardPreventCornerOverlap} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.preventCornerOverlap> instead.
* @param {Boolean} cardPreventCornerOverlap
<p>New value for the property.</p>
*/
/**
* @method getPreventCornerOverlap
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-preventCornerOverlap} property.</p>
* @returns {Boolean}
* @platform android 5.1.2
*/
/**
* @method setPreventCornerOverlap
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-preventCornerOverlap} property.</p>
* @param {Boolean} preventCornerOverlap
<p>New value for the property.</p>
* @platform android 5.1.2
*/
/**
* @method getCardUseCompatPadding
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-cardUseCompatPadding} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.useCompatPadding> instead.
* @returns {Boolean}
*/
/**
* @method setCardUseCompatPadding
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-cardUseCompatPadding} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.useCompatPadding> instead.
* @param {Boolean} cardUseCompatPadding
<p>New value for the property.</p>
*/
/**
* @method getUseCompatPadding
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-useCompatPadding} property.</p>
* @returns {Boolean}
* @platform android 5.1.2
*/
/**
* @method setUseCompatPadding
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-useCompatPadding} property.</p>
* @param {Boolean} useCompatPadding
<p>New value for the property.</p>
* @platform android 5.1.2
*/
/**
* @method getContentPadding
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-contentPadding} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.padding> instead.
* @returns {Number}
*/
/**
* @method setContentPadding
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-contentPadding} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.padding> instead.
* @param {Number} contentPadding
<p>New value for the property.</p>
*/
/**
* @method getPadding
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-padding} property.</p>
* @returns {Number}
* @platform android 5.1.2
*/
/**
* @method setPadding
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-padding} property.</p>
* @param {Number} padding
<p>New value for the property.</p>
* @platform android 5.1.2
*/
/**
* @method getContentPaddingBottom
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-contentPaddingBottom} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.paddingBottom> instead.
* @returns {Number}
*/
/**
* @method setContentPaddingBottom
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-contentPaddingBottom} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.paddingBottom> instead.
* @param {Number} contentPaddingBottom
<p>New value for the property.</p>
*/
/**
* @method getPaddingBottom
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-paddingBottom} property.</p>
* @returns {Number}
* @platform android 5.1.2
*/
/**
* @method setPaddingBottom
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-paddingBottom} property.</p>
* @param {Number} paddingBottom
<p>New value for the property.</p>
* @platform android 5.1.2
*/
/**
* @method getContentPaddingLeft
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-contentPaddingLeft} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.paddingLeft> instead.
* @returns {Number}
*/
/**
* @method setContentPaddingLeft
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-contentPaddingLeft} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.paddingLeft> instead.
* @param {Number} contentPaddingLeft
<p>New value for the property.</p>
*/
/**
* @method getPaddingLeft
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-paddingLeft} property.</p>
* @returns {Number}
* @platform android 5.1.2
*/
/**
* @method setPaddingLeft
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-paddingLeft} property.</p>
* @param {Number} paddingLeft
<p>New value for the property.</p>
* @platform android 5.1.2
*/
/**
* @method getContentPaddingRight
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-contentPaddingRight} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.paddingRight instead.
* @returns {Number}
*/
/**
* @method setContentPaddingRight
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-contentPaddingRight} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.paddingRight instead.
* @param {Number} contentPaddingRight
<p>New value for the property.</p>
*/
/**
* @method getPaddingRight
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-paddingRight} property.</p>
* @returns {Number}
* @platform android 5.1.2
*/
/**
* @method setPaddingRight
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-paddingRight} property.</p>
* @param {Number} paddingRight
<p>New value for the property.</p>
* @platform android 5.1.2
*/
/**
* @method getContentPaddingTop
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-contentPaddingTop} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.paddingTop> instead.
* @returns {Number}
*/
/**
* @method setContentPaddingTop
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-contentPaddingTop} property.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.paddingTop> instead.
* @param {Number} contentPaddingTop
<p>New value for the property.</p>
*/
/**
* @method getPaddingTop
* <p>Gets the value of the {@link Titanium.UI.Android.CardView#property-paddingTop} property.</p>
* @returns {Number}
* @platform android 5.1.2
*/
/**
* @method setPaddingTop
* <p>Sets the value of the {@link Titanium.UI.Android.CardView#property-paddingTop} property.</p>
* @param {Number} paddingTop
<p>New value for the property.</p>
* @platform android 5.1.2
*/
/**
* @property elevation
* @type Number
* <p>Elevation for CardView.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>The elevation of a view determines the appearance of its shadow.
Higher elevations produce larger and softer shadows.</p>
<p><strong>Note:</strong> The <code>elevation</code> property only works on <code>Titanium.UI.View</code> objects.
Many Android components have a default elevation that cannot be modified.
For more information, see
<a href="https://www.google.com/design/spec/what-is-material/elevation-shadows.html">Google design guidelines: Elevation and shadows</a>.</p>
* @platform android 5.1.2
*/
/**
* @property [borderRadius=0]
* @type Number
* <p>Corner radius for CardView.</p>
* @description <p>Each corner is rounded using an arc of a circle.</p>
* @platform android 5.1.2
*/
/**
* @property [backgroundColor=Transparent]
* @type String
* <p>Background color for CardView as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
* @platform android 5.1.2
*/
/**
* @property cardBackgroundColor
* @type String
* <p>Background color for CardView as a color name or hex triplet.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.backgroundColor> instead.
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property cardCornerRadius
* @type Number
* <p>Corner radius for CardView.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.borderRadius> instead.
*/
/**
* @property cardElevation
* @type Number
* <p>Elevation for CardView.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.elevation> instead.
*/
/**
* @property cardMaxElevation
* @type Number
* @creationOnly
* <p>Maximum Elevation for CardView.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.maxElevation> instead.
*/
/**
* @property maxElevation
* @type Number
* @creationOnly
* <p>Maximum Elevation for CardView.</p>
* @platform android 5.1.2
*/
/**
* @property [cardPreventCornerOverlap=false]
* @type Boolean
* <p>Add padding to CardView on API level 20 and before to prevent intersections between
the Card content and rounded corners.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.preventCornerOverlap> instead.
*/
/**
* @property [preventCornerOverlap=false]
* @type Boolean
* <p>Add padding to CardView on API level 20 and before to prevent intersections between
the Card content and rounded corners.</p>
* @platform android 5.1.2
*/
/**
* @property [cardUseCompatPadding=false]
* @type Boolean
* <p>Add padding on API level 21 and above to have the same measurements with previous versions.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.useCompatPadding> instead.
*/
/**
* @property [useCompatPadding=false]
* @type Boolean
* <p>Add padding on API level 21 and above to have the same measurements with previous versions.</p>
* @platform android 5.1.2
*/
/**
* @property contentPadding
* @type Number
* <p>Inner padding between the edges of the Card and children of the CardView.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.padding> instead.
*/
/**
* @property padding
* @type Number
* <p>Inner padding between the edges of the Card and children of the CardView.</p>
* @platform android 5.1.2
*/
/**
* @property contentPaddingBottom
* @type Number
* <p>Inner padding between the bottom edge of the Card and children of the CardView.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.paddingBottom> instead.
*/
/**
* @property paddingBottom
* @type Number
* <p>Inner padding between the bottom edge of the Card and children of the CardView.</p>
* @platform android 5.1.2
*/
/**
* @property contentPaddingLeft
* @type Number
* <p>Inner padding between the left edge of the Card and children of the CardView.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.paddingLeft> instead.
*/
/**
* @property paddingLeft
* @type Number
* <p>Inner padding between the left edge of the Card and children of the CardView.</p>
* @platform android 5.1.2
*/
/**
* @property contentPaddingRight
* @type Number
* <p>Inner padding between the right edge of the Card and children of the CardView.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.paddingRight instead.
*/
/**
* @property paddingRight
* @type Number
* <p>Inner padding between the right edge of the Card and children of the CardView.</p>
* @platform android 5.1.2
*/
/**
* @property contentPaddingTop
* @type Number
* <p>Inner padding between the top edge of the Card and children of the CardView.</p>
* @deprecated 5.1.2 Use <Titanium.UI.Android.CardView.paddingTop> instead.
*/
/**
* @property paddingTop
* @type Number
* <p>Inner padding between the top edge of the Card and children of the CardView.</p>
* @platform android 5.1.2
*/
/**
* @class Titanium.UI.Android.ProgressIndicator
* @platform android 3.0.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Android/ProgressIndicator.yml
* <p>A progress dialog or a horizontal progress bar in the title of the window.</p>
* @description <p>A progress indicator can be used to show the progress of an operation in the UI to let the
user know that some action is taking place. It is used to indicate an ongoing activity of
determinate or indeterminate length.</p>
<p>Use the {@link Titanium.UI.Android#method-createProgressIndicator} method or <strong><code><ProgressIndicator></code></strong> Alloy
element to create a progress indicator.</p>
<p>A progress indicator can be either a progress dialog or a horizontal progress bar in the title
of the window. The progress dialog is a modal dialog that blocks the UI. See also:
{@link Titanium.UI.Android#property-PROGRESS_INDICATOR_DIALOG},
{@link Titanium.UI.Android#property-PROGRESS_INDICATOR_STATUS_BAR}.</p>
<p>Calling {@link Titanium.UI.Android.ProgressIndicator#method-show} displays the indicator,
and calling {@link Titanium.UI.Android.ProgressIndicator#method-hide} removes it.</p>
<p>To display a horizontal progress bar in the title of a heavyweight window,
wait for the window to open before creating the progress bar.
For example, in the sample code below, for it to work in the status bar,
create the progress bar inside the event listener, which waits for the open event.</p>
* <h3>Examples</h3>
<h4>Simple Progress Indicator</h4>
<p>Click the button to show a progress indicator while
some code executes and hide it on completion.</p>
<pre><code>Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
backgroundColor: 'blue'
});
var button = Ti.UI.createButton({
title: 'Show Progress Dialog'
});
var progressIndicator = Ti.UI.Android.createProgressIndicator({
message: 'Loading...',
location: Ti.UI.Android.PROGRESS_INDICATOR_DIALOG,
type: Ti.UI.Android.PROGRESS_INDICATOR_DETERMINANT,
cancelable: true,
min: 0,
max: 10
});
button.addEventListener('click', function (e) {
progressIndicator.show();
var value = 0;
setInterval(function(){
if (value > 10) {
return;
}
progressIndicator.value = value;
value ++;
}, 200);
// do some work that takes 3 seconds
// ie. replace the following setTimeout block with your code
setTimeout(function(){
progressIndicator.hide();
}, 3000);
});
win.add(button);
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view-controller.</p>
<p>index.xml:</p>
<pre><code><Alloy>
<Window backgroundColor="blue">
<Button id="button" onClick="showIndicator">Show Progress Dialog</Button>
<ProgressIndicator ns="Ti.UI.Android" platform="android" id="progressIndicator"
message="Loading..." min="0" max="10" cancelable="true"
location="Ti.UI.Android.PROGRESS_INDICATOR_DIALOG"
type="Ti.UI.Android.PROGRESS_INDICATOR_DETERMINANT" />
</Window>
</Alloy>
</code></pre>
<p>index.js:</p>
<pre><code>function showIndicator(e) {
$.progressIndicator.show();
var value = 0;
setInterval(function(){
if (value > 10) {
return;
}
$.progressIndicator.value = value;
value ++;
}, 200);
// do some work that takes 3 seconds
// ie. replace the following setTimeout block with your code
setTimeout(function(){
$.progressIndicator.hide();
}, 3000);
}
$.index.open();
</code></pre>
*/
/**
* @event longclick
* @hide
* <p>Fired when the device detects a long click.</p>
* @description <p>A long click is generated by touching and holding on the touchscreen or holding down the
trackball button. </p>
<p>The event occurs before the finger/button is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>As the trackball can fire this event, it is not intended to return the <code>x</code> and <code>y</code>
coordinates of the touch, even when it is generated by the touchscreen. </p>
<p>A <code>longclick</code> blocks a <code>click</code>, meaning that a <code>click</code> event will not fire when a
<code>longclick</code> listener exists.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event click
* @hide
* <p>Fired when the device detects a click against the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event focus
* @hide
* <p>Fired when the view element gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event postlayout
* @hide
* <p>Fired when a layout cycle is finished.</p>
* @description <p>This event is fired when the view and its ancestors have been laid out.
The {@link Titanium.UI.View#property-rect rect} and {@link Titanium.UI.View#property-size size} values
should be usable when this event is fired.</p>
<p>This event is typically triggered by either changing layout
properties or by changing the orientation of the device. Note that changing the
layout of child views or ancestors can also trigger a relayout of this view.
On Mobile Web, this event can also be triggered by resizing the browser window.</p>
<p>Note that altering any properties that affect layout from the <code>postlayout</code> callback
may result in an endless loop.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event keypressed
* @hide
* <p>Fired when a hardware key is pressed in the view.</p>
* @description <p>A keypressed event is generated by pressing a hardware key. On Android, this event can only be
fired when the property {@link Titanium.UI.View#property-focusable focusable} is set to true. On iOS the
event is generated only when using {@link Titanium.UI.TextArea Ti.UI.TextArea}, {@link Titanium.UI.TextField Ti.UI.TextField}
and {@link Titanium.UI.SearchBar Ti.UI.SearchBar}.</p>
* @param {Number} keyCode
<p>The code for the physical key that was pressed. For more details, see <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a>. This API is experimental and subject to change.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.1.0
*/
/**
* @event cancel
* <p>Fired when the user has canceled the progress indicator dialog.</p>
* @description <p>The user triggers this event by pressing the BACK button when the dialog is visible.
The dialog will be hidden and this event dispatched.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method animate
* @hide
* <p>Animates this view.</p>
* @description <p>The {@link Titanium.UI.Animation Animation} object or dictionary passed to this method defines
the end state for the animation, the duration of the animation, and other properties.</p>
<p>Note that if you use <code>animate</code> to move a view, the view's actual <em>position</em> is changed, but
its layout properties, such as <code>top</code>, <code>left</code>, <code>center</code> and so on are not changed--these
reflect the original values set by the user, not the actual position of the view.</p>
<p>The {@link Titanium.UI.View#property-rect rect} property can be used to determine the actual size and
position of the view. Note that on Mobile Web, the <code>rect</code> property is not updated after
animation. This is a known issue <a href="https://jira.appcelerator.org/browse/TIMOB-8930">TIMOB-8930</a>.</p>
* @param {Titanium.UI.Animation/Dictionary<Titanium.UI.Animation>} animation
<p>Either a dictionary of animation properties or an
{@link Titanium.UI.Animation Animation} object.</p>
* @param {Callback<Object>} callback
<p>Function to be invoked upon completion of the animation.</p>
*/
/**
* @method remove
* @hide
* <p>Removes a child view from this view's hierarchy.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform android 3.1.0
*/
/**
* @method toImage
* @hide
* <p>Returns an image of the rendered view, as a Blob.</p>
* @description <p>The <code>honorScaleFactor</code> method is only supported on iOS.</p>
* @param {Callback<Titanium.Blob>} callback (optional)
<p>Function to be invoked upon completion. If non-null, this method will be performed
asynchronously. If null, it will be performed immediately.</p>
* @param {Boolean} honorScaleFactor (optional)
<p>Determines whether the image is scaled based on scale factor of main screen. (iOS only) </p>
<p>When set to true, image is scale factor is honored. When set to false, the image in the
blob has the same dimensions for retina and non-retina devices.</p>
* @returns {Titanium.Blob}
*/
/**
* @method convertPointToView
* @hide
* <p>Translates a point from this view's coordinate system to another view's coordinate system.</p>
* @description <p>Returns <code>null</code> if either view is not in the view hierarchy. </p>
<p>Keep in mind that views may be removed from the view hierarchy if their window is blurred
or if the view is offscreen (such as in some situations with {@link Titanium.UI.ScrollableView}).</p>
<p>If this view is a {@link Titanium.UI.ScrollView}, the view's x and y offsets are subtracted from
the return value.</p>
* @param {Point} point
<p>A point in this view's coordinate system. </p>
<p>If this argument is missing an <code>x</code> or <code>y</code> property, or the properties can not be
converted into numbers, an exception will be raised.</p>
* @param {Titanium.UI.View} destinationView
<p>View that specifies the destination coordinate system to convert to. If this argument
is not a view, an exception will be raised.</p>
* @returns {Point}
*/
/**
* @method add
* @hide
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>The child view is added as the last child in this view's hierarchy. </p>
<p>Although all views inherit from {@link Titanium.UI.View}, not all views are capable of
containing other views. In particular:</p>
<ul>
<li>Some views are not designed to be containers at all.</li>
<li>Some views are special-purpose containers that can only contain certain other
views.</li>
<li>Some views are top-level containers that cannot (or should not) be added to other views.</li>
</ul>
<h4>Non-Container Views</h4>
<p>The following views are not intended to act as containers that can hold other
views:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator ActivityIndicator}</li>
<li>{@link Titanium.UI.Button Button}</li>
<li>{@link Titanium.UI.ImageView ImageView}</li>
<li>{@link Titanium.UI.Label Label}</li>
<li>{@link Titanium.UI.ProgressBar ProgressBar}</li>
<li>{@link Titanium.UI.SearchBar SearchBar}</li>
<li>{@link Titanium.UI.Slider Slider}</li>
<li>{@link Titanium.UI.Switch Switch}</li>
<li>{@link Titanium.UI.TableView TableView}</li>
<li>{@link Titanium.UI.TextArea TextArea}</li>
<li>{@link Titanium.UI.TextField TextField}</li>
<li>{@link Titanium.UI.WebView WebView}</li>
</ul>
<p>Adding children to the these views <em>may</em> be supported on some platforms,
but is not guaranteed to work across platforms. Where it is supported, it may not
work as expected.</p>
<p>For maximum portability, these views should be treated as if they do not support children. <br>
Instead of adding children to these views, applications can positon other views as
siblings. For example, instead of adding a button as a child of a <code>WebView</code>, you can add
the button to the web view's parent such that it appears on top of the web view. </p>
<h4>Special-Purpose Containers</h4>
<p>A few view objects act as special-purpose containers--that is, they only manage
certain types of children, and many of them support a special means of adding
these children, instead of the general <code>add</code> method. These containers include:</p>
<ul>
<li><p>{@link Titanium.UI.ButtonBar ButtonBar} and {@link Titanium.UI.iOS.TabbedBar TabbedBar} are designed
to hold their own internally-created buttons, assigned by adding strings to the "labels" array.
Views added using the <code>add</code> method are displayed on top of these buttons.</p></li>
<li><p>{@link Titanium.UI.Picker Picker}. Can only hold <code>PickerRows</code> and <code>PickerColumns</code>, which
are added using the <code>add</code> method. Adding other types of views to a <code>Picker</code> is not
supported.</p></li>
<li><p>{@link Titanium.UI.TableView TableView} is a specialized container for
<code>TableViewSection</code> and <code>TableViewRow</code> objects. These objects must be
added using the properties and methods that <code>TableView</code> provides
for adding and removing sectons and rows.</p>
<p>On some platforms, it is possible to add arbitrary child views to a table view
using the <code>add</code> method. However, this is not guaranteed to work on all platforms,
and in general, should be avoided.</p></li>
<li><p>{@link Titanium.UI.TableViewSection TableViewSection} is a specialized container
for <code>TableViewRow</code> objects, which <em>are</em> added using the <code>add</code> method. The <code>add</code> method
on <code>TableViewSection</code> can only be used to add <code>TableViewRow</code> objects.</p></li>
<li><p>{@link Titanium.UI.iOS.Toolbar Toolbar} is designed to hold buttons and certain
other controls, added to its <code>items</code> array. Views added using the <code>add</code> method are
displayed on top of the controls in the <code>items</code> array.</p></li>
<li><p>The <code>Tab</code>, <code>TabGroup</code>, <code>NavigationGroup</code>, <code>NavigationWindow</code> and <code>SplitWindow</code> objects are
special containers that manage windows. These are discussed in the
"Top-Level Containers" section.</p></li>
</ul>
<h4>Top-Level Containers</h4>
<p>There are certain top-level containers that are not intended to be added
as the children of other views. These top-level containers include
{@link Titanium.UI.Window}, {@link Titanium.UI.iPad.SplitWindow}, {@link Titanium.UI.iOS.NavigationWindow},
and {@link Titanium.UI.TabGroup}. Other types of views must be added
to a top-level container in order to be displayed on screen.</p>
<p>The special containers {@link Titanium.UI.MobileWeb.NavigationGroup},
{@link Titanium.UI.iOS.NavigationWindow}, {@link Titanium.UI.iPad.SplitWindow},
{@link Titanium.UI.Tab}, and {@link Titanium.UI.TabGroup} manage windows.
These managed windows may be referred to as <em>children</em> of the
container, but they are not added using the <code>add</code> method.</p>
<p>Note that although a <code>NavigationGroup</code> manages windows, it is not itself a
top-level container. It must be added to a <code>Window</code> in order to be displayed.</p>
<p><code>Tab</code> is another kind of special container: it is not itself a top-level container,
but can only be used within a <code>TabGroup</code>. You cannot <code>add</code> a <code>Tab</code> to an arbitrary
container.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
*/
/**
* @method hide
* <p>Hides the progress indicator and stops the animation.</p>
* @param {AnimationOption} options (optional)
<p>Animation options for Android. <strong>Since Release 5.1.0.</strong></p>
*/
/**
* @method show
* <p>Shows the progress indicator and starts the animation.</p>
* @param {AnimationOption} options (optional)
<p>Animation options for Android. <strong>Since Release 5.1.0.</strong></p>
*/
/**
* @method getAccessibilityHidden
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-accessibilityHidden} property.</p>
* @returns {Boolean}
*/
/**
* @method setAccessibilityHidden
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-accessibilityHidden} property.</p>
* @param {Boolean} accessibilityHidden
<p>New value for the property.</p>
*/
/**
* @method getAccessibilityHint
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-accessibilityHint} property.</p>
* @returns {String}
*/
/**
* @method setAccessibilityHint
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-accessibilityHint} property.</p>
* @param {String} accessibilityHint
<p>New value for the property.</p>
*/
/**
* @method getAccessibilityLabel
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-accessibilityLabel} property.</p>
* @returns {String}
*/
/**
* @method setAccessibilityLabel
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-accessibilityLabel} property.</p>
* @param {String} accessibilityLabel
<p>New value for the property.</p>
*/
/**
* @method getAccessibilityValue
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-accessibilityValue} property.</p>
* @returns {String}
*/
/**
* @method setAccessibilityValue
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-accessibilityValue} property.</p>
* @param {String} accessibilityValue
<p>New value for the property.</p>
*/
/**
* @method getBackgroundRepeat
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundRepeat} property.</p>
* @returns {Boolean}
*/
/**
* @method setBackgroundRepeat
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundRepeat} property.</p>
* @param {Boolean} backgroundRepeat
<p>New value for the property.</p>
*/
/**
* @method getBorderColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-borderColor} property.</p>
* @returns {String}
*/
/**
* @method setBorderColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-borderColor} property.</p>
* @param {String} borderColor
<p>New value for the property.</p>
*/
/**
* @method getFocusable
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-focusable} property.</p>
* @returns {Boolean}
*/
/**
* @method setFocusable
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-focusable} property.</p>
* @param {Boolean} focusable
<p>New value for the property.</p>
*/
/**
* @method getOverrideCurrentAnimation
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-overrideCurrentAnimation} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
*/
/**
* @method setOverrideCurrentAnimation
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-overrideCurrentAnimation} property.</p>
* @param {Boolean} overrideCurrentAnimation
<p>New value for the property.</p>
* @platform android 3.3.0
*/
/**
* @method getSoftKeyboardOnFocus
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-softKeyboardOnFocus} property.</p>
* @returns {Number}
*/
/**
* @method setSoftKeyboardOnFocus
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-softKeyboardOnFocus} property.</p>
* @param {Number} softKeyboardOnFocus
<p>New value for the property.</p>
*/
/**
* @method getTransform
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-transform} property.</p>
* @returns {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix}
*/
/**
* @method setTransform
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-transform} property.</p>
* @param {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix} transform
<p>New value for the property.</p>
*/
/**
* @method getHorizontalWrap
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-horizontalWrap} property.</p>
* @returns {Boolean}
*/
/**
* @method setHorizontalWrap
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-horizontalWrap} property.</p>
* @param {Boolean} horizontalWrap
<p>New value for the property.</p>
*/
/**
* @method getKeepScreenOn
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-keepScreenOn} property.</p>
* @returns {Boolean}
*/
/**
* @method setKeepScreenOn
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-keepScreenOn} property.</p>
* @param {Boolean} keepScreenOn
<p>New value for the property.</p>
*/
/**
* @method getBackgroundDisabledColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundDisabledColor} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundDisabledColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundDisabledColor} property.</p>
* @param {String} backgroundDisabledColor
<p>New value for the property.</p>
*/
/**
* @method getBackgroundDisabledImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundDisabledImage} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundDisabledImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundDisabledImage} property.</p>
* @param {String} backgroundDisabledImage
<p>New value for the property.</p>
*/
/**
* @method getBackgroundFocusedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundFocusedColor} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundFocusedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundFocusedColor} property.</p>
* @param {String} backgroundFocusedColor
<p>New value for the property.</p>
*/
/**
* @method getBackgroundFocusedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundFocusedImage} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundFocusedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundFocusedImage} property.</p>
* @param {String} backgroundFocusedImage
<p>New value for the property.</p>
*/
/**
* @method getBackgroundGradient
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundGradient} property.</p>
* @returns {Gradient}
*/
/**
* @method setBackgroundGradient
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundGradient} property.</p>
* @param {Gradient} backgroundGradient
<p>New value for the property.</p>
*/
/**
* @method getBackgroundImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundImage} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
*/
/**
* @method getBackgroundSelectedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundSelectedColor} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundSelectedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundSelectedColor} property.</p>
* @param {String} backgroundSelectedColor
<p>New value for the property.</p>
*/
/**
* @method getBackgroundSelectedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundSelectedImage} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundSelectedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundSelectedImage} property.</p>
* @param {String} backgroundSelectedImage
<p>New value for the property.</p>
*/
/**
* @method getBorderRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-borderRadius} property.</p>
* @returns {Number}
*/
/**
* @method setBorderRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-borderRadius} property.</p>
* @param {Number} borderRadius
<p>New value for the property.</p>
*/
/**
* @method getBorderWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-borderWidth} property.</p>
* @returns {Number}
*/
/**
* @method setBorderWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-borderWidth} property.</p>
* @param {Number} borderWidth
<p>New value for the property.</p>
*/
/**
* @method getOpacity
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-opacity} property.</p>
* @returns {Number}
*/
/**
* @method setOpacity
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-opacity} property.</p>
* @param {Number} opacity
<p>New value for the property.</p>
*/
/**
* @method getRect
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-rect} property.</p>
* @returns {Dimension}
*/
/**
* @method getSize
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-size} property.</p>
* @returns {Dimension}
*/
/**
* @method getTouchEnabled
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-touchEnabled} property.</p>
* @returns {Boolean}
*/
/**
* @method setTouchEnabled
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-touchEnabled} property.</p>
* @param {Boolean} touchEnabled
<p>New value for the property.</p>
*/
/**
* @method getVisible
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-visible} property.</p>
* @returns {Boolean}
*/
/**
* @method setVisible
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-visible} property.</p>
* @param {Boolean} visible
<p>New value for the property.</p>
*/
/**
* @method getZIndex
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-zIndex} property.</p>
* @returns {Number}
*/
/**
* @method setZIndex
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
*/
/**
* @method getChildren
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-children} property.</p>
* @returns {Titanium.UI.View[]}
*/
/**
* @method getBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundColor} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
*/
/**
* @method getTop
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-top} property.</p>
* @returns {Number/String}
*/
/**
* @method setTop
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-top} property.</p>
* @param {Number/String} top
<p>New value for the property.</p>
*/
/**
* @method getLeft
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-left} property.</p>
* @returns {Number/String}
*/
/**
* @method setLeft
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-left} property.</p>
* @param {Number/String} left
<p>New value for the property.</p>
*/
/**
* @method getBottom
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-bottom} property.</p>
* @returns {Number/String}
*/
/**
* @method setBottom
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-bottom} property.</p>
* @param {Number/String} bottom
<p>New value for the property.</p>
*/
/**
* @method getCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-center} property.</p>
* @returns {Point}
*/
/**
* @method setCenter
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-center} property.</p>
* @param {Point} center
<p>New value for the property.</p>
*/
/**
* @method getRight
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-right} property.</p>
* @returns {Number/String}
*/
/**
* @method setRight
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-right} property.</p>
* @param {Number/String} right
<p>New value for the property.</p>
*/
/**
* @method getWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-width} property.</p>
* @returns {Number/String}
*/
/**
* @method setWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-width} property.</p>
* @param {Number/String} width
<p>New value for the property.</p>
*/
/**
* @method getHeight
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-height} property.</p>
* @returns {Number/String}
*/
/**
* @method setHeight
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-height} property.</p>
* @param {Number/String} height
<p>New value for the property.</p>
*/
/**
* @method getLayout
* @hide
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-layout} property.</p>
* @returns {String}
*/
/**
* @method setLayout
* @hide
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-layout} property.</p>
* @param {String} layout
<p>New value for the property.</p>
*/
/**
* @method getCancelable
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-cancelable} property.</p>
* @returns {Boolean}
*/
/**
* @method setCancelable
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-cancelable} property.</p>
* @param {Boolean} cancelable
<p>New value for the property.</p>
*/
/**
* @method getCanceledOnTouchOutside
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-canceledOnTouchOutside} property.</p>
* @returns {Boolean}
* @platform android 3.6.0
*/
/**
* @method setCanceledOnTouchOutside
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-canceledOnTouchOutside} property.</p>
* @param {Boolean} canceledOnTouchOutside
<p>New value for the property.</p>
* @platform android 3.6.0
*/
/**
* @method getMessage
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-message} property.</p>
* @returns {String}
*/
/**
* @method setMessage
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-message} property.</p>
* @param {String} message
<p>New value for the property.</p>
*/
/**
* @method getMessageid
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-messageid} property.</p>
* @returns {String}
*/
/**
* @method setMessageid
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-messageid} property.</p>
* @param {String} messageid
<p>New value for the property.</p>
*/
/**
* @method getMin
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-min} property.</p>
* @returns {Number}
*/
/**
* @method setMin
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-min} property.</p>
* @param {Number} min
<p>New value for the property.</p>
*/
/**
* @method getMax
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-max} property.</p>
* @returns {Number}
*/
/**
* @method setMax
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-max} property.</p>
* @param {Number} max
<p>New value for the property.</p>
*/
/**
* @method getLocation
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-location} property.</p>
* @returns {Number}
*/
/**
* @method setLocation
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-location} property.</p>
* @param {Number} location
<p>New value for the property.</p>
*/
/**
* @method getType
* <p>Gets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-type} property.</p>
* @returns {Number}
*/
/**
* @method setType
* <p>Sets the value of the {@link Titanium.UI.Android.ProgressIndicator#property-type} property.</p>
* @param {Number} type
<p>New value for the property.</p>
*/
/**
* @property [accessibilityHidden=false]
* @hide
* @type Boolean
* <p>Whether the view should be "hidden" from (i.e., ignored by) the accessibility service.</p>
* <p> <b>Requires:</b>
Android 4.0 and later
iOS 5.0 and later
</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityElementsHidden</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility
Protocol</a>.
The native property is only available in iOS 5.0 and later; if
<code>accessibilityHidden</code> is specified on earlier versions of iOS, it is ignored.</p>
<p>On Android, setting <code>accessibilityHidden</code> calls the native
<a href="http://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29">View.setImportantForAccessibility</a>
method. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and
later; if this property is specified on earlier versions of Android, it is ignored.</p>
*/
/**
* @property [accessibilityHint=]
* @hide
* @type String
* <p>Briefly describes what performing an action (such as a click) on the view will do.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityHint</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityValue} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
*/
/**
* @property [accessibilityLabel=Title or label of the control.]
* @hide
* @type String
* <p>A succint label identifying the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityLabel</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityValue} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
*/
/**
* @property [accessibilityValue=State or value of the control.]
* @hide
* @type String
* <p>A string describing the value (if any) of the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityValue</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
*/
/**
* @property [backgroundRepeat=false]
* @hide
* @type Boolean
* <p>Determines whether to tile a background across a view.</p>
* @description <p>Setting this to <code>true</code> makes the set <code>backgroundImage</code> repeat across the view as a series
of tiles. The tiling begins in the upper-left corner, where the upper-left corner of the
background image is rendered. The image is then tiled to fill the available space of the
view.</p>
<p>Note that setting this to <code>true</code> may incur performance penalties for large views or
background images, as the tiling must be redone whenever a view is resized.</p>
<p>On iOS, the following views do not currently support tiled backgrounds:</p>
<ul>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.TextField}</li>
<li>{@link Titanium.UI.Label}</li>
</ul>
*/
/**
* @property [borderColor=Same as the normal background color of this view (Android, Mobile Web), black (iOS).]
* @hide
* @type String
* <p>Border color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property [focusable=false]
* @hide
* @type Boolean
* <p>Whether view should be focusable while navigating with the trackball.</p>
*/
/**
* @property [overrideCurrentAnimation=undefined but behaves as false]
* @hide
* @type Boolean
* @creationOnly
* <p>When on, animate call overrides current animation if applicable.</p>
* @description <p>If this property is set to false, the animate call is ignored if the view is currently being animated.</p>
* @platform android 3.3.0
*/
/**
* @property [softKeyboardOnFocus={@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}]
* @hide
* @type Number
* <p>Determines keyboard behavior when this view is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_HIDE_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_SHOW_ON_FOCUS}
</ul></p>
*/
/**
* @property [transform=Identity matrix]
* @hide
* @type Titanium.UI.2DMatrix/Titanium.UI.3DMatrix
* <p>Transformation matrix to apply to the view.</p>
* @description <p>Android and Mobile Web only support 2DMatrix transforms.</p>
*/
/**
* @property [horizontalWrap=true]
* @hide
* @type Boolean
* <p>Determines whether the layout has wrapping behavior.</p>
* @description <p>For more information, see the discussion of horizontal layout mode in the description of
the {@link Titanium.UI.View#property-layout layout} property.</p>
*/
/**
* @property [keepScreenOn=false]
* @hide
* @type Boolean
* <p>Determines whether to keep the device screen on.</p>
* @description <p>When <code>true</code> the screen will not power down. Note: enabling this feature will use more
power, thereby adversely affecting run time when on battery.</p>
*/
/**
* @property [backgroundDisabledColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Disabled background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property [backgroundDisabledImage=If `backgroundDisabledImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is disabled.
]
* @hide
* @type String
* <p>Disabled background image for the view, specified as a local file path or URL.</p>
*/
/**
* @property [backgroundFocusedColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Focused background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>For normal views, the focused color is only used if <code>focusable</code> is <code>true</code>.</p>
*/
/**
* @property [backgroundFocusedImage=If `backgroundFocusedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is focused.
]
* @hide
* @type String
* <p>Focused background image for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the focused background is only used if <code>focusable</code> is <code>true</code>.</p>
*/
/**
* @property [backgroundGradient=No gradient]
* @hide
* @type Gradient
* <p>A background gradient for the view.</p>
* @description <p>A gradient can be defined as either linear or radial. A linear gradient varies continuously
along a line between the <code>startPoint</code> and <code>endPoint</code>.</p>
<p>A radial gradient is interpolated between two circles, defined by <code>startPoint</code> and
<code>startRadius</code> and <code>endPoint</code> and <code>endRadius</code> respectively.</p>
<p>The start and end points and radius values can be defined in device units, in the view's
coordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center
point of the view can be specified as:</p>
<pre><code>{ x: 30, y: 30 }
</code></pre>
<p>Or:
{ x: '50%', y: '50%' }</p>
<p>When specifying multiple colors, you can specify an <em>offset</em> value for each color, defining
how far into the gradient it takes effect. For example, the following color array specifies
a gradient that goes from red to blue back to red: </p>
<pre><code>colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]
</code></pre>
<p>Mobile Web has two limitations: backfillStart and backfillEnd are ignored and the system
behaves as if they are true, and endPoint is not supported for radial gradients. </p>
<p>Android currently only supports linear gradients. It also ignores backfillStart and backfillEnd
treating them as if they are true.</p>
* <h3>Examples</h3>
<h4>Linear and Radial Gradients</h4>
<p>The following code excerpt creates two views, one with a linear gradient and one with
a radial gradient.</p>
<pre><code>var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var radialGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'radial',
startPoint: { x: 50, y: 50 },
endPoint: { x: 50, y: 50 },
colors: [ 'red', 'blue'],
startRadius: '90%',
endRadius: 0,
backfillStart: true
}
});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],
}
});
win1.add(radialGradient);
win1.add(linearGradient);
win1.open();
</code></pre>
*/
/**
* @property [backgroundImage=Default behavior when `backgroundImage` is unspecified depends on the type of view and
the platform. For generic views, no image is used. For most controls (buttons, text
fields, and so on), platform-specific default images are used.
]
* @hide
* @type String
* <p>Background image for the view, specified as a local file path or URL.</p>
*/
/**
* @property [backgroundSelectedColor=Background color of this view.]
* @hide
* @type String
* <p>Selected background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p><code>focusable</code> must be true for normal views.</p>
*/
/**
* @property [backgroundSelectedImage=If `backgroundSelectedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is selected.
]
* @hide
* @type String
* <p>Selected background image url for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the selected background is only used if <code>focusable</code> is <code>true</code>.</p>
*/
/**
* @property [borderRadius=0]
* @hide
* @type Number
* <p>Radius for the rounded corners of the view's border.</p>
* @description <p>Each corner is rounded using an arc of a circle.</p>
*/
/**
* @property [borderWidth=0]
* @hide
* @type Number
* <p>Border width of the view.</p>
*/
/**
* @property [opacity=1.0 (opaque)]
* @hide
* @type Number
* <p>Opacity of this view, from 0.0 (transparent) to 1.0 (opaque).</p>
*/
/**
* @property rect
* @hide
* @type Dimension
* @readonly
* <p>The bounding box of the view relative to its parent, in system units.</p>
* @description <p>The view's bounding box is defined by its size and position. </p>
<p>The view's size is <code>rect.width</code> x <code>rect.height</code>. The view's top-left position relative to
its parent is (<code>rect.x</code> , <code>rect.y</code>). </p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
*/
/**
* @property size
* @hide
* @type Dimension
* @readonly
* <p>The size of the view in system units. </p>
* @description <p>Although property returns a {@link Dimension} dictionary, only the <code>width</code> and <code>height</code>
properties are valid. The position properties--<code>x</code> and <code>y</code>--are always 0.</p>
<p>To find the position <em>and</em> size of the view, use the {@link Titanium.UI.View#property-rect rect}
property instead.</p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
*/
/**
* @property [touchEnabled=true]
* @hide
* @type Boolean
* <p>Determines whether view should receive touch events.</p>
* @description <p>If false, will forward the events to peers.</p>
*/
/**
* @property [visible=true]
* @hide
* @type Boolean
* <p>Determines whether the view is visible.</p>
*/
/**
* @property zIndex
* @hide
* @type Number
* <p>Z-index stack order position, relative to other sibling views.</p>
* @description <p>A view does not have a default z-index value, meaning that it is undefined by default.
When this property is explicitly set, regardless of its value, it causes the view to be
positioned in front of any sibling that has an undefined z-index.</p>
*/
/**
* @property children
* @hide
* @type Titanium.UI.View[]
* @readonly
* <p>Array of this view's child views.</p>
*/
/**
* @property [backgroundColor=Transparent]
* @hide
* @type String
* <p>Background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property top
* @hide
* @type Number/String
* <p>The view's top position.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property left
* @hide
* @type Number/String
* <p>View's left position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property bottom
* @hide
* @type Number/String
* <p>View's bottom position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the parent
view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or a
dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property center
* @hide
* @type Point
* <p>View's center position, in the parent view's coordinates.</p>
* @description <p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property right
* @hide
* @type Number/String
* <p>View's right position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property width
* @hide
* @type Number/String
* <p>View's width, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values: </p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</li>
</ul>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p>
<p>This is an input property for specifying the view's width dimension. To determine
the view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
*/
/**
* @property height
* @hide
* @type Number/String
* <p>View height, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values:</p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li><p>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</p>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p></li>
</ul>
<p>This is an input property for specifying the view's height dimension. To determine the
view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
*/
/**
* @property [layout=Composite layout]
* @hide
* @type String
* <p>Specifies how the view positions its children.
One of: 'composite', 'vertical', or 'horizontal'.</p>
* @description <p>There are three layout options:</p>
<ul>
<li><p><code>composite</code> (or <code>absolute</code>). Default layout. A child view is positioned based on its
positioning properties or "pins" (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code> and <code>center</code>).
If no positioning properties are specified, the child is centered. </p>
<p>The child is always sized based on its <code>width</code> and <code>height</code> properties, if these are
specified. If the child's height or width is <em>not</em> specified explicitly, it may be
calculated implicitly from the positioning properties. For example, if both <code>left</code> and
<code>center.x</code> are specified, they can be used to calculate the width of the child control. </p>
<p>Because the size and position properties can conflict, there is a specific precedence
order for the layout properties. For vertical positioning, the precedence
order is: <code>height</code>, <code>top</code>, <code>center.y</code>, <code>bottom</code>.</p>
<p>The following table summarizes the various combinations of properties that can
be used for vertical positioning, in order from highest precedence to lowest.
(For example, if <code>height</code>, <code>center.y</code> and <code>bottom</code> are all specified, the
<code>height</code> and <code>center.y</code> values take precedence.)</p>
<table cellpadding="6px" border="1" rules="all">
<tr>
<th>Scenario</th><th>Behavior</th>
</tr>
<tr>
<td>`height` & `top` specified</td><td>Child positioned `top` unit from
parent's top, using specified `height`;
any `center.y` and `bottom` values are ignored.</td>
</tr>
<tr>
<td>`height` & `center.y` specified</td><td>Child positioned with center at
`center.y`, using specified `height`; any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`height` & `bottom` specified</td><td>Child positioned `bottom` units from
parent's bottom, using specified `height`.</td>
</tr>
<tr>
<td>`top` & `center.y` specified</td><td>Child positioned with top edge `top` units from
parent's top and center at `center.y`. Height is determined implicitly;
any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`top` & `bottom` specified</td><td>Child positioned with top edge `top` units from
parent's top and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly. </td>
</tr>
<tr>
<td>Only `top` specified</td><td>Child positioned `top` units from parent's
top, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`center.y` and `bottom` specified</td><td>Child positioned with center at
`center.y` and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly.</td>
</tr>
<tr>
<td>Only `center.y` specified</td><td>Child positioned with center at
`center.y`, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>Only `bottom` specified</td><td>Child positioned with bottom edge `bottom`
units from parent's bottom, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`height`, `top`, `center.y`, and `bottom` unspecified</td><td>Child
centered vertically in the parent and uses the default height calculation
for the child view type.</td>
</tr>
</table>
<p>Horizontal positioning works like vertical positioning, except that the
precedence is <code>width</code>, <code>left</code>, <code>center.x</code>, <code>right</code>. </p>
<p>For complete details on composite layout rules, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>
in the Titanium Mobile Guides. </p>
<ul><li><code>vertical</code>. Children are laid out vertically from top to bottom. The first child
is laid out <code>top</code> units from its parent's bounding box. Each subsequent child is
laid out below the previous child. The space between children is equal to the
upper child's <code>bottom</code> value plus the lower child's <code>top</code> value. </li></ul>
<p>Each child is positioned horizontally as in the composite layout mode. </p>
<ul><li><code>horizontal</code>. Horizontal layouts have different behavior depending on whether wrapping
is enabled. Wrapping is enabled by default (the <code>horizontalWrap</code> property is <code>true</code>).</li></ul>
<p>With wrapping behavior, the children are laid out horizontally from left to right,
<em>in rows</em>. If a child requires more horizontal space than exists in the current row,
it is wrapped to a new row. The height of each row is equal to the maximum height of
the children in that row.</p>
<p>Wrapping behavior is available on iOS, Android and Mobile Web (Release 2.1.0 and later).
When the <code>horizontalWrap</code> property is set to true, the first row is placed at the top of the
parent view, and successive rows are placed below the first row. Each child is
positioned vertically <em>within its row</em> somewhat like composite layout mode.
In particular: </p>
<ul><li>If neither <code>top</code> or <code>bottom</code> is specified, the child is centered in the
row.</li>
<li>If either <code>top</code> or <code>bottom</code> is specified, the child is aligned to either
the top or bottom of the row, with the specified amount of padding.</li>
<li>If <em>both</em> <code>top</code> and <code>bottom</code> is specified for a given child, the properties
are both treated as padding.</li></ul>
<p>If the <code>horizontalWrap</code> property is false, the behavior is more equivalent to a vertical layout.
Children are laid or horizontally from left to right in a single row. The <code>left</code> and
<code>right</code> properties are used as padding between the children, and the <code>top</code> and <code>bottom</code>
properties are used to position the children vertically.</p>
<p>On Mobile Web <em>prior to</em> Release 2.1.0, the horizontal layout does not wrap by default,
and does not support the <code>horizontalWrap</code> property. On Android and iOS <em>prior to</em> Release
2.1.0, the horizontal layout always wraps and the <code>horizontalWrap</code> property is not supported.</p></li>
</ul>
*/
/**
* @property cancelable
* @type Boolean
* <p>When <code>true</code> allows the user to cancel the progress dialog by pressing the BACK button.</p>
*/
/**
* @property [canceledOnTouchOutside=false]
* @type Boolean
* <p>When <code>cancelable</code> is set to <code>true</code> and this is set to <code>true</code>, the dialog is canceled when touched outside the window's bounds.</p>
* @platform android 3.6.0
*/
/**
* @property message
* @type String
* <p>Message text.</p>
*/
/**
* @property messageid
* @type String
* <p>Key identifying a string in the locale file to use for the message text.</p>
* @description <p>Only one of <code>message</code> or <code>messageid</code> should be specified.</p>
*/
/**
* @property min
* @type Number
* <p>Minimum value of the progress bar.</p>
*/
/**
* @property max
* @type Number
* <p>Maximum value of the progress bar.</p>
*/
/**
* @property [location={@link Titanium.UI.Android#property-PROGRESS_INDICATOR_DIALOG}]
* @type Number
* <p>Location for the progress indicator.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-PROGRESS_INDICATOR_DIALOG}
<li> {@link Titanium.UI.Android#property-PROGRESS_INDICATOR_STATUS_BAR}
</ul></p>
*/
/**
* @property [type={@link Titanium.UI.Android#property-PROGRESS_INDICATOR_INDETERMINANT}]
* @type Number
* <p>Type for the progress indicator.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-PROGRESS_INDICATOR_INDETERMINANT}
<li> {@link Titanium.UI.Android#property-PROGRESS_INDICATOR_DETERMINANT}
</ul></p>
*/
/**
* @class Titanium.UI.Android.SearchView
* @platform android 3.0.2
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Android/SearchView.yml
* <p>A specialized text field for entering search text.</p>
* @description <p><code>SearchView</code> provides a user interface to enter a search query and submit a request to a search provider.</p>
<p>Search views are most commonly used for filtering the rows in a {@link Titanium.UI.TableView TableView}.
Similar to {@link Titanium.UI.SearchBar SearchBar}, you can add a search view to a table view by setting the table view's
{@link Titanium.UI.TableView#property-search search} property. A search view can be used without a <code>TableView</code>. </p>
<p>You can also use a <code>SearchView</code> object as the {@link Titanium.UI.ListView#property-searchView}
property of a {@link Titanium.UI.ListView ListView} object.</p>
<p>You can also add <code>SearchView</code> to an <code>ActionBar</code> as a view (see example below).</p>
<p>Use the {@link Titanium.UI.Android#method-createSearchView} method or <strong><code><SearchView></code></strong> Alloy element to create
a search view. You must set the Alloy element's <code>ns</code> attribute to <strong>Ti.UI.Android</strong>:</p>
<pre><code><SearchView ns="Ti.UI.Android" platform="android"/>
</code></pre>
* <h3>Examples</h3>
<h4>Search View for Table in Action Bar</h4>
<p>The following example creates a SearchView widget for a TableView
and displays it as an Action Bar item if the Google API level is 11 or later.
If not, it defaults to use the search bar.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'blue',
fullscreen: false
});
// Use action bar search view
var search = Ti.UI.Android.createSearchView({
hintText: "Table Search"
});
win.activity.onCreateOptionsMenu = function(e) {
var menu = e.menu;
var menuItem = menu.add({
title: 'Table Search',
actionView : search,
icon: (Ti.Android.R.drawable.ic_menu_search ? Ti.Android.R.drawable.ic_menu_search : "my_search.png"),
showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM | Ti.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW
});
};
var data = [];
data.push(Ti.UI.createTableViewRow({title:'Apple'}));
data.push(Ti.UI.createTableViewRow({title:'Banana'}));
data.push(Ti.UI.createTableViewRow({title:'Orange'}));
data.push(Ti.UI.createTableViewRow({title:'Raspberry'}));
var tableview = Titanium.UI.createTableView({
data: data,
search: search,
searchAsChild: false
});
win.add(tableview);
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy project.</p>
<p>index.xml:</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="blue" fullscreen="false" layout="vertical">
<TableView id="tableview" top="10" searchAsChild="false">
<TableViewRow title="Apple" />
<TableViewRow title="Banana" />
<TableViewRow title="Orange" />
<TableViewRow title="Raspberry" />
</TableView>
</Window>
</Alloy>
</code></pre>
<p>index.js:</p>
<pre><code>// use action bar search view
var search = Alloy.createController("searchview").getView();
$.tableview.search = search;
$.win.addEventListener("open", function() {
$.win.activity.onCreateOptionsMenu = function(e) {
e.menu.add({
title: "Table Search",
icon: (Ti.Android.R.drawable.ic_menu_search ? Ti.Android.R.drawable.ic_menu_search : "my_search.png"),
actionView: search,
showAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS | Ti.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW
});
}
$.win.activity.invalidateOptionsMenu();
});
$.win.open();
</code></pre>
<p>searchview.xml:</p>
<pre><code><Alloy>
<SearchView id="searchView" ns="Ti.UI.Android" platform="android" hintText="Table Search" />
</Alloy>
</code></pre>
*/
/**
* @event focus
* <p>Fired when the search view gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event blur
* <p>Fired when the search view loses focus.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event cancel
* <p>Fired when the cancel button is pressed.</p>
* @description <p>Due to the current <a href="http://code.google.com/p/android/issues/detail?id=25758">Android Issue</a>, this event does not work
with Android 4.0+. Alternatively, when using SearchView in the action bar, you can listen for the {@link Titanium.Android.MenuItem#event-collapse MenuItem.collapse} event.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event change
* <p>Fired when the value of the search view changes.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event submit
* <p>If the search query is not empty, fired when the search button is clicked on soft keyboard</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method add
* @hide
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>The child view is added as the last child in this view's hierarchy. </p>
<p>Although all views inherit from {@link Titanium.UI.View}, not all views are capable of
containing other views. In particular:</p>
<ul>
<li>Some views are not designed to be containers at all.</li>
<li>Some views are special-purpose containers that can only contain certain other
views.</li>
<li>Some views are top-level containers that cannot (or should not) be added to other views.</li>
</ul>
<h4>Non-Container Views</h4>
<p>The following views are not intended to act as containers that can hold other
views:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator ActivityIndicator}</li>
<li>{@link Titanium.UI.Button Button}</li>
<li>{@link Titanium.UI.ImageView ImageView}</li>
<li>{@link Titanium.UI.Label Label}</li>
<li>{@link Titanium.UI.ProgressBar ProgressBar}</li>
<li>{@link Titanium.UI.SearchBar SearchBar}</li>
<li>{@link Titanium.UI.Slider Slider}</li>
<li>{@link Titanium.UI.Switch Switch}</li>
<li>{@link Titanium.UI.TableView TableView}</li>
<li>{@link Titanium.UI.TextArea TextArea}</li>
<li>{@link Titanium.UI.TextField TextField}</li>
<li>{@link Titanium.UI.WebView WebView}</li>
</ul>
<p>Adding children to the these views <em>may</em> be supported on some platforms,
but is not guaranteed to work across platforms. Where it is supported, it may not
work as expected.</p>
<p>For maximum portability, these views should be treated as if they do not support children. <br>
Instead of adding children to these views, applications can positon other views as
siblings. For example, instead of adding a button as a child of a <code>WebView</code>, you can add
the button to the web view's parent such that it appears on top of the web view. </p>
<h4>Special-Purpose Containers</h4>
<p>A few view objects act as special-purpose containers--that is, they only manage
certain types of children, and many of them support a special means of adding
these children, instead of the general <code>add</code> method. These containers include:</p>
<ul>
<li><p>{@link Titanium.UI.ButtonBar ButtonBar} and {@link Titanium.UI.iOS.TabbedBar TabbedBar} are designed
to hold their own internally-created buttons, assigned by adding strings to the "labels" array.
Views added using the <code>add</code> method are displayed on top of these buttons.</p></li>
<li><p>{@link Titanium.UI.Picker Picker}. Can only hold <code>PickerRows</code> and <code>PickerColumns</code>, which
are added using the <code>add</code> method. Adding other types of views to a <code>Picker</code> is not
supported.</p></li>
<li><p>{@link Titanium.UI.TableView TableView} is a specialized container for
<code>TableViewSection</code> and <code>TableViewRow</code> objects. These objects must be
added using the properties and methods that <code>TableView</code> provides
for adding and removing sectons and rows.</p>
<p>On some platforms, it is possible to add arbitrary child views to a table view
using the <code>add</code> method. However, this is not guaranteed to work on all platforms,
and in general, should be avoided.</p></li>
<li><p>{@link Titanium.UI.TableViewSection TableViewSection} is a specialized container
for <code>TableViewRow</code> objects, which <em>are</em> added using the <code>add</code> method. The <code>add</code> method
on <code>TableViewSection</code> can only be used to add <code>TableViewRow</code> objects.</p></li>
<li><p>{@link Titanium.UI.iOS.Toolbar Toolbar} is designed to hold buttons and certain
other controls, added to its <code>items</code> array. Views added using the <code>add</code> method are
displayed on top of the controls in the <code>items</code> array.</p></li>
<li><p>The <code>Tab</code>, <code>TabGroup</code>, <code>NavigationGroup</code>, <code>NavigationWindow</code> and <code>SplitWindow</code> objects are
special containers that manage windows. These are discussed in the
"Top-Level Containers" section.</p></li>
</ul>
<h4>Top-Level Containers</h4>
<p>There are certain top-level containers that are not intended to be added
as the children of other views. These top-level containers include
{@link Titanium.UI.Window}, {@link Titanium.UI.iPad.SplitWindow}, {@link Titanium.UI.iOS.NavigationWindow},
and {@link Titanium.UI.TabGroup}. Other types of views must be added
to a top-level container in order to be displayed on screen.</p>
<p>The special containers {@link Titanium.UI.MobileWeb.NavigationGroup},
{@link Titanium.UI.iOS.NavigationWindow}, {@link Titanium.UI.iPad.SplitWindow},
{@link Titanium.UI.Tab}, and {@link Titanium.UI.TabGroup} manage windows.
These managed windows may be referred to as <em>children</em> of the
container, but they are not added using the <code>add</code> method.</p>
<p>Note that although a <code>NavigationGroup</code> manages windows, it is not itself a
top-level container. It must be added to a <code>Window</code> in order to be displayed.</p>
<p><code>Tab</code> is another kind of special container: it is not itself a top-level container,
but can only be used within a <code>TabGroup</code>. You cannot <code>add</code> a <code>Tab</code> to an arbitrary
container.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
*/
/**
* @method blur
* <p>Causes the search view to lose focus.</p>
*/
/**
* @method focus
* <p>Causes the search view to gain focus.</p>
*/
/**
* @method getColor
* <p>Gets the value of the {@link Titanium.UI.Android.SearchView#property-color} property.</p>
* @returns {String}
*/
/**
* @method setColor
* <p>Sets the value of the {@link Titanium.UI.Android.SearchView#property-color} property.</p>
* @param {String} color
<p>New value for the property.</p>
*/
/**
* @method getHintText
* <p>Gets the value of the {@link Titanium.UI.Android.SearchView#property-hintText} property.</p>
* @returns {String}
*/
/**
* @method setHintText
* <p>Sets the value of the {@link Titanium.UI.Android.SearchView#property-hintText} property.</p>
* @param {String} hintText
<p>New value for the property.</p>
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.UI.Android.SearchView#property-value} property.</p>
* @returns {String}
*/
/**
* @method setValue
* <p>Sets the value of the {@link Titanium.UI.Android.SearchView#property-value} property.</p>
* @param {String} value
<p>New value for the property.</p>
*/
/**
* @method getIconified
* <p>Gets the value of the {@link Titanium.UI.Android.SearchView#property-iconified} property.</p>
* @returns {Boolean}
*/
/**
* @method setIconified
* <p>Sets the value of the {@link Titanium.UI.Android.SearchView#property-iconified} property.</p>
* @param {Boolean} iconified
<p>New value for the property.</p>
*/
/**
* @method getIconifiedByDefault
* <p>Gets the value of the {@link Titanium.UI.Android.SearchView#property-iconifiedByDefault} property.</p>
* @returns {Boolean}
*/
/**
* @method setIconifiedByDefault
* <p>Sets the value of the {@link Titanium.UI.Android.SearchView#property-iconifiedByDefault} property.</p>
* @param {Boolean} iconifiedByDefault
<p>New value for the property.</p>
*/
/**
* @method getSubmitEnabled
* <p>Gets the value of the {@link Titanium.UI.Android.SearchView#property-submitEnabled} property.</p>
* @returns {Boolean}
*/
/**
* @method setSubmitEnabled
* <p>Sets the value of the {@link Titanium.UI.Android.SearchView#property-submitEnabled} property.</p>
* @param {Boolean} submitEnabled
<p>New value for the property.</p>
*/
/**
* @property color
* @type String
* <p>Color of the text in this SearchView, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property [hintText=no hint text]
* @type String
* <p>Text to show when the search view field is not focused.</p>
*/
/**
* @property value
* @type String
* <p>Value of the search view.</p>
* @description <p>This value cannot be set until after the search view is created.</p>
*/
/**
* @property iconified
* @type Boolean
* <p>Iconifies or expands the search view</p>
* @description <p>see <a href="http://developer.android.com/reference/android/widget/SearchView.html#setIconified%28boolean%29">Android Documentation</a> for more details.</p>
*/
/**
* @property [iconifiedByDefault=true]
* @type Boolean
* <p>Sets the default or resting state of the search view</p>
* @description <p>see <a href="http://developer.android.com/reference/android/widget/SearchView.html#setIconifiedByDefault%28boolean%29">Android Documentation</a> for more details.</p>
*/
/**
* @property submitEnabled
* @type Boolean
* <p>Whether to display the submit button when necessary or never display.</p>
*/
/**
* @class Titanium.UI.Animation
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Animation.yml
* <p>The <code>Animation</code> object defines an animation that can be applied to a view.</p>
* @description <p>An animation object describes the properties of an animation. At its most basic, an animation
object represents a single-phase animation with an end state and a duration. </p>
<p>When {@link Titanium.UI.View#method-animate animate} is called on a {@link Titanium.UI.View View}, the view is
animated from its current state to the state described by the animation object. The properties
that can be animated include the view's position, size, colors, transformation matrix and opacity. </p>
<p>Animations can be set to reverse themselves automatically on completion, and to repeat a given
number of times. For more complicated effects, multiple animations can be combined in sequence,
starting one animation when the previous animation completes.</p>
<p>Use the {@link Titanium.UI#method-createAnimation} method to create an animation object.</p>
<p>Note that when you animate a view's size or position, the actual layout properties (such as
<code>top</code>, <code>left</code>, <code>width</code>, <code>height</code>) are not changed by the animation. See the description of the
{@link Titanium.UI.View#method-animate animate} method for more information.</p>
<h4>iOS Platform Notes</h4>
<p>iOS supports both 2D and 3D matrix transformations in animations.</p>
<p>In iOS, you can also specify an animation curve or <em>easing function</em> to control the pace of the
animation. To use an easing function, set the animation's <code>curve</code> property to one of the
<code>ANIMATION_CURVE</code> constants defined in {@link Titanium.UI}. For example,
{@link Titanium.UI#property-ANIMATION_CURVE_EASE_IN ANIMATION_CURVE_EASE_IN} specifies an animation that
starts slowly and then speeds up.</p>
<p>Finally, iOS also supports <em>transitions</em> between windows or views. You can create a transition
by creating an animation object and setting the <code>view</code> property to the view you want to
transition to. The <code>transition</code> property specifies the transition effect to apply. Use one of
the transition style constants defined in {@link Titanium.UI.iOS.AnimationStyle}.</p>
<h4>Android Platform Notes</h4>
<p>Android supports 2D matrix transformations. Note that the
{@link Titanium.UI.2DMatrix#method-rotate 2DMatrix.rotate} method operates differently on Android. Called
with a single argument, it rotates from zero to the specified angle. That is, it ignores any
existing rotation. Called with two arguments, it interprets the first argument as a "from"
angle and the second argument as a "to" angle. </p>
<p>Android doesn't support any animation curves or easing functions. Animations always interpolate
linearly between the start state and the end state.</p>
<h4>Mobile Web Platform Notes</h4>
<p>Mobile Web supports 2D matrix transformations and animation curves in animations.</p>
<p>iOS 5.1 and older as well as Safari 5 have a bug where you cannot animate both a position and
transform matrix at the same time. The matrix transform animation will override the position
animation until the matrix transform animation is complete, then jumps to the animated position.</p>
* <h3>Examples</h3>
<h4>Simple Animation Applied to a View</h4>
<p>Create a simple animation and apply it to the view. In this example, the view will animate
from red to black to orange over 2 seconds.</p>
<pre><code>var view = Titanium.UI.createView({
backgroundColor:'red'
});
var animation = Titanium.UI.createAnimation();
animation.backgroundColor = 'black';
animation.duration = 1000;
var animationHandler = function() {
animation.removeEventListener('complete',animationHandler);
animation.backgroundColor = 'orange';
view.animate(animation);
};
animation.addEventListener('complete',animationHandler);
view.animate(animation);
</code></pre><h4>Animation Using Matrix Transforms</h4>
<p>The following example uses a transformation matrix to animate
a view when the view is clicked. The animation rotates and scales
the view, then returns it to its original size and position. The
entire animation is repeated three times.</p>
<pre><code>var box = Ti.UI.createView({
backgroundColor : 'red',
height : '100',
width : '100'
});
win.add(box);
box.addEventListener('click', function() {
var matrix = Ti.UI.create2DMatrix()
matrix = matrix.rotate(180);
matrix = matrix.scale(2, 2);
var a = Ti.UI.createAnimation({
transform : matrix,
duration : 2000,
autoreverse : true,
repeat : 3
});
box.animate(a);
});
</code></pre><h4>Using an anchorPoint (Android and iOS)</h4>
<p>Create a button and a blue square view. For each click of the button, apply a 90 degree
rotation animation pivoted at one of a series of anchor points. In particular, note that
an anchor point is configured using the {@link Titanium.UI.Animation#property-anchorPoint} property for
Android and the {@link Titanium.UI.View#property-anchorPoint} property for iOS.</p>
<pre><code>var animationType = [
{ name: 'Top Left', anchorPoint: {x:0, y:0} },
{ name: 'Top Right', anchorPoint: {x:1, y:0} },
{ name: 'Bottom Left', anchorPoint: {x:0, y:1} },
{ name: 'Bottom Right', anchorPoint: {x:1, y:1} },
{ name: 'Center', anchorPoint: {x:0.5, y:0.5} }
];
var animationTypeLength = animationType.length;
var animationCount = 0;
var animationTypePointer = 0;
var t = Ti.UI.create2DMatrix();
t = t.rotate(90);
// animation properties
var a = {
transform: t,
duration: 2000,
autoreverse: true
};
Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow();
var view = Ti.UI.createView({
backgroundColor:'#336699',
width:100, height:100
});
win.add(view);
var button = Ti.UI.createButton({
title:'Animate ' + animationType[animationTypePointer].name,
height: (Ti.UI.Android) ? 80 : 40,
width: (Ti.UI.Android) ? 300 : 200,
top:30
});
win.add(button);
function updateButton(name){
button.title = 'Animate ' + name;
}
button.addEventListener('click', function(){
// set new anchorPoint on animation for Android
a.anchorPoint = animationType[animationTypePointer].anchorPoint;
// set new anchorPoint on view for iOS
view.anchorPoint = animationType[animationTypePointer].anchorPoint;
animationCount++;
// determine position of next object in animationType array or return to first item
// using modulus operator
animationTypePointer = animationCount % animationTypeLength;
// animate view, followed by callback to set next button title
view.animate(a, function(){
updateButton(animationType[animationTypePointer].name);
});
});
win.open();
</code></pre>
*/
/**
* @event complete
* <p>Fired when the animation completes.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event start
* <p>Fired when the animation starts.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method getAnchorPoint
* <p>Gets the value of the {@link Titanium.UI.Animation#property-anchorPoint} property.</p>
* @returns {Point}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setAnchorPoint
* <p>Sets the value of the {@link Titanium.UI.Animation#property-anchorPoint} property.</p>
* @param {Point} anchorPoint
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getAutoreverse
* <p>Gets the value of the {@link Titanium.UI.Animation#property-autoreverse} property.</p>
* @returns {Boolean}
*/
/**
* @method setAutoreverse
* <p>Sets the value of the {@link Titanium.UI.Animation#property-autoreverse} property.</p>
* @param {Boolean} autoreverse
<p>New value for the property.</p>
*/
/**
* @method getBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.Animation#property-backgroundColor} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.Animation#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
*/
/**
* @method getBottom
* <p>Gets the value of the {@link Titanium.UI.Animation#property-bottom} property.</p>
* @returns {Number}
*/
/**
* @method setBottom
* <p>Sets the value of the {@link Titanium.UI.Animation#property-bottom} property.</p>
* @param {Number} bottom
<p>New value for the property.</p>
*/
/**
* @method getCenter
* <p>Gets the value of the {@link Titanium.UI.Animation#property-center} property.</p>
* @returns {Object}
*/
/**
* @method setCenter
* <p>Sets the value of the {@link Titanium.UI.Animation#property-center} property.</p>
* @param {Object} center
<p>New value for the property.</p>
*/
/**
* @method getColor
* <p>Gets the value of the {@link Titanium.UI.Animation#property-color} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setColor
* <p>Sets the value of the {@link Titanium.UI.Animation#property-color} property.</p>
* @param {String} color
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getCurve
* <p>Gets the value of the {@link Titanium.UI.Animation#property-curve} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setCurve
* <p>Sets the value of the {@link Titanium.UI.Animation#property-curve} property.</p>
* @param {Number} curve
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getDelay
* <p>Gets the value of the {@link Titanium.UI.Animation#property-delay} property.</p>
* @returns {Number}
*/
/**
* @method setDelay
* <p>Sets the value of the {@link Titanium.UI.Animation#property-delay} property.</p>
* @param {Number} delay
<p>New value for the property.</p>
*/
/**
* @method getDuration
* <p>Gets the value of the {@link Titanium.UI.Animation#property-duration} property.</p>
* @returns {Number}
*/
/**
* @method setDuration
* <p>Sets the value of the {@link Titanium.UI.Animation#property-duration} property.</p>
* @param {Number} duration
<p>New value for the property.</p>
*/
/**
* @method getHeight
* <p>Gets the value of the {@link Titanium.UI.Animation#property-height} property.</p>
* @returns {Number}
*/
/**
* @method setHeight
* <p>Sets the value of the {@link Titanium.UI.Animation#property-height} property.</p>
* @param {Number} height
<p>New value for the property.</p>
*/
/**
* @method getLeft
* <p>Gets the value of the {@link Titanium.UI.Animation#property-left} property.</p>
* @returns {Number}
*/
/**
* @method setLeft
* <p>Sets the value of the {@link Titanium.UI.Animation#property-left} property.</p>
* @param {Number} left
<p>New value for the property.</p>
*/
/**
* @method getOpacity
* <p>Gets the value of the {@link Titanium.UI.Animation#property-opacity} property.</p>
* @returns {Number}
*/
/**
* @method setOpacity
* <p>Sets the value of the {@link Titanium.UI.Animation#property-opacity} property.</p>
* @param {Number} opacity
<p>New value for the property.</p>
*/
/**
* @method getOpaque
* <p>Gets the value of the {@link Titanium.UI.Animation#property-opaque} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setOpaque
* <p>Sets the value of the {@link Titanium.UI.Animation#property-opaque} property.</p>
* @param {Boolean} opaque
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getRepeat
* <p>Gets the value of the {@link Titanium.UI.Animation#property-repeat} property.</p>
* @returns {Number}
*/
/**
* @method setRepeat
* <p>Sets the value of the {@link Titanium.UI.Animation#property-repeat} property.</p>
* @param {Number} repeat
<p>New value for the property.</p>
*/
/**
* @method getRight
* <p>Gets the value of the {@link Titanium.UI.Animation#property-right} property.</p>
* @returns {Number}
*/
/**
* @method setRight
* <p>Sets the value of the {@link Titanium.UI.Animation#property-right} property.</p>
* @param {Number} right
<p>New value for the property.</p>
*/
/**
* @method getTop
* <p>Gets the value of the {@link Titanium.UI.Animation#property-top} property.</p>
* @returns {Number}
*/
/**
* @method setTop
* <p>Sets the value of the {@link Titanium.UI.Animation#property-top} property.</p>
* @param {Number} top
<p>New value for the property.</p>
*/
/**
* @method getTransform
* <p>Gets the value of the {@link Titanium.UI.Animation#property-transform} property.</p>
* @returns {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix}
*/
/**
* @method setTransform
* <p>Sets the value of the {@link Titanium.UI.Animation#property-transform} property.</p>
* @param {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix} transform
<p>New value for the property.</p>
*/
/**
* @method getTransition
* <p>Gets the value of the {@link Titanium.UI.Animation#property-transition} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setTransition
* <p>Sets the value of the {@link Titanium.UI.Animation#property-transition} property.</p>
* @param {Number} transition
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getView
* <p>Gets the value of the {@link Titanium.UI.Animation#property-view} property.</p>
* @returns {Titanium.UI.View}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setView
* <p>Sets the value of the {@link Titanium.UI.Animation#property-view} property.</p>
* @param {Titanium.UI.View} view
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getVisible
* <p>Gets the value of the {@link Titanium.UI.Animation#property-visible} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setVisible
* <p>Sets the value of the {@link Titanium.UI.Animation#property-visible} property.</p>
* @param {Boolean} visible
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getWidth
* <p>Gets the value of the {@link Titanium.UI.Animation#property-width} property.</p>
* @returns {Number}
*/
/**
* @method setWidth
* <p>Sets the value of the {@link Titanium.UI.Animation#property-width} property.</p>
* @param {Number} width
<p>New value for the property.</p>
*/
/**
* @method getZIndex
* <p>Gets the value of the {@link Titanium.UI.Animation#property-zIndex} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setZIndex
* <p>Sets the value of the {@link Titanium.UI.Animation#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property anchorPoint
* @type Point
* <p>Coordinate of the view about which to pivot an animation.</p>
* @description <p>Used on Android only. For iOS, use {@link Titanium.UI.View#property-anchorPoint}. </p>
<p>Anchor point is specified as a fraction of the view's size. For example, <code>{0, 0}</code> is at
the view's top-left corner, <code>{0.5, 0.5}</code> at its center and <code>{1, 1}</code> at its bottom-right
corner. </p>
<p>See the "Using an anchorPoint" example for a demonstration.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [autoreverse=false]
* @type Boolean
* <p>Specifies if the animation should be replayed in reverse upon completion.</p>
*/
/**
* @property backgroundColor
* @type String
* <p>Value of the <code>backgroundColor</code> property at the end of the animation, as a color name
or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property bottom
* @type Number
* <p>Value of the <code>bottom</code> property at the end of the animation.</p>
*/
/**
* @property center
* @type Object
* <p>Value of the <code>center</code> property at the end of the animation.</p>
*/
/**
* @property color
* @type String
* <p>Value of the <code>color</code> property at the end of the animation, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property curve
* @type Number
* <p>Animation curve or easing function to apply to the animation.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-ANIMATION_CURVE_EASE_IN}
<li> {@link Titanium.UI#property-ANIMATION_CURVE_EASE_IN_OUT}
<li> {@link Titanium.UI#property-ANIMATION_CURVE_EASE_OUT}
<li> {@link Titanium.UI#property-ANIMATION_CURVE_LINEAR}
</ul></p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property delay
* @type Number
* <p>Delay, in milliseconds before starting the animation.</p>
*/
/**
* @property duration
* @type Number
* <p>Duration of the animation, in milliseconds.</p>
*/
/**
* @property height
* @type Number
* <p>Value of the <code>height</code> property at the end of the animation.</p>
*/
/**
* @property left
* @type Number
* <p>Value of the <code>left</code> property at the end of the animation.</p>
*/
/**
* @property opacity
* @type Number
* <p>Value of the <code>opacity</code> property at the end of the animation.</p>
*/
/**
* @property opaque
* @type Boolean
* <p>Value of the <code>opaque</code> property at the end of the animation.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [repeat=1 (no repeat)]
* @type Number
* <p>Number of times the animation should be performed.</p>
* @description <p>If <code>autoreverse</code> is <code>true</code>, then one repeat of the animation consists of the animation
being played once forward, and once backward.</p>
*/
/**
* @property right
* @type Number
* <p>Value of the <code>right</code> property at the end of the animation.</p>
*/
/**
* @property top
* @type Number
* <p>Value of the <code>top</code> property at the end of the animation.</p>
*/
/**
* @property transform
* @type Titanium.UI.2DMatrix/Titanium.UI.3DMatrix
* <p>Animate the view from its current tranform to the specified transform.</p>
* @description <p>Over the course of the animation, the view interpolates from its current transform to the
specified transform.</p>
<p>3D transforms are only supported on iOS.</p>
*/
/**
* @property transition
* @type Number
* <p>Transition type to use during a transition animation.</p>
* @description <p>The new view being transitioned to <strong>should NOT</strong> be a child of another view or
of the animating view. The animation replaces the current view from the
view heirarchy and adds the new view to it.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS.AnimationStyle#property-CURL_DOWN}
<li> {@link Titanium.UI.iOS.AnimationStyle#property-CURL_UP}
<li> {@link Titanium.UI.iOS.AnimationStyle#property-FLIP_FROM_LEFT}
<li> {@link Titanium.UI.iOS.AnimationStyle#property-FLIP_FROM_RIGHT}
<li> {@link Titanium.UI.iOS.AnimationStyle#property-NONE}
</ul></p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property view
* @type Titanium.UI.View
* <p>New view to transition to.</p>
* @description <p>Specify the <code>transition</code> property with one of the transition style constants defined
in {@link Titanium.UI.iOS.AnimationStyle} to select the effect to apply.</p>
<p>The new view being transitioned to <strong>should NOT</strong> be a child of another view or
of the animating view. The animation replaces the current view from the
view heirarchy and adds the new view to it.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property visible
* @type Boolean
* <p>Value of the <code>visible</code> property at the end of the animation.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property width
* @type Number
* <p>Value of the <code>width</code> property at the end of the animation.</p>
*/
/**
* @property zIndex
* @type Number
* <p>Value of the <code>zIndex</code> property at the end of the animation.</p>
* @description <p>Refer to {@link Titanium.UI.View#property-zIndex} for an explanation of z-index.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @class Attribute
* @platform android 3.6.0
* @platform iphone 3.6.0
* @platform ipad 3.6.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Attribute.yml
* <p>An abstract datatype for specifying an attributed string attribute.</p>
* @description <p>Attributes are added to the {@link Titanium.UI.AttributedString} object to create
styled text. The attribute is a JavaScript Object containing three properties:
<code>type</code>, <code>value</code> and <code>range</code>.</p>
*/
/**
* @property type
* @type Number
* <p>Attribute to apply to the text.</p>
* @description <p>On Android, only the following constants are supported
Titanium.UI.ATTRIBUTE_FONT, Titanium.UI.ATTRIBUTE_FOREGROUND_COLOR,
Titanium.UI.ATTRIBUTE_BACKGROUND_COLOR, Titanium.UI.ATTRIBUTE_STRIKETHROUGH_STYLE,
Titanium.UI.ATTRIBUTE_UNDERLINES_STYLE, Titanium.UI.ATTRIBUTE_LINK,
Titanium.UI.ATTRIBUTE_UNDERLINE_COLOR</p>
<p>ON iOS, Titanium.UI.ATTRIBUTE_LINK only supported on {@link Titanium.UI.TextArea}, with
editable set to false and autoLink enabled.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-ATTRIBUTE_FONT}
<li> {@link Titanium.UI#property-ATTRIBUTE_FOREGROUND_COLOR}
<li> {@link Titanium.UI#property-ATTRIBUTE_BACKGROUND_COLOR}
<li> {@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_STYLE}
<li> {@link Titanium.UI#property-ATTRIBUTE_UNDERLINES_STYLE}
<li> {@link Titanium.UI#property-ATTRIBUTE_LINK}
<li> {@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_COLOR}
<li> {@link Titanium.UI#property-ATTRIBUTE_LIGATURE}
<li> {@link Titanium.UI#property-ATTRIBUTE_KERN}
<li> {@link Titanium.UI#property-ATTRIBUTE_STROKE_COLOR}
<li> {@link Titanium.UI#property-ATTRIBUTE_STROKE_WIDTH}
<li> {@link Titanium.UI#property-ATTRIBUTE_SHADOW}
<li> {@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION}
<li> {@link Titanium.UI#property-ATTRIBUTE_TEXT_EFFECT}
<li> {@link Titanium.UI#property-ATTRIBUTE_BASELINE_OFFSET}
<li> {@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_COLOR}
<li> {@link Titanium.UI#property-ATTRIBUTE_OBLIQUENESS}
<li> {@link Titanium.UI#property-ATTRIBUTE_EXPANSION}
<li> {@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK}
</ul></p>
*/
/**
* @property value
* @type Number
* <p>Attribute value.</p>
* @description <p>The <code>value</code> parameter depends on the <code>type</code> parameter. For example, to
use the foreground color on the text you would use {@link Titanium.UI#property-ATTRIBUTE_FOREGROUND_COLOR}
for the <code>type</code> and a color value for the <code>value</code>:</p>
<pre><code>{
type: Titanium.UI.ATTRIBUTE_FOREGROUND_COLOR,
value: '#DDD',
range: [0, 100]
}
</code></pre>
<p>On IOS, if you use {@link Titanium.UI#property-ATTRIBUTE_UNDERLINES_STYLE} or {@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_STYLE},
you must use one or more of these constants:</p>
<ul>
<li>{@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_STYLE_NONE}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_STYLE_SINGLE}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_STYLE_THICK}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_STYLE_DOUBLE}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_PATTERN_SOLID}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_PATTERN_DOT}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_PATTERN_DASH}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_PATTERN_DASH_DOT}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_PATTERN_DASH_DOT_DOT}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_BY_WORD}</li>
</ul>
<p>These can be combined:</p>
<pre><code>{
type: Titanium.UI.ATTRIBUTE_UNDERLINES_STYLE,
value: Titanium.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE | Titanium.UI.ATTRIBUTE_UNDERLINE_PATTERN_DASH,
range: [0, 100]
}
</code></pre>
<p>On IOS, if you use the {@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION}, you must use one or more of
these constants:</p>
<ul>
<li>{@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION_EMBEDDING}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION_OVERRIDE}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION_NATURAL}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION_LEFT_TO_RIGHT}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION_RIGHT_TO_LEFT}</li>
</ul>
<p>These can also be combined the same way as the underline styles.</p>
<p>On IOS, if you use the {@link Titanium.UI#property-ATTRIBUTE_SHADOW}, the <code>value</code> must be a JavaScript object containing
any of the <code>offset</code>, <code>blurRadius</code> or <code>color</code> properties:</p>
<pre><code>{
offset: {
width: 10,
height: 10
},
blurRadius: 10,
color: 'red'
}
</code></pre>
<p>On IOS, if you use the {@link Titanium.UI#property-ATTRIBUTE_TEXT_EFFECT}, you must use the only supported iOS 7 constant
{@link Titanium.UI#property-ATTRIBUTE_LETTERPRESS_STYLE}.</p>
<p>On IOS, if you use the {@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK}, you must use one of
these constants:</p>
<ul>
<li>{@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK_BY_WORD_WRAPPING}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK_BY_CHAR_WRAPPING}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK_BY_CLIPPING}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK_BY_TRUNCATING_HEAD}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK_BY_TRUNCATING_TAIL}</li>
<li>{@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK_BY_TRUNCATING_MIDDLE}</li>
</ul>
<p>These can also be combined the same way as the underline styles.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_STYLE_NONE}
<li> {@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_STYLE_SINGLE}
<li> {@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_STYLE_THICK}
<li> {@link Titanium.UI#property-ATTRIBUTE_UNDERLINE_STYLE_DOUBLE}
<li> {@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION_EMBEDDING}
<li> {@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION_OVERRIDE}
<li> {@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION_NATURAL}
<li> {@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION_LEFT_TO_RIGHT}
<li> {@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION_RIGHT_TO_LEFT}
<li> {@link Titanium.UI#property-ATTRIBUTE_LETTERPRESS_STYLE}
</ul></p>
*/
/**
* @property range
* @type Number[]
* <p>Attribute range.</p>
* @description <p>This specifies the range of text to apply the property to, as an array of two numbers: <code>[from, length]</code>.</p>
*/
/**
* @class Titanium.UI.AttributedString
* @platform android 3.6.0
* @platform iphone 3.6.0
* @platform ipad 3.6.0
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/AttributedString.yml
* <p>An attributed string proxy manages character strings and associated sets of attributes (for example,
font and foregroundcolor) that apply to individual characters or ranges of characters in the string.</p>
* @description <p>The AttributedString proxy is created with the {@link Titanium.UI#method-createAttributedString} method.</p>
<p>The <code>text</code> property must be set initially in the constructor when creating an attributed string.
The {@link Titanium.UI.AttributedString#property-attributes attributes} can either be set in the constructor or after it has been created.</p>
<p>For examples of Attributed Strings, see the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Attributed_Strings">Attributed Strings guide</a>.</p>
* <h3>Examples</h3>
<h4>Adds an array of attributes to a label</h4>
<p>Creates an AttributedString proxy, adds some attributes to it, and applies them
to a {@link Titanium.UI.Label}.</p>
<pre><code>var win = Titanium.UI.createWindow({
backgroundColor: '#ddd',
});
win.open();
var text = 'Bacon ipsum dolor Appcelerator Titanium rocks! sit amet fatback leberkas salami sausage tongue strip steak.';
var attr = Titanium.UI.createAttributedString({
text: text,
attributes: [
// Underlines text
{
type: Titanium.UI.ATTRIBUTE_UNDERLINES_STYLE,
range: [0, text.length]
},
// Sets a background color
{
type: Titanium.UI.ATTRIBUTE_BACKGROUND_COLOR,
value: "red",
range: [text.indexOf('Appcelerator'), ('Appcelerator').length]
},
{
type: Titanium.UI.ATTRIBUTE_BACKGROUND_COLOR,
value: "blue",
range: [text.indexOf('Titanium'), ('Titanium').length]
},
{
type: Titanium.UI.ATTRIBUTE_BACKGROUND_COLOR,
value: "yellow",
range: [text.indexOf('rocks!'), ('rocks!').length]
},
// Sets a foreground color
{
type: Titanium.UI.ATTRIBUTE_FOREGROUND_COLOR,
value: "orange",
range: [0, text.length]
},
{
type: Titanium.UI.ATTRIBUTE_FOREGROUND_COLOR,
value: "black",
range: [text.indexOf('rocks!'), ('rocks!').length]
}
]
});
var label = Titanium.UI.createLabel({
left: 20,
right: 20,
height: Titanium.UI.SIZE,
attributedString: attr
});
win.add(label);
</code></pre><h4>Adds attributes, one by one.</h4>
<pre><code>var win = Titanium.UI.createWindow({
backgroundColor: '#ddd',
});
win.open();
var text = 'Bacon ipsum dolor Appcelerator Titanium rocks! sit amet fatback leberkas salami sausage tongue strip steak.';
var attr = Titanium.UI.createAttributedString({
text: text
});
// Underlines text
attr.addAttribute({
type: Titanium.UI.ATTRIBUTE_UNDERLINES_STYLE,
range: [0, text.length]
});
var label = Titanium.UI.createLabel({
left: 20,
right: 20,
height: Titanium.UI.SIZE,
attributedString: attr
});
win.add(label);</code></pre>
*/
/**
* @method addAttribute
* <p>Adds an {@link Attribute attribute} with the given name and value to the characters in the specified range.</p>
* @param {Attribute} attribute
<p>An attribute object.</p>
*/
/**
* @method getText
* <p>Gets the value of the {@link Titanium.UI.AttributedString#property-text} property.</p>
* @returns {String}
*/
/**
* @method setText
* <p>Sets the value of the {@link Titanium.UI.AttributedString#property-text} property.</p>
* @param {String} text
<p>New value for the property.</p>
*/
/**
* @method getAttributes
* <p>Gets the value of the {@link Titanium.UI.AttributedString#property-attributes} property.</p>
* @returns {Attribute[]}
*/
/**
* @method setAttributes
* <p>Sets the value of the {@link Titanium.UI.AttributedString#property-attributes} property.</p>
* @param {Array<Attribute>} attributes
<p>New value for the property.</p>
*/
/**
* @property text
* @type String
* <p>The text applied to the attributed string.</p>
* @description <p>The <code>text</code> property must be set in the constructor and cannot be changed.</p>
*/
/**
* @property attributes
* @type Attribute[]
* <p>An array of attributes to add.</p>
* @description <p>Internally, this calls the {@link Titanium.UI.AttributedString#method-addAttribute addAttribute}
method for each of the attributes passed in.</p>
*/
/**
* @class Titanium.UI.Button
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Button.yml
* <p>A button widget that has four states: normal, disabled, focused and selected.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/button/button_android.png" height="50" /></td>
<td><img src="images/button/button_ios.png" height="50" /></td>
<td><img src="images/button/button_mobileweb.png" height="50" /></td>
<td><img src="images/button/button_wp.png" height="50" /></td>
</tr>
<tr><th>Android</th><th>iOS</th><th>Mobile Web</th><th>Windows Phone</th></tr>
</table>
<p>A button displays its selected state while it is being pressed. The focused state is
only used on Android devices that have navigation keys or a keyboard, to indicate
which button has input focus.</p>
<p>You can specify background images for each state, as well as button text and a button
icon. On iOS, there are button styles which define appearance for each state, even if
no button images are set.</p>
<p>Use the {@link Titanium.UI#method-createButton} method or a <strong><code><Button></code></strong> Alloy element to create a button
(see <a href="#!/api/Titanium.UI.Button-examples">Examples</a>) .</p>
<h4>Android and Mobile Web Platform Notes</h4>
<p>Android and Mobile Web use default button images for the normal, focused, selected and disabled
states. If you use a custom button image, you should specify versions for the focused
and selected states (and the disabled state, if the button is ever disabled).</p>
<p>Android and Mobile Web also support setting the background color for each of the states. These are not
supported on iOS.</p>
<h4>iOS Platform Notes</h4>
<p>iOS buttons have two special properties, <code>style</code> and <code>systemButton</code>.</p>
<p>The <code>style</code> property specifies the type of button decoration, and can be set to one
of the values described in {@link Titanium.UI.iOS.SystemButtonStyle}. On iOS 6 and earlier, the
default <code>SystemButtonStyle</code> is {@link Titanium.UI.iOS.SystemButtonStyle#property-BORDERED BORDERED}, which
decorates the button with a rounded rectangle. On iOS 7, the rounded rectangle button has been deprecated.</p>
<div style="text-align: center; margin-bottom: 10px">
<div style="display: table-cell; width: 240px">
<img src="images/button/rounded_rect_button_2x.png"/>
<p style="font-weight: bold;">iOS 6 rounded rectangle button</p>
</div>
<div style="display: table-cell;">
<img src="images/button/system_button_2x.png"/>
<p style="font-weight: bold;">iOS 7 system button</p>
</div>
<p></div></p>
<p>On iOS 6, button style decorations are drawn above the background gradient and background color,
and below any background images. This means, for example, that setting the {@link Titanium.UI.Button#property-backgroundColor}
only affects the areas outside the rounded border; on iOS 7, however, setting the background color
affects the button's entire bounding box area. This difference can produce unexpected results on
iOS 6 if the button's label color is white, as shown below:</p>
<div style="text-align: center; margin-bottom: 10px">
<div style="display: table-cell; width: 240px">
<img src="images/button/ios6_invisible.png"/>
<p style="font-weight: bold;">iOS 6 rounded rectangle button</p>
</div>
<div style="display: table-cell;">
<img src="images/button/ios7_good.png"/>
<p style="font-weight: bold;">iOS 7 system button</p>
</div>
<p></div></p>
<p>Depending on the design requirements, there are a couple of solutions to this:</p>
<ul>
<li>To make the button on iOS 6 match the iOS 7 style, set the button's {@link Titanium.UI.iOS.SystemButtonStyle}
property to {@link Titanium.UI.iOS.SystemButtonStyle#property-PLAIN PLAIN}. This removes all decoration from
the button so that it looks the same on both types of devices.</li>
<li>To make the button on iOS 7 match the rounded rectangle style of iOS 6, set
{@link Titanium.UI.iOS.SystemButtonStyle} to {@link Titanium.UI.iOS.SystemButtonStyle#property-PLAIN PLAIN} and
and assign a custom image to {@link Titanium.UI.Button#property-backgroundImage}. </li>
</ul>
<p>To use a custom button style, such as a background gradient, you may need to explicitly set
the button's <code>style</code> property to <code>PLAIN</code>, to prevent the button style from overriding any background color or gradient. </p>
<p>Also note:</p>
<ul>
<li>When assigning a custom image to the <code>backgroundImage</code> property, the image must be
partially or wholly transparent for the background color or background gradient to be visible.</li>
<li>Similarly, for an assigned background gradient to show through, the <code>backgroundColor</code> may need to be
set to 'transparent'.</li>
</ul>
<p>Unlike Android and Mobile Web, iOS doesn't supply any default background images for buttons--
system button styles serve this purpose. </p>
<p>The <code>systemButton</code> property lets you create a predefined system-defined button,
such as the <strong>Camera</strong> or <strong>Add</strong> buttons, for use in toolbars and nav bars.
Specifically, system buttons may be used in the following locations:</p>
<ul>
<li>{@link Titanium.UI.iOS.Toolbar}. The <code>items</code> array can contain system buttons.</li>
<li>{@link Titanium.UI.iPad.Popover}. The <code>leftNavButton</code> and <code>rightNavButton</code> properties can
refer to system buttons</li>
<li>{@link Titanium.UI.iPad.SplitWindow}. The <code>toolbar</code> array can contain system buttons.</li>
<li>{@link Titanium.UI.TextField}. The <code>keyboardToolbar</code> array can contain system buttons.</li>
<li>{@link Titanium.UI.TextArea}. The <code>keyboardToolbar</code> array can contain system buttons.</li>
<li>{@link Titanium.UI.Window}. The <code>leftNavButton</code> and <code>rightNavButton</code> properties can refer to
system buttons and the <code>toolbar</code> array can contain system buttons.</li>
</ul>
<p>Use the constants in {@link Titanium.UI.iOS.SystemButton}
to specify a button type. The size, style and decoration of system buttons is set
automatically, so you can create a button by setting only the <code>systemButton</code> property.</p>
<p>For example:</p>
<pre><code>var cancelButton = Ti.UI.createButton({ systemButton: Ti.UI.iOS.SystemButton.CANCEL });
</code></pre>
<p>In Alloy, you can omit the namespace when setting the <code>systemButton</code> property: </p>
<pre><code><Button id="cancelbtn" systemButton="CANCEL"></Button>
</code></pre>
<p>Note that the <code>systemButton</code> property specifies <em>appearance</em>, not behavior. For
example, to bring up the camera when the user presses the <strong>Camera</strong> button, you must
add an event listener to the button and call {@link Titanium.Media#method-showCamera} when the
button is clicked.</p>
<h5>iOS Pressed Button Effects</h5>
<p>If you do not supply separate background images for the normal and selected states,
iOS supplies a built-in effect for pressed buttons. For most iOS buttons, the effect
dims the entire button (except for the text) while the button is being pressed.</p>
<p>For toolbar buttons that use the {@link Titanium.UI.iOS.SystemButtonStyle#property-PLAIN PLAIN} style
or use system icons such as {@link Titanium.UI.iOS.SystemButton#property-CAMERA CAMERA}, a glow effect is
used. The glow effect shows as a white circular glow or highlight at the center of the button
when the button is pressed. </p>
* <h3>Examples</h3>
<h4>Simple Button Example</h4>
<pre><code>var button = Titanium.UI.createButton({
title: 'Hello',
top: 10,
width: 100,
height: 50
});
button.addEventListener('click',function(e)
{
Titanium.API.info("You clicked the button");
});</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<p>button.xml:</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white">
<!-- The title property can also be defined as node text. -->
<Button id="button" onClick="doClick" title="Hello"
top="10" width="100" height="50" />
</Window>
</Alloy>
</code></pre>
<p>button.js:</p>
<pre><code>function doClick(e){
Titanium.API.info("You clicked the button");
};
</code></pre>
*/
/**
* @method remove
* <p>Removes a child view from this view's hierarchy.</p>
* @description <p>See also: {@link Titanium.UI.Button#method-add add}, {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method add
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>Adding children to a <code>Button</code> is not supported on all platforms.</p>
<p>If you need to display views on top of this object, consider using
another view as a container for both this object and the views you want
to appear on top of it.</p>
<p>See also: {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getTintColor
* <p>Gets the value of the {@link Titanium.UI.Button#property-tintColor} property.</p>
* @returns {String}
* @platform android 5.4.0
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setTintColor
* <p>Sets the value of the {@link Titanium.UI.Button#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
* @platform android 5.4.0
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getBackgroundDisabledImage
* <p>Gets the value of the {@link Titanium.UI.Button#property-backgroundDisabledImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setBackgroundDisabledImage
* <p>Sets the value of the {@link Titanium.UI.Button#property-backgroundDisabledImage} property.</p>
* @param {String} backgroundDisabledImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getBackgroundFocusedImage
* <p>Gets the value of the {@link Titanium.UI.Button#property-backgroundFocusedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setBackgroundFocusedImage
* <p>Sets the value of the {@link Titanium.UI.Button#property-backgroundFocusedImage} property.</p>
* @param {String} backgroundFocusedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getBackgroundImage
* <p>Gets the value of the {@link Titanium.UI.Button#property-backgroundImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundImage
* <p>Sets the value of the {@link Titanium.UI.Button#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedImage
* <p>Gets the value of the {@link Titanium.UI.Button#property-backgroundSelectedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setBackgroundSelectedImage
* <p>Sets the value of the {@link Titanium.UI.Button#property-backgroundSelectedImage} property.</p>
* @param {String} backgroundSelectedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getDisabledColor
* <p>Gets the value of the {@link Titanium.UI.Button#property-disabledColor} property.</p>
* @returns {String}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setDisabledColor
* <p>Sets the value of the {@link Titanium.UI.Button#property-disabledColor} property.</p>
* @param {String} disabledColor
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getEnabled
* <p>Gets the value of the {@link Titanium.UI.Button#property-enabled} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setEnabled
* <p>Sets the value of the {@link Titanium.UI.Button#property-enabled} property.</p>
* @param {Boolean} enabled
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getSelectedColor
* <p>Gets the value of the {@link Titanium.UI.Button#property-selectedColor} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setSelectedColor
* <p>Sets the value of the {@link Titanium.UI.Button#property-selectedColor} property.</p>
* @param {String} selectedColor
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getShadowColor
* <p>Gets the value of the {@link Titanium.UI.Button#property-shadowColor} property.</p>
* @returns {String}
* @platform android 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method setShadowColor
* <p>Sets the value of the {@link Titanium.UI.Button#property-shadowColor} property.</p>
* @param {String} shadowColor
<p>New value for the property.</p>
* @platform android 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method getShadowOffset
* <p>Gets the value of the {@link Titanium.UI.Button#property-shadowOffset} property.</p>
* @returns {Dictionary}
* @platform android 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method setShadowOffset
* <p>Sets the value of the {@link Titanium.UI.Button#property-shadowOffset} property.</p>
* @param {Dictionary} shadowOffset
<p>New value for the property.</p>
* @platform android 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method getShadowRadius
* <p>Gets the value of the {@link Titanium.UI.Button#property-shadowRadius} property.</p>
* @returns {Number}
* @platform android 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method setShadowRadius
* <p>Sets the value of the {@link Titanium.UI.Button#property-shadowRadius} property.</p>
* @param {Number} shadowRadius
<p>New value for the property.</p>
* @platform android 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.UI.Button#property-style} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.UI.Button#property-style} property.</p>
* @param {Number} style
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getSystemButton
* <p>Gets the value of the {@link Titanium.UI.Button#property-systemButton} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setSystemButton
* <p>Sets the value of the {@link Titanium.UI.Button#property-systemButton} property.</p>
* @param {Number} systemButton
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getColor
* <p>Gets the value of the {@link Titanium.UI.Button#property-color} property.</p>
* @returns {String}
*/
/**
* @method setColor
* <p>Sets the value of the {@link Titanium.UI.Button#property-color} property.</p>
* @param {String} color
<p>New value for the property.</p>
*/
/**
* @method getFont
* <p>Gets the value of the {@link Titanium.UI.Button#property-font} property.</p>
* @returns {Font}
*/
/**
* @method setFont
* <p>Sets the value of the {@link Titanium.UI.Button#property-font} property.</p>
* @param {Font} font
<p>New value for the property.</p>
*/
/**
* @method getImage
* <p>Gets the value of the {@link Titanium.UI.Button#property-image} property.</p>
* @returns {String/Titanium.Blob}
*/
/**
* @method setImage
* <p>Sets the value of the {@link Titanium.UI.Button#property-image} property.</p>
* @param {String/Titanium.Blob} image
<p>New value for the property.</p>
*/
/**
* @method getTextAlign
* <p>Gets the value of the {@link Titanium.UI.Button#property-textAlign} property.</p>
* @returns {String/Number}
*/
/**
* @method setTextAlign
* <p>Sets the value of the {@link Titanium.UI.Button#property-textAlign} property.</p>
* @param {String/Number} textAlign
<p>New value for the property.</p>
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.Button#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.Button#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getTitleid
* <p>Gets the value of the {@link Titanium.UI.Button#property-titleid} property.</p>
* @returns {String}
* @platform android 1.5
* @platform iphone 1.5
* @platform ipad 1.5
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTitleid
* <p>Sets the value of the {@link Titanium.UI.Button#property-titleid} property.</p>
* @param {String} titleid
<p>New value for the property.</p>
* @platform android 1.5
* @platform iphone 1.5
* @platform ipad 1.5
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getVerticalAlign
* <p>Gets the value of the {@link Titanium.UI.Button#property-verticalAlign} property.</p>
* @returns {Number/String}
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setVerticalAlign
* <p>Sets the value of the {@link Titanium.UI.Button#property-verticalAlign} property.</p>
* @param {Number/String} verticalAlign
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [tintColor=]
* @type String
* <p>Button tint color.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of UIView on iOS. If no value is specified,
the tintColor of the View is inherited from its superview. </p>
* @platform android 5.4.0
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property [backgroundDisabledImage=If `backgroundDisabledImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is disabled.
]
* @type String
* <p>Background image for the button in its disabled state, specified as a local file path
or URL. </p>
* @description <p>Also sets the background image for the other button states (normal, focused, selected),
unless they've been specified explicitly, except for iOS, which requires a backgroundImage.</p>
* @platform android 0.9
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [backgroundFocusedImage=If `backgroundFocusedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is focused.
]
* @type String
* <p>Background image for the button in its focused state, specified as a local file path
or URL. </p>
* @description <p>Focusable must be true for normal views. Sets the background image for the focused
state only. For iOS, since there is not a trackball, this does nothing.</p>
* @platform android 0.9
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [backgroundImage=Default behavior when `backgroundImage` is unspecified depends on the type of view and
the platform. For generic views, no image is used. For most controls (buttons, text
fields, and so on), platform-specific default images are used.
]
* @type String
* <p>Background image for the button in its normal state, specified as a local file path or URL. </p>
* @description <p>Also sets the background image for the other button states (disabled, focused, selected),
unless they've been specified explicitly. On iOS, if backgroundDisabledImage is unset, the
image will appear faded to indicate being disabled. Also on iOS, if backgroundSelectedImage
is unset, the image will be darkened to indicate being selected.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedImage=If `backgroundSelectedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is selected.
]
* @type String
* <p>Background image for the button in its selected state, specified as a local file
path or URL. </p>
* @description <p>On Android, Focusable must be true in order to be selected. Sets the background image for the selected
state only.</p>
* @platform android 0.9
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property disabledColor
* @type String
* <p>Text color of the button in its disabled state, as a color name or hex triplet.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [enabled=true]
* @type Boolean
* <p>Set to <code>true</code> to enable the button, <code>false</code> to disable the button.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property selectedColor
* @type String
* <p>Button text color used to indicate the selected state, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property shadowColor
* @type String
* <p>Shadow color of the {@link Titanium.UI.Button#property-title title}, as a color name or hex triplet.</p>
* @description <p>Use in conjunction with {@link Titanium.UI.Button#property-shadowOffset shadowOffset} and {@link Titanium.UI.Button#property-shadowRadius shadowRadius}.
For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @property shadowOffset
* @type Dictionary
* <p>Shadow offset of the {@link Titanium.UI.Button#property-title title}, as a dictionary with the properties <code>x</code> and <code>y</code>.</p>
* @description <p>Use in conjunction with {@link Titanium.UI.Button#property-shadowColor shadowColor} and {@link Titanium.UI.Button#property-shadowRadius shadowRadius}.</p>
* @platform android 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @property shadowRadius
* @type Number
* <p>Shadow radius of the {@link Titanium.UI.Button#property-title title}.</p>
* @description <p>Use in conjunction with {@link Titanium.UI.Button#property-shadowColor shadowColor} and {@link Titanium.UI.Button#property-shadowOffset shadowOffset}.</p>
* @platform android 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @property style
* @type Number
* <p>Style constant for the button, as defined in {@link Titanium.UI.iOS.SystemButtonStyle}.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property systemButton
* @type Number
* <p>Specifies an iOS system button appearance, as defined in {@link Titanium.UI.iOS.SystemButton}.</p>
* @description <p>In JavaScript:</p>
<pre><code>var cancelButton = Ti.UI.createButton({
systemButton: Ti.UI.iOS.SystemButton.CANCEL
});
</code></pre>
<p>In Alloy, you can omit the namespace when setting the <code>systemButton</code> property on a <code><Button></code>
element:</p>
<pre><code><Button systemButton="CAMERA"/>
</code></pre>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS.SystemButton#property-ACTION}
<li> {@link Titanium.UI.iOS.SystemButton#property-ACTIVITY}
<li> {@link Titanium.UI.iOS.SystemButton#property-ADD}
<li> {@link Titanium.UI.iOS.SystemButton#property-BOOKMARKS}
<li> {@link Titanium.UI.iOS.SystemButton#property-CAMERA}
<li> {@link Titanium.UI.iOS.SystemButton#property-CANCEL}
<li> {@link Titanium.UI.iOS.SystemButton#property-COMPOSE}
<li> {@link Titanium.UI.iOS.SystemButton#property-CONTACT_ADD}
<li> {@link Titanium.UI.iOS.SystemButton#property-DISCLOSURE}
<li> {@link Titanium.UI.iOS.SystemButton#property-DONE}
<li> {@link Titanium.UI.iOS.SystemButton#property-EDIT}
<li> {@link Titanium.UI.iOS.SystemButton#property-FAST_FORWARD}
<li> {@link Titanium.UI.iOS.SystemButton#property-FIXED_SPACE}
<li> {@link Titanium.UI.iOS.SystemButton#property-FLEXIBLE_SPACE}
<li> {@link Titanium.UI.iOS.SystemButton#property-INFO_DARK}
<li> {@link Titanium.UI.iOS.SystemButton#property-INFO_LIGHT}
<li> {@link Titanium.UI.iOS.SystemButton#property-ORGANIZE}
<li> {@link Titanium.UI.iOS.SystemButton#property-PAUSE}
<li> {@link Titanium.UI.iOS.SystemButton#property-PLAY}
<li> {@link Titanium.UI.iOS.SystemButton#property-REFRESH}
<li> {@link Titanium.UI.iOS.SystemButton#property-REPLY}
<li> {@link Titanium.UI.iOS.SystemButton#property-REWIND}
<li> {@link Titanium.UI.iOS.SystemButton#property-SAVE}
<li> {@link Titanium.UI.iOS.SystemButton#property-SPINNER}
<li> {@link Titanium.UI.iOS.SystemButton#property-STOP}
<li> {@link Titanium.UI.iOS.SystemButton#property-TRASH}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property color
* @type String
* <p>Default button text color, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property font
* @type Font
* <p>Font to use for the button text.</p>
*/
/**
* @property image
* @type String/Titanium.Blob
* <p>Image to display on the button, specified as a local path, URL or a <code>Blob</code>.</p>
* @description <p>The image is displayed to the left of the title.</p>
<p>Support for using {@link Titanium.Blob} for this property is only available on Android and iOS.</p>
*/
/**
* @property [textAlign={@link Titanium.UI#property-TEXT_ALIGNMENT_CENTER}]
* @type String/Number
* <p>Text alignment, specified using one of the {@link Titanium.UI} text alignment constants.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_CENTER}
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_LEFT}
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_RIGHT}
</ul></p>
*/
/**
* @property title
* @type String
* <p>Button title.</p>
*/
/**
* @property titleid
* @type String
* <p>Key identifying a string from the locale file to use for the button title.</p>
* @description <p>Only one of <code>title</code> or <code>titleid</code> should be specified.</p>
* @platform android 1.5
* @platform iphone 1.5
* @platform ipad 1.5
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [verticalAlign=Titanium.UI.TEXT_VERTICAL_ALIGNMENT_CENTER]
* @type Number/String
* <p>Vertical alignment for the text field, specified using one of the
vertical alignment constants from {@link Titanium.UI}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_BOTTOM}
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_CENTER}
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_TOP}
</ul></p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.UI.ButtonBar
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ButtonBar.yml
* <p>An iOS button bar component.</p>
* @description <p>The button bar is a set of buttons joined into a single control. Each button in a
button bar can have a text label or an icon, but not both. </p>
<p>Use the {@link Titanium.UI#method-createButtonBar} method or <strong><code><ButtonBar></code></strong> Alloy element to create a button bar.</p>
<p>The {@link Titanium.UI.iOS.TabbedBar TabbedBar} control is a button bar where the
last selected button mantains a pressed or selected state. The following discussion
applies to both button bar and tabbed bar.</p>
<p>The buttons share a common style, defined by the <code>style</code> property. This can be
set to one of the constants defined in
{@link Titanium.UI.iOS.SystemButtonStyle Titanium.UI.iOS.SystemButtonStyle}:</p>
<ul>
<li><code>PLAIN</code>. Default style for <code>ButtonBar</code> and <code>TabbedBar</code>.</li>
<li><code>BORDERED</code>. Creates a bar like the <code>PLAIN</code> bar, but with a heavier border.</li>
<li><code>BAR</code>. Creates a more compact bar with
translucent buttons that allow the bar's background color to show through.</li>
</ul>
<p>If you want the background color or background gradient of the button bar itself
to show through, the style must be set to <Titanium.UI.iOS.SystemButtonStyle.BAR>.</p>
<p>Note that you cannot style individual buttons in a button bar. If you want to give a
distinct visual style to individual buttons, to use an icon and text on the same button,
or to use a button-bar type component on a platform other than iOS, you can use a set
of individual {@link Titanium.UI.Button Button} controls wrapped in a
{@link Titanium.UI.View View} to create the appearance of a button bar.</p>
* <h3>Examples</h3>
<h4>Simple 3 button button bar</h4>
<pre><code>var bb1 = Titanium.UI.createButtonBar({
labels:['One', 'Two', 'Three'],
backgroundColor:'#336699',
top:50,
style:Titanium.UI.iOS.SystemButtonStyle.BAR,
height:25,
width:200
});
win.add(bb1);</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<pre><code><Alloy>
<Window id="win">
<ButtonBar id="bb1" platform="ios" backgroundColor="#369" top="50" height="25" width="200">
<!-- The Labels tag sets the ButtonBar.labels property -->
<Labels>
<!-- Specify text with node text or the title attribute. -->
<!-- Can also specify the enabled, image and width attributes. -->
<Label>One</Label>
<Label>Two</Label>
<Label>Three</Label>
</Labels>
<!-- Place additional views for the ButtonBar here. -->
</ButtonBar>
</Window>
</Alloy>
</code></pre>
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event click
* <p>Fired when a button is clicked.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} index
<p>Index of the clicked button.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getIndex
* <p>Gets the value of the {@link Titanium.UI.ButtonBar#property-index} property.</p>
* @returns {Number}
*/
/**
* @method setIndex
* <p>Sets the value of the {@link Titanium.UI.ButtonBar#property-index} property.</p>
* @param {Number} index
<p>New value for the property.</p>
*/
/**
* @method getLabels
* <p>Gets the value of the {@link Titanium.UI.ButtonBar#property-labels} property.</p>
* @returns {String[]/BarItemType[]}
*/
/**
* @method setLabels
* <p>Sets the value of the {@link Titanium.UI.ButtonBar#property-labels} property.</p>
* @param {Array<String>/Array<BarItemType>} labels
<p>New value for the property.</p>
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.UI.ButtonBar#property-style} property.</p>
* @deprecated 3.4.1 The style property no longer has any effect on iOS 7 and greater.
* @returns {Number}
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.UI.ButtonBar#property-style} property.</p>
* @deprecated 3.4.1 The style property no longer has any effect on iOS 7 and greater.
* @param {Number} style
<p>New value for the property.</p>
*/
/**
* @property index
* @type Number
* <p>Index of the currently selected button.</p>
*/
/**
* @property labels
* @type String[]/BarItemType[]
* <p>Array of labels for the button bar.</p>
* @description <p>The labels can be specified either using an array of strings, in which case
each string defines the title for a button, or using an array of simple
dictionary objects, {@link BarItemType}, which can specify title, image, width and
enabled state for each button. </p>
<p>In Alloy you specify the labels with a nested <code><Labels></code> element that contains one or more <code><Label></code> elements.</p>
<pre><code><Alloy>
<ButtonBar platform="ios">
<Labels>
<!-- Specify text with node text or "title" attribute. -->
<Label>button 1</Label>
<Label title="button 2"/>
<!-- uses images and/or widths -->
<Label width="40" image="/KS_nav_ui.png"/>
<!-- set as disabled -->
<Label enabled="false">disabled</Label>
<!-- empty labels will print a warning (no properties) -->
<!-- <Label/> -->
</Labels>
</ButtonBar>
</Alloy>
</code></pre>
*/
/**
* @property [style=Titanium.UI.iOS.SystemButtonStyle.PLAIN]
* @type Number
* <p>Style of the button bar.</p>
* @deprecated 3.4.1 The style property no longer has any effect on iOS 7 and greater.
* <p> <b>Requires:</b>
iOS 6.1 and earlier
</p>
* @description <p>Specify one of the constants defined in
{@link Titanium.UI.iOS.SystemButtonStyle Titanium.UI.iOS.SystemButtonStyle},
either <code>PLAIN</code>, <code>BORDERED</code>, or <code>BAR</code>.</p>
<p>The <code>BAR</code> style specifies a more compact style and allows the bar's background
color or gradient to show through.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS.SystemButtonStyle#property-BORDERED}
<li> {@link Titanium.UI.iOS.SystemButtonStyle#property-DONE}
<li> {@link Titanium.UI.iOS.SystemButtonStyle#property-PLAIN}
</ul></p>
*/
/**
* @class Titanium.UI.Clipboard
* @platform android 1.5
* @platform iphone 1.5
* @platform ipad 1.5
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Clipboard/Clipboard.yml
* <p>A module used for accessing clipboard data.</p>
* @description <p>The Clipboard is a temporary data store, used to save a single item of data that may then
be accessed by the user using UI copy and paste interactions within an app or between apps.</p>
<p>On iOS and Mobile Web, the module's <code>*Data()</code> methods enable multiple representations of the
same data item to be stored together with their respective
<a href="http://en.wikipedia.org/wiki/Internet_media_type">MIME type</a> to describe their format. For
example, <code>'text'</code> and <code>'text/plain'</code> for text, and <code>'image/jpg'</code> and <code>'image/png'</code> for an image.</p>
<p>When working with text, either the <code>*Data()</code> methods may be used with a <code>'text/plain'</code> type, or
the <code>*Text()</code> methods without the need to specify the type.</p>
<p>Android currently only supports text type of data to be stored. </p>
<h4>Clipboard Data Types</h4>
<p>The <code>*Text()</code> methods are equivalent to calling <code>*Data()</code> with a <code>'text'</code> or <code>'text/plain'</code>
type. These work with plain Unicode strings. </p>
<p>An image is stored using the <code>'image'</code> type, or an explicit image MIME type, and is returned as
a {@link Titanium.Blob} (binary) type. </p>
<p>A URL is stored with the <code>'url'</code> or <code>'text/uri-list'</code> type, and is returned as a string. </p>
<p>Any data type that is specified but not correctly mapped to a clipboard type by the system is
retrieved as a {@link Titanium.Blob} type. </p>
* <h3>Examples</h3>
<h4>Copy Text to the Clipboard</h4>
<p>Clear the clipboard and output the resulting empty clipboard to console. </p>
<p>Then, store the string, "hello", to the clipboard and output it from the clipboard to the
console. </p>
<pre><code>Ti.API.info('Deleting all text in Clipboard');
Ti.UI.Clipboard.clearText();
Ti.API.info('Clipboard.getText(): ' + Ti.UI.Clipboard.getText()); // returns empty string on Android and undefined on iOS
Ti.API.info('Set text Clipboard to hello');
Ti.UI.Clipboard.setText('hello');
Ti.API.info('Clipboard.hasText(), should be true: ' + Ti.UI.Clipboard.hasText()); // returns true on Android and 1 on iOS
Ti.API.info('Clipboard.getText(), should be hello: ' + Ti.UI.Clipboard.getText());
</code></pre><h4>Set multiple items including privacy options (iOS 10 and later)</h4>
<p>The items are represented as an array that holds different objects of key-value items. Optionally,
you can set privacy options described in <code>Ti.UI.CLIPBOARD_OPTION_*</code>. Note that you can not have the
same two keys in one object and the key must match a valid mime-type. If no valid mime-type is specified </p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor : "#fff"
});
var btn1 = Ti.UI.createButton({
title : "Set clipboard items",
top: 40
});
var btn2 = Ti.UI.createButton({
title : "Get clipboard items",
top: 80
});
btn1.addEventListener("click", function() {
var localOnly = Ti.UI.CLIPBOARD_OPTION_LOCAL_ONLY;
var expirationDate = Ti.UI.CLIPBOARD_OPTION_EXPIRATION_DATE;
Ti.UI.Clipboard.setItems({
items: [{
"text/plain": "John",
},{
"text/plain": "Doe"
}],
options: {
localOnly: true,
expirationDate: new Date(2020, 04, 20)
}
});
});
btn2.addEventListener("click", function() {
alert(Ti.UI.Clipboard.getItems());
});
win.add(btn1);
win.add(btn2);
win.open();
</code></pre>
*/
/**
* @method hasURLs
* <p>Indicates whether any URLs are stored in the clipboard.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @returns {Boolean}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method hasImages
* <p>Indicates whether any images are stored in the clipboard.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @returns {Boolean}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method hasColors
* <p>Indicates whether any colors are stored in the clipboard.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @returns {Boolean}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setItems
* <p>Adds an array of items to a clipboard, and sets privacy options for all included items.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @description <p>You can pass multiple options to the options object. Note that this API is mime-type based.
The key must be a valid mime-type and the value must be the value that matches the given
mime-type. If no valid mime-type is provided a a key, receiving items with
{@link Titanium.UI.Clipboard#method-getItems} will crash the app. See the below example for more information
on the usage.</p>
* @param {ClipboardItemsType} items
* @platform iphone 5.5.0
* @platform ipad 5.5.0
*/
/**
* @method getItems
* <p>Gets the items that have been specified earlier using {@link Titanium.UI.Clipboard#method-setItems}.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @returns {Dictionary[]}
* @platform iphone 5.5.0
* @platform ipad 5.5.0
*/
/**
* @method clearData
* <p>Deletes data of the specified MIME type stored in the clipboard. If MIME type omitted, all
data is deleted.</p>
* @description <p>On Android, identical to <code>clearText</code> method.</p>
* @param {String} type (optional)
<p>MIME type. Ignored on Android.</p>
*/
/**
* @method clearText
* <p>Deletes all text data stored in the clipboard.</p>
* @description <p>This method deletes any data saved using the <code>setText</code> method, or that has a <code>text</code> or
<code>text/plain</code> MIME type.</p>
*/
/**
* @method getData
* <p>Gets data of the specified MIME type stored in the clipboard.</p>
* @param {String} type
<p>MIME type. Must be text type on Android.</p>
* @returns {String/Titanium.Blob}
*/
/**
* @method getText
* <p>Gets text data stored in the clipboard.</p>
* @returns {String}
*/
/**
* @method hasData
* <p>Indicates whether any data of the specified MIME type is stored in the clipboard.</p>
* @param {String} type
<p>MIME type. Must be text type on Android.</p>
* @returns {Boolean}
*/
/**
* @method hasText
* <p>Indicates whether any text data is stored in the clipboard.</p>
* @returns {Boolean}
*/
/**
* @method setData
* <p>Stores data of the specified MIME type in the clipboard.</p>
* @description <p>This method will overwrite any existing data for the specified MIME type. </p>
<p>Note that the clipboard is intended to store only one item of data at a time. This method
enables different representations/formats of a data item to be saved.</p>
* @param {String} type
<p>MIME type. Must be text type on Android.</p>
* @param {Object} data
<p>New item of data.</p>
*/
/**
* @method setText
* <p>Stores text data in the clipboard.</p>
* @description <p>This method will overwrite any existing text data.</p>
* @param {String} text
<p>New item of data.</p>
*/
/**
* @class ClipboardItemsType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Clipboard/Clipboard.yml
* <p>Dictionary describing the items for {@link Titanium.UI.Clipboard#method-setItems}.</p>
*/
/**
* @property items
* @type Dictionary[]
* <p>An array of key-value items to add to the clipboard. The key must a valid mime-type
matching the mime-type of the value.</p>
*/
/**
* @property options
* @type Dictionary
* <p>The privacy options to apply to all the items on the clipboard. The available options are
described in <code>Ti.UI.CLIPBOARD_OPTION_*</code>. Depending on the key, the value can be a Date or
Boolean.</p>
*/
/**
* @class Titanium.UI.CoverFlowView
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/CoverFlowView.yml
* <p>The cover flow view is a container showing animated three-dimensional images in a style
consistent with the cover flow presentation used for iPod, iTunes, and file browsing.</p>
* @deprecated 1.8.0 Use <Titanium.UI.iOS.CoverFlowView> instead.
* @description <p>Use the {@link Titanium.UI#method-createCoverFlowView} method to create a cover flow view.</p>
* <h3>Examples</h3>
<h4>Simple 3 image cover flow example</h4>
<p>Create a simple cover flow view.</p>
<pre><code>var view = Titanium.UI.createCoverFlowView({
images:['a.png','b.png','c.png'],
backgroundColor:'#000'
});
window.add(view);
</code></pre>
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event click
* <p>Fired when the user clicks on the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} index
<p>Index of the image that is now visible.</p>
* @param {Number} previous
<p>Index of the previously-visible image.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event change
* <p>Fired when the user changes the image using a gesture.</p>
* @param {Number} index
<p>Index of the image that is now visible.</p>
* @param {Number} previous
<p>Index of the previously-visible image.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method setImage
* <p>Changes the image for a specified index.</p>
* @description <p>To specify a size for the image, you may pass the image as a simple dictionary, as
defined in {@link CoverFlowImageType}. If you specify a size, the size must be exact,
not a percentage size.</p>
<p>If the image is passed as a <code>File</code> object or file path, the filename is checked.
filename includes the '@2x' or '@3x' string used to identify high-resolution images
for the Retina (HD) display, the image is treated accordingly.</p>
* @param {Number} index
<p>Index to add the image at.</p>
* @param {String/Titanium.Blob/Titanium.Filesystem.File/CoverFlowImageType} image
<p>Image to add at this index.</p>
*/
/**
* @method getImages
* <p>Gets the value of the {@link Titanium.UI.CoverFlowView#property-images} property.</p>
* @returns {String[]/Titanium.Blob[]/Titanium.Filesystem.File[]/CoverFlowImageType[]}
*/
/**
* @method setImages
* <p>Sets the value of the {@link Titanium.UI.CoverFlowView#property-images} property.</p>
* @param {Array<String>/Array<Titanium.Blob>/Array<Titanium.Filesystem.File>/Array<CoverFlowImageType>} images
<p>New value for the property.</p>
*/
/**
* @method getSelected
* <p>Gets the value of the {@link Titanium.UI.CoverFlowView#property-selected} property.</p>
* @returns {Number}
*/
/**
* @method setSelected
* <p>Sets the value of the {@link Titanium.UI.CoverFlowView#property-selected} property.</p>
* @param {Number} selected
<p>New value for the property.</p>
*/
/**
* @property images
* @type String[]/Titanium.Blob[]/Titanium.Filesystem.File[]/CoverFlowImageType[]
* <p>Array of images to display in the view.</p>
*/
/**
* @property selected
* @type Number
* <p>Index to make selected.</p>
*/
/**
* @class Titanium.UI.DashboardItem
* @platform iphone 1.2
* @platform ipad 1.2
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/DashboardItem.yml
* <p>A dashboard item is a view that is displayed as an icon in a {@link Titanium.UI.DashboardView}.</p>
* @description <p>A DashboardItem is created using the {@link Titanium.UI#method-createDashboardItem} method or <strong><code><DashboardItem></code></strong> Alloy element.</p>
*/
/**
* @event click
* <p>Fired when a click is detected against the view.</p>
* @param {Dictionary} location
<p>Coordinates <code>x</code> and <code>y</code> of the event from the parent view's coordinate system.</p>
* @param {Titanium.UI.DashboardItem} item
<p>Item that was clicked.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event delete
* <p>Fired when an item is deleted during editing mode.</p>
* @param {Titanium.UI.DashboardItem} item
<p>Item that was deleted.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event move
* <p>Fired when an item is moved during editing mode.</p>
* @param {Array<Titanium.UI.DashboardItem>} items
<p>List of items to be committed, possibly in new order, when edit mode ends.</p>
* @param {Titanium.UI.DashboardItem} item
<p>Item that was moved.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method getBadge
* <p>Gets the value of the {@link Titanium.UI.DashboardItem#property-badge} property.</p>
* @returns {Number}
*/
/**
* @method setBadge
* <p>Sets the value of the {@link Titanium.UI.DashboardItem#property-badge} property.</p>
* @param {Number} badge
<p>New value for the property.</p>
*/
/**
* @method getCanDelete
* <p>Gets the value of the {@link Titanium.UI.DashboardItem#property-canDelete} property.</p>
* @returns {Boolean}
*/
/**
* @method setCanDelete
* <p>Sets the value of the {@link Titanium.UI.DashboardItem#property-canDelete} property.</p>
* @param {Boolean} canDelete
<p>New value for the property.</p>
*/
/**
* @method getImage
* <p>Gets the value of the {@link Titanium.UI.DashboardItem#property-image} property.</p>
* @returns {String/Titanium.Blob}
*/
/**
* @method setImage
* <p>Sets the value of the {@link Titanium.UI.DashboardItem#property-image} property.</p>
* @param {String/Titanium.Blob} image
<p>New value for the property.</p>
*/
/**
* @method getSelectedImage
* <p>Gets the value of the {@link Titanium.UI.DashboardItem#property-selectedImage} property.</p>
* @returns {String/Titanium.Blob}
*/
/**
* @method setSelectedImage
* <p>Sets the value of the {@link Titanium.UI.DashboardItem#property-selectedImage} property.</p>
* @param {String/Titanium.Blob} selectedImage
<p>New value for the property.</p>
*/
/**
* @property [badge=0]
* @type Number
* <p>Integer value displayed in a badge.</p>
* @description <p>Set to <code>0</code> to reset and remove the badge.</p>
*/
/**
* @property [canDelete=true]
* @type Boolean
* <p>Determines whether this item can be deleted when it edit mode.</p>
*/
/**
* @property image
* @type String/Titanium.Blob
* <p>Image or path to image to display in the item by default.</p>
*/
/**
* @property selectedImage
* @type String/Titanium.Blob
* <p>Image or path to image to display in the item as it is selected.</p>
*/
/**
* @class Titanium.UI.DashboardView
* @platform iphone 1.2
* @platform ipad 1.2
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/DashboardView.yml
* <p>A dashboard view is an iOS Springboard-like view of {@link Titanium.UI.DashboardItem} items that may
be deleted and reordered by the user using its built-in edit mode.</p>
* @description <p>The DashboardView is created using the {@link Titanium.UI#method-createDashboardView} method or <strong><code><DashboardView></code></strong>
Alloy element.</p>
<p>Dashboard view's edit mode may be activated by a longpress of a {@link Titanium.UI.DashboardItem} item,
unless this behavior has been disabled by the {@link Titanium.UI.DashboardView#property-editable editable}
property. As a dashboard view does not inherently provide a way to exit edit mode, this must be
explicitly defined.</p>
<p>When edit mode has been activated, the item icons wobble by default to act as a visual cue.
This behavior may be disabled using the {@link Titanium.UI.DashboardView#property-wobble wobble} property.</p>
<p>If a dashboard contains more than 9 items, it will be paged into screens in a 3 x 3 formation
using its built-in scrollable view. A paging control is added to the bottom of the view to
indicate the active page.</p>
<p>Note that a dashboard is only intended to be used in {@link Titanium.UI#property-PORTRAIT PORTRAIT}
orientation mode.</p>
* <h3>Examples</h3>
<h4>Dashboard Demo</h4>
<p>Create a toolbar with an edit/done button and a dashboard of items on a single screen.
Set the badge value for some items, and allow them to be reset with a click. Enter edit mode
with a longpress of a dashboard item (default behavior). Toggle edit mode with a click to
the toolbar button.</p>
<p>Copy the files in the KitchenSink
<a href="https://github.com/appcelerator/titanium_mobile/tree/master/demos/KitchenSink/Resources/images/dashboard">dashboard</a>
directory to the local project <code>/images/dashboard</code> directory.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: '#13386c'
});
var button = Ti.UI.createButton({
title: 'Edit',
style: Ti.UI.iOS.SystemButtonStyle.DONE,
});
var toolbar = Ti.UI.iOS.createToolbar({
items: [button],
top: 0
});
win.add(toolbar);
var label = Ti.UI.createLabel({
color: 'white',
font: { fontSize: 14 },
text: 'Click an item to reset badge\nPress and hold an item to enable edit mode',
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,
top: 55,
height: 40,
width: 300
});
win.add(label);
var dashboardData = [];
var itemData = [
{ name: 'account', badge: 10 },
{ name: 'cases', badge: 2 },
{ name: 'calls', badge: 2 },
{ name: 'contacts', badge: 5},
{ name: 'emps' },
{ name: 'leads' },
{ name: 'meetings', badge: 3 },
{ name: 'opps', badge: 126 }, // badge will be displayed as "99+"
{ name: 'tasks' }
];
for (var i = 0; i < itemData.length; i++) {
var item = Ti.UI.createDashboardItem({
badge: itemData[i].badge,
image: '/images/dashboard/' + itemData[i].name + '_off.png',
selectedImage: '/images/dashboard/' + itemData[i].name + '_on.png',
label: itemData[i].name
});
dashboardData.push(item);
}
var dashboard = Ti.UI.createDashboardView({
data: dashboardData,
wobble: true,
top: 100
});
win.add(dashboard);
var isEditable = false;
button.addEventListener('click', function(e) {
if (isEditable) {
dashboard.stopEditing();
} else {
dashboard.startEditing();
}
});
dashboard.addEventListener('edit', function(e) {
button.title = 'Done';
button.style = Ti.UI.iOS.SystemButtonStyle.DONE;
isEditable = true;
});
dashboard.addEventListener('commit', function(e) {
button.title = 'Edit';
button.style = Ti.UI.iOS.SystemButtonStyle.PLAIN;
isEditable = false;
});
dashboard.addEventListener('click', function(e) {
e.item.badge = 0;
});
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<p>dashboard.xml:</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="#13386c">
<Toolbar id="toolbar" top="0">
<Items>
<Button id="button" onClick="changeMode">Edit</Button>
</Items>
</Toolbar>
<Label id="label" color="white" top="55" height="40" width="300">
Click an item to reset badge\nPress and hold an item to enable edit mode
</Label>
<DashboardView id="dashboard" top="100" wobble="true"
onClick="resetBadge" onEdit="handleEdit" onCommit="handleCommit">
<DashboardItem image="account_off.png" selectedImage="account_on.png" badge="10" label="account"/>
<DashboardItem image="calls_off.png" selectedImage="calls_on.png" badge="110" label="calls"/>
<DashboardItem image="cases_off.png" selectedImage="cases_on.png" label="cases"/>
<DashboardItem image="contacts_off.png" selectedImage="contacts_on.png" badge="23" label="contacts"/>
<DashboardItem image="emps_off.png" selectedImage="emps_on.png" label="employees"/>
<DashboardItem image="leads_off.png" selectedImage="leads_on.png" badge="1" label="leads"/>
<DashboardItem image="meetings_off.png" selectedImage="meetings_on.png" badge="5" label="meetings"/>
<DashboardItem image="opps_off.png" selectedImage="opps_on.png" label="opps"/>
<DashboardItem image="tasks_off.png" selectedImage="tasks_on.png" label="tasks"/>
</DashboardView>
</Window>
</Alloy>
</code></pre>
<p>dashboard.js:</p>
<pre><code>var isEditable = false;
function changeMode(e) {
if (isEditable) {
$.dashboard.stopEditing();
} else {
$.dashboard.startEditing();
}
}
function handleEdit(e) {
$.button.title = 'Done';
$.button.style = Ti.UI.iOS.SystemButtonStyle.DONE;
isEditable = true;
}
function handleCommit(e) {
$.button.title = 'Edit';
$.button.style = Ti.UI.iOS.SystemButtonStyle.PLAIN;
isEditable = false;
}
function resetBadge(e) {
e.item.badge = 0;
}
</code></pre>
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event click
* <p>Fired when the device detects a click against the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Object} item
<p>Item that was clicked.</p>
* @param {Dictionary} location
<p>Coordinates x and y of the event from the parent view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event commit
* <p>Fired when edit mode ends.</p>
* @description <p>This event is invoked by the {@link Titanium.UI.DashboardView#method-stopEditing} method.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event delete
* <p>Fired when an item is deleted in edit mode.</p>
* @param {Titanium.UI.DashboardItem} item
<p>Item that was deleted.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event dragEnd
* <p>Fired when an item finishes being dragged in edit mode.</p>
* @deprecated 3.0.0
* @param {Titanium.UI.DashboardItem} item
<p>Item that was dragged.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event dragStart
* <p>Fired when an item starts being dragged in edit mode.</p>
* @deprecated 3.0.0
* @param {Titanium.UI.DashboardItem} item
<p>Item that was dragged.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event dragend
* <p>Fired when an item finishes being dragged in edit mode.</p>
* @param {Titanium.UI.DashboardItem} item
<p>Item that was dragged.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @event dragstart
* <p>Fired when an item starts being dragged in edit mode.</p>
* @param {Titanium.UI.DashboardItem} item
<p>Item that was dragged.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @event edit
* <p>Fired when edit mode starts.</p>
* @description <p>This event is invoked by a longpress of a {@link Titanium.UI.DashboardItem} item or the
{@link Titanium.UI.DashboardView#method-startEditing} method.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event move
* <p>Fired when an item is moved in edit mode.</p>
* @param {Titanium.UI.DashboardItem} item
<p>Item that was moved.</p>
* @param {Array<Titanium.UI.DashboardItem>} items
<p>List of items to be committed, possibly in new order, when edit mode ends.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event pagechanged
* <p>Fired when the current page of the dashboard view changes.</p>
* @param {Number} pageNo
<p>The current page number.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method startEditing
* <p>Enable edit mode.</p>
* @description <p>This method causes the {@link Titanium.UI.DashboardView#event-edit} event to fire.</p>
*/
/**
* @method stopEditing
* <p>Disable edit mode.</p>
* @description <p>This method causes the {@link Titanium.UI.DashboardView#event-commit} event to fire.</p>
*/
/**
* @method getColumnCount
* <p>Gets the value of the {@link Titanium.UI.DashboardView#property-columnCount} property.</p>
* @returns {Number}
* @platform iphone 3.0
* @platform ipad 3.0
*/
/**
* @method setColumnCount
* <p>Sets the value of the {@link Titanium.UI.DashboardView#property-columnCount} property.</p>
* @param {Number} columnCount
<p>New value for the property.</p>
* @platform iphone 3.0
* @platform ipad 3.0
*/
/**
* @method getRowCount
* <p>Gets the value of the {@link Titanium.UI.DashboardView#property-rowCount} property.</p>
* @returns {Number}
* @platform iphone 3.0
* @platform ipad 3.0
*/
/**
* @method setRowCount
* <p>Sets the value of the {@link Titanium.UI.DashboardView#property-rowCount} property.</p>
* @param {Number} rowCount
<p>New value for the property.</p>
* @platform iphone 3.0
* @platform ipad 3.0
*/
/**
* @method getData
* <p>Gets the value of the {@link Titanium.UI.DashboardView#property-data} property.</p>
* @returns {Titanium.UI.DashboardItem[]}
*/
/**
* @method setData
* <p>Sets the value of the {@link Titanium.UI.DashboardView#property-data} property.</p>
* @param {Array<Titanium.UI.DashboardItem>} data
<p>New value for the property.</p>
*/
/**
* @method getEditable
* <p>Gets the value of the {@link Titanium.UI.DashboardView#property-editable} property.</p>
* @returns {Boolean}
*/
/**
* @method setEditable
* <p>Sets the value of the {@link Titanium.UI.DashboardView#property-editable} property.</p>
* @param {Boolean} editable
<p>New value for the property.</p>
*/
/**
* @method getWobble
* <p>Gets the value of the {@link Titanium.UI.DashboardView#property-wobble} property.</p>
* @returns {Boolean}
*/
/**
* @method setWobble
* <p>Sets the value of the {@link Titanium.UI.DashboardView#property-wobble} property.</p>
* @param {Boolean} wobble
<p>New value for the property.</p>
*/
/**
* @property [columnCount=3]
* @type Number
* @creationOnly
* <p>The number of columns of items in the view.</p>
* @platform iphone 3.0
* @platform ipad 3.0
*/
/**
* @property [rowCount=3]
* @type Number
* @creationOnly
* <p>The number of rows of items in the view.</p>
* @platform iphone 3.0
* @platform ipad 3.0
*/
/**
* @property data
* @type Titanium.UI.DashboardItem[]
* <p>Items to display in this view.</p>
*/
/**
* @property [editable=true]
* @type Boolean
* <p>Determines whether edit mode is activated by a longpress of an item.</p>
* @description <p>Set to <code>false</code> to prevent a longpress from activating edit mode.</p>
*/
/**
* @property [wobble=true]
* @type Boolean
* <p>Determines whether the wobble visual editing cue is enabled in edit mode.</p>
* @description <p>Set to <code>false</code> to disable wobble effect.</p>
<p>Must be defined before edit mode is activated in order to take effect.</p>
*/
/**
* @class Titanium.UI.EmailDialog
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/EmailDialog.yml
* <p>An email dialog is a modal window that allows users to compose and send an email.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/emaildialog/emaildialog_android.png" height="150" style="border: 1px solid black;"/></td>
<td><img src="images/emaildialog/emaildialog_ios.png" height="150" style="border: 1px solid black;"/></td>
<td><img src="images/emaildialog/emaildialog_wp.png" height="150" style="border: 1px solid black;"/></td>
</tr>
<tr><th>Android</th><th>iOS</th><th>Windows Phone</th></tr>
</table>
<p>The Email Dialog is created with the {@link Titanium.UI#method-createEmailDialog} method. The user needs to
register an e-mail account on the device in order to open the dialog. The dialog will not
open when there is not a registered e-mail account.</p>
<p><strong>iOS Platform Notes</strong></p>
<p>On iOS, you cannot test the e-mail dialog on the iOS 8.0 simulator or greater. Test the email
dialog on device.</p>
<p><strong>Mobile Web Platform Notes</strong></p>
<p>On Mobile Web, the application will open the OS's default e-mail client.</p>
<p>The <code>to</code> addresses, <code>cc</code> addresses, <code>bcc</code> addresses, <code>subject</code>, and <code>body</code> are
appended together and formatted into a <code>mailto:</code> URL. This URL typically has a limit of
approximately 2000 characters.</p>
* <h3>Examples</h3>
<h4>Simple Email Dialog with Attachment</h4>
<p>Create and send an email with a file attachment.</p>
<pre><code>var emailDialog = Ti.UI.createEmailDialog()
emailDialog.subject = "Hello from Titanium";
emailDialog.toRecipients = ['foo@yahoo.com'];
emailDialog.messageBody = '<b>Appcelerator Titanium Rocks!</b>';
var f = Ti.Filesystem.getFile('cricket.wav');
emailDialog.addAttachment(f);
emailDialog.open();
</code></pre>
*/
/**
* @event longclick
* @hide
* <p>Fired when the device detects a long click.</p>
* @description <p>A long click is generated by touching and holding on the touchscreen or holding down the
trackball button. </p>
<p>The event occurs before the finger/button is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>As the trackball can fire this event, it is not intended to return the <code>x</code> and <code>y</code>
coordinates of the touch, even when it is generated by the touchscreen. </p>
<p>A <code>longclick</code> blocks a <code>click</code>, meaning that a <code>click</code> event will not fire when a
<code>longclick</code> listener exists.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event click
* @hide
* <p>Fired when the device detects a click against the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event focus
* @hide
* <p>Fired when the view element gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event postlayout
* @hide
* <p>Fired when a layout cycle is finished.</p>
* @description <p>This event is fired when the view and its ancestors have been laid out.
The {@link Titanium.UI.View#property-rect rect} and {@link Titanium.UI.View#property-size size} values
should be usable when this event is fired.</p>
<p>This event is typically triggered by either changing layout
properties or by changing the orientation of the device. Note that changing the
layout of child views or ancestors can also trigger a relayout of this view.
On Mobile Web, this event can also be triggered by resizing the browser window.</p>
<p>Note that altering any properties that affect layout from the <code>postlayout</code> callback
may result in an endless loop.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @event keypressed
* @hide
* <p>Fired when a hardware key is pressed in the view.</p>
* @description <p>A keypressed event is generated by pressing a hardware key. On Android, this event can only be
fired when the property {@link Titanium.UI.View#property-focusable focusable} is set to true. On iOS the
event is generated only when using {@link Titanium.UI.TextArea Ti.UI.TextArea}, {@link Titanium.UI.TextField Ti.UI.TextField}
and {@link Titanium.UI.SearchBar Ti.UI.SearchBar}.</p>
* @param {Number} keyCode
<p>The code for the physical key that was pressed. For more details, see <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a>. This API is experimental and subject to change.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @event complete
* <p>Fired when this email dialog has completed sending an email.</p>
* @description <p>On Mobile Web, as the platform cannot determine whether a message has been sent or not,
this event fires immediately after calling open() and always reports success.</p>
* @param {Boolean} success
<p>Indicates if the email was handled successfully.
Returns <code>true</code> if request succeeded, <code>false</code> otherwise. Note that emails being
deleted or saved for later do count as success.</p>
* @param {String} error
<p>Error message, if any returned. Will be undefined if <code>success</code> is <code>true</code>.</p>
* @param {Number} code
<p>Error code.
Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @param {Number} result
<p>Status of the email send process.</p>
<p>The <code>SAVED</code> and <code>CANCELLED</code> constants are iOS only.</p>
<p>On Android, this property will return <code>SENT</code> when the user discards or saves
a message.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.EmailDialog#property-CANCELLED}
<li> {@link Titanium.UI.EmailDialog#property-FAILED}
<li> {@link Titanium.UI.EmailDialog#property-SAVED}
<li> {@link Titanium.UI.EmailDialog#property-SENT}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method animate
* @hide
* <p>Animates this view.</p>
* @description <p>The {@link Titanium.UI.Animation Animation} object or dictionary passed to this method defines
the end state for the animation, the duration of the animation, and other properties.</p>
<p>Note that if you use <code>animate</code> to move a view, the view's actual <em>position</em> is changed, but
its layout properties, such as <code>top</code>, <code>left</code>, <code>center</code> and so on are not changed--these
reflect the original values set by the user, not the actual position of the view.</p>
<p>The {@link Titanium.UI.View#property-rect rect} property can be used to determine the actual size and
position of the view. Note that on Mobile Web, the <code>rect</code> property is not updated after
animation. This is a known issue <a href="https://jira.appcelerator.org/browse/TIMOB-8930">TIMOB-8930</a>.</p>
* @param {Titanium.UI.Animation/Dictionary<Titanium.UI.Animation>} animation
<p>Either a dictionary of animation properties or an
{@link Titanium.UI.Animation Animation} object.</p>
* @param {Callback<Object>} callback
<p>Function to be invoked upon completion of the animation.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method remove
* @hide
* <p>Removes a child view from this view's hierarchy.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method toImage
* @hide
* <p>Returns an image of the rendered view, as a Blob.</p>
* @description <p>The <code>honorScaleFactor</code> method is only supported on iOS.</p>
* @param {Callback<Titanium.Blob>} callback (optional)
<p>Function to be invoked upon completion. If non-null, this method will be performed
asynchronously. If null, it will be performed immediately.</p>
* @param {Boolean} honorScaleFactor (optional)
<p>Determines whether the image is scaled based on scale factor of main screen. (iOS only) </p>
<p>When set to true, image is scale factor is honored. When set to false, the image in the
blob has the same dimensions for retina and non-retina devices.</p>
* @returns {Titanium.Blob}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method convertPointToView
* @hide
* <p>Translates a point from this view's coordinate system to another view's coordinate system.</p>
* @description <p>Returns <code>null</code> if either view is not in the view hierarchy. </p>
<p>Keep in mind that views may be removed from the view hierarchy if their window is blurred
or if the view is offscreen (such as in some situations with {@link Titanium.UI.ScrollableView}).</p>
<p>If this view is a {@link Titanium.UI.ScrollView}, the view's x and y offsets are subtracted from
the return value.</p>
* @param {Point} point
<p>A point in this view's coordinate system. </p>
<p>If this argument is missing an <code>x</code> or <code>y</code> property, or the properties can not be
converted into numbers, an exception will be raised.</p>
* @param {Titanium.UI.View} destinationView
<p>View that specifies the destination coordinate system to convert to. If this argument
is not a view, an exception will be raised.</p>
* @returns {Point}
* @platform android 1.8
* @platform iphone 1.8
* @platform ipad 1.8
* @platform mobileweb 2.0
* @platform windowsphone 4.1.0
*/
/**
* @method add
* @hide
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>The child view is added as the last child in this view's hierarchy. </p>
<p>Although all views inherit from {@link Titanium.UI.View}, not all views are capable of
containing other views. In particular:</p>
<ul>
<li>Some views are not designed to be containers at all.</li>
<li>Some views are special-purpose containers that can only contain certain other
views.</li>
<li>Some views are top-level containers that cannot (or should not) be added to other views.</li>
</ul>
<h4>Non-Container Views</h4>
<p>The following views are not intended to act as containers that can hold other
views:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator ActivityIndicator}</li>
<li>{@link Titanium.UI.Button Button}</li>
<li>{@link Titanium.UI.ImageView ImageView}</li>
<li>{@link Titanium.UI.Label Label}</li>
<li>{@link Titanium.UI.ProgressBar ProgressBar}</li>
<li>{@link Titanium.UI.SearchBar SearchBar}</li>
<li>{@link Titanium.UI.Slider Slider}</li>
<li>{@link Titanium.UI.Switch Switch}</li>
<li>{@link Titanium.UI.TableView TableView}</li>
<li>{@link Titanium.UI.TextArea TextArea}</li>
<li>{@link Titanium.UI.TextField TextField}</li>
<li>{@link Titanium.UI.WebView WebView}</li>
</ul>
<p>Adding children to the these views <em>may</em> be supported on some platforms,
but is not guaranteed to work across platforms. Where it is supported, it may not
work as expected.</p>
<p>For maximum portability, these views should be treated as if they do not support children. <br>
Instead of adding children to these views, applications can positon other views as
siblings. For example, instead of adding a button as a child of a <code>WebView</code>, you can add
the button to the web view's parent such that it appears on top of the web view. </p>
<h4>Special-Purpose Containers</h4>
<p>A few view objects act as special-purpose containers--that is, they only manage
certain types of children, and many of them support a special means of adding
these children, instead of the general <code>add</code> method. These containers include:</p>
<ul>
<li><p>{@link Titanium.UI.ButtonBar ButtonBar} and {@link Titanium.UI.iOS.TabbedBar TabbedBar} are designed
to hold their own internally-created buttons, assigned by adding strings to the "labels" array.
Views added using the <code>add</code> method are displayed on top of these buttons.</p></li>
<li><p>{@link Titanium.UI.Picker Picker}. Can only hold <code>PickerRows</code> and <code>PickerColumns</code>, which
are added using the <code>add</code> method. Adding other types of views to a <code>Picker</code> is not
supported.</p></li>
<li><p>{@link Titanium.UI.TableView TableView} is a specialized container for
<code>TableViewSection</code> and <code>TableViewRow</code> objects. These objects must be
added using the properties and methods that <code>TableView</code> provides
for adding and removing sectons and rows.</p>
<p>On some platforms, it is possible to add arbitrary child views to a table view
using the <code>add</code> method. However, this is not guaranteed to work on all platforms,
and in general, should be avoided.</p></li>
<li><p>{@link Titanium.UI.TableViewSection TableViewSection} is a specialized container
for <code>TableViewRow</code> objects, which <em>are</em> added using the <code>add</code> method. The <code>add</code> method
on <code>TableViewSection</code> can only be used to add <code>TableViewRow</code> objects.</p></li>
<li><p>{@link Titanium.UI.iOS.Toolbar Toolbar} is designed to hold buttons and certain
other controls, added to its <code>items</code> array. Views added using the <code>add</code> method are
displayed on top of the controls in the <code>items</code> array.</p></li>
<li><p>The <code>Tab</code>, <code>TabGroup</code>, <code>NavigationGroup</code>, <code>NavigationWindow</code> and <code>SplitWindow</code> objects are
special containers that manage windows. These are discussed in the
"Top-Level Containers" section.</p></li>
</ul>
<h4>Top-Level Containers</h4>
<p>There are certain top-level containers that are not intended to be added
as the children of other views. These top-level containers include
{@link Titanium.UI.Window}, {@link Titanium.UI.iPad.SplitWindow}, {@link Titanium.UI.iOS.NavigationWindow},
and {@link Titanium.UI.TabGroup}. Other types of views must be added
to a top-level container in order to be displayed on screen.</p>
<p>The special containers {@link Titanium.UI.MobileWeb.NavigationGroup},
{@link Titanium.UI.iOS.NavigationWindow}, {@link Titanium.UI.iPad.SplitWindow},
{@link Titanium.UI.Tab}, and {@link Titanium.UI.TabGroup} manage windows.
These managed windows may be referred to as <em>children</em> of the
container, but they are not added using the <code>add</code> method.</p>
<p>Note that although a <code>NavigationGroup</code> manages windows, it is not itself a
top-level container. It must be added to a <code>Window</code> in order to be displayed.</p>
<p><code>Tab</code> is another kind of special container: it is not itself a top-level container,
but can only be used within a <code>TabGroup</code>. You cannot <code>add</code> a <code>Tab</code> to an arbitrary
container.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method addAttachment
* <p>Adds an attachment.</p>
* @description <p>On Android, multiple attachments may be added, but will only work if the user chooses to
send via the Android Gmail or K9 mail clients.</p>
<p>The Android "Mail" app, which is only available on some handsets, will only accept one
attachment from a Titanium app.</p>
* @param {Titanium.Blob/Titanium.Filesystem.File} attachment
<p>Attachment to include in the email.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method isSupported
* <p>Indicates whether sending email is supported by the system.</p>
* @description <p>On iOS 10, the user is able to uninstall the built-in applications including Mail. Because
of that, you should ensure to check if the email dialog is supported on the current device.</p>
* @returns {Boolean}
*/
/**
* @method open
* <p>Opens this email dialog.</p>
* @param {Object} properties
<p>Animation properties. Set <code>animated</code> Boolean property to <code>true</code> to animate dialog
on open. (iPhone, iPad only)</p>
*/
/**
* @method getAccessibilityHidden
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-accessibilityHidden} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHidden
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-accessibilityHidden} property.</p>
* @param {Boolean} accessibilityHidden
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityHint
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-accessibilityHint} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHint
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-accessibilityHint} property.</p>
* @param {String} accessibilityHint
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityLabel
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-accessibilityLabel} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityLabel
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-accessibilityLabel} property.</p>
* @param {String} accessibilityLabel
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityValue
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-accessibilityValue} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityValue
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-accessibilityValue} property.</p>
* @param {String} accessibilityValue
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAnchorPoint
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-anchorPoint} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setAnchorPoint
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-anchorPoint} property.</p>
* @param {Point} anchorPoint
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getAnimatedCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-animatedCenter} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundRepeat
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-backgroundRepeat} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundRepeat
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-backgroundRepeat} property.</p>
* @param {Boolean} backgroundRepeat
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundLeftCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-backgroundLeftCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundLeftCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-backgroundLeftCap} property.</p>
* @param {Number} backgroundLeftCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundTopCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-backgroundTopCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundTopCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-backgroundTopCap} property.</p>
* @param {Number} backgroundTopCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBorderColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-borderColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setBorderColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-borderColor} property.</p>
* @param {String} borderColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getClipMode
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-clipMode} property.</p>
* @returns {Number}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setClipMode
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-clipMode} property.</p>
* @param {Number} clipMode
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getFocusable
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-focusable} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setFocusable
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-focusable} property.</p>
* @param {Boolean} focusable
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getOverrideCurrentAnimation
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-overrideCurrentAnimation} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
*/
/**
* @method setOverrideCurrentAnimation
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-overrideCurrentAnimation} property.</p>
* @param {Boolean} overrideCurrentAnimation
<p>New value for the property.</p>
* @platform android 3.3.0
*/
/**
* @method getPullBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-pullBackgroundColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setPullBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-pullBackgroundColor} property.</p>
* @param {String} pullBackgroundColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getSoftKeyboardOnFocus
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-softKeyboardOnFocus} property.</p>
* @returns {Number}
* @platform android 0.9
*/
/**
* @method setSoftKeyboardOnFocus
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-softKeyboardOnFocus} property.</p>
* @param {Number} softKeyboardOnFocus
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getTintColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-tintColor} property.</p>
* @returns {String}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setTintColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getTransform
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-transform} property.</p>
* @returns {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setTransform
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-transform} property.</p>
* @param {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix} transform
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getViewShadowRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-viewShadowRadius} property.</p>
* @returns {Number}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-viewShadowRadius} property.</p>
* @param {Number} viewShadowRadius
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getViewShadowColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-viewShadowColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-viewShadowColor} property.</p>
* @param {String} viewShadowColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getViewShadowOffset
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-viewShadowOffset} property.</p>
* @returns {Point}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowOffset
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-viewShadowOffset} property.</p>
* @param {Point} viewShadowOffset
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getHorizontalWrap
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-horizontalWrap} property.</p>
* @returns {Boolean}
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method setHorizontalWrap
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-horizontalWrap} property.</p>
* @param {Boolean} horizontalWrap
<p>New value for the property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method getKeepScreenOn
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-keepScreenOn} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setKeepScreenOn
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-keepScreenOn} property.</p>
* @param {Boolean} keepScreenOn
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getBackgroundDisabledColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-backgroundDisabledColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-backgroundDisabledColor} property.</p>
* @param {String} backgroundDisabledColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundDisabledImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-backgroundDisabledImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-backgroundDisabledImage} property.</p>
* @param {String} backgroundDisabledImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-backgroundFocusedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-backgroundFocusedColor} property.</p>
* @param {String} backgroundFocusedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-backgroundFocusedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-backgroundFocusedImage} property.</p>
* @param {String} backgroundFocusedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundGradient
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-backgroundGradient} property.</p>
* @returns {Gradient}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundGradient
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-backgroundGradient} property.</p>
* @param {Gradient} backgroundGradient
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-backgroundImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-backgroundSelectedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-backgroundSelectedColor} property.</p>
* @param {String} backgroundSelectedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-backgroundSelectedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-backgroundSelectedImage} property.</p>
* @param {String} backgroundSelectedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBorderRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-borderRadius} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBorderRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-borderRadius} property.</p>
* @param {Number} borderRadius
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBorderWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-borderWidth} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBorderWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-borderWidth} property.</p>
* @param {Number} borderWidth
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getOpacity
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-opacity} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setOpacity
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-opacity} property.</p>
* @param {Number} opacity
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getRect
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-rect} property.</p>
* @returns {Dimension}
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getSize
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-size} property.</p>
* @returns {Dimension}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTouchEnabled
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-touchEnabled} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTouchEnabled
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-touchEnabled} property.</p>
* @param {Boolean} touchEnabled
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getVisible
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-visible} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setVisible
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-visible} property.</p>
* @param {Boolean} visible
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getZIndex
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-zIndex} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setZIndex
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getChildren
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-children} property.</p>
* @returns {Titanium.UI.View[]}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-backgroundColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTop
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-top} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTop
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-top} property.</p>
* @param {Number/String} top
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getLeft
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-left} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setLeft
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-left} property.</p>
* @param {Number/String} left
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBottom
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-bottom} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBottom
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-bottom} property.</p>
* @param {Number/String} bottom
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-center} property.</p>
* @returns {Point}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setCenter
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-center} property.</p>
* @param {Point} center
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getRight
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-right} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setRight
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-right} property.</p>
* @param {Number/String} right
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-width} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-width} property.</p>
* @param {Number/String} width
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getHeight
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-height} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setHeight
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-height} property.</p>
* @param {Number/String} height
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getLayout
* @hide
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-layout} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setLayout
* @hide
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-layout} property.</p>
* @param {String} layout
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBarColor
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-barColor} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setBarColor
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-barColor} property.</p>
* @param {String} barColor
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getBccRecipients
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-bccRecipients} property.</p>
* @returns {String[]}
*/
/**
* @method setBccRecipients
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-bccRecipients} property.</p>
* @param {Array<String>} bccRecipients
<p>New value for the property.</p>
*/
/**
* @method getCcRecipients
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-ccRecipients} property.</p>
* @returns {String[]}
*/
/**
* @method setCcRecipients
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-ccRecipients} property.</p>
* @param {Array<String>} ccRecipients
<p>New value for the property.</p>
*/
/**
* @method getHtml
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-html} property.</p>
* @returns {Boolean}
*/
/**
* @method setHtml
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-html} property.</p>
* @param {Boolean} html
<p>New value for the property.</p>
*/
/**
* @method getMessageBody
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-messageBody} property.</p>
* @returns {String}
*/
/**
* @method setMessageBody
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-messageBody} property.</p>
* @param {String} messageBody
<p>New value for the property.</p>
*/
/**
* @method getSubject
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-subject} property.</p>
* @returns {String}
*/
/**
* @method setSubject
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-subject} property.</p>
* @param {String} subject
<p>New value for the property.</p>
*/
/**
* @method getToRecipients
* <p>Gets the value of the {@link Titanium.UI.EmailDialog#property-toRecipients} property.</p>
* @returns {String[]}
*/
/**
* @method setToRecipients
* <p>Sets the value of the {@link Titanium.UI.EmailDialog#property-toRecipients} property.</p>
* @param {Array<String>} toRecipients
<p>New value for the property.</p>
*/
/**
* @property [accessibilityHidden=false]
* @hide
* @type Boolean
* <p>Whether the view should be "hidden" from (i.e., ignored by) the accessibility service.</p>
* <p> <b>Requires:</b>
Android 4.0 and later
iOS 5.0 and later
</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityElementsHidden</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility
Protocol</a>.
The native property is only available in iOS 5.0 and later; if
<code>accessibilityHidden</code> is specified on earlier versions of iOS, it is ignored.</p>
<p>On Android, setting <code>accessibilityHidden</code> calls the native
<a href="http://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29">View.setImportantForAccessibility</a>
method. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and
later; if this property is specified on earlier versions of Android, it is ignored.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityHint=]
* @hide
* @type String
* <p>Briefly describes what performing an action (such as a click) on the view will do.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityHint</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityValue} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityLabel=Title or label of the control.]
* @hide
* @type String
* <p>A succint label identifying the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityLabel</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityValue} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityValue=State or value of the control.]
* @hide
* @type String
* <p>A string describing the value (if any) of the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityValue</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [anchorPoint=Center of this view.]
* @hide
* @type Point
* <p>Coordinate of the view about which to pivot an animation.</p>
* @description <p>Used on iOS only. For Android, use {@link Titanium.UI.Animation#property-anchorPoint}. </p>
<p>Anchor point is specified as a fraction of the view's size. For example, <code>{0, 0}</code> is at
the view's top-left corner, <code>{0.5, 0.5}</code> at its center and <code>{1, 1}</code> at its bottom-right
corner. </p>
<p>See the "Using an anchorPoint" example in {@link Titanium.UI.Animation} for a demonstration.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property animatedCenter
* @hide
* @type Point
* @readonly
* <p>Current position of the view during an animation.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundRepeat=false]
* @hide
* @type Boolean
* <p>Determines whether to tile a background across a view.</p>
* @description <p>Setting this to <code>true</code> makes the set <code>backgroundImage</code> repeat across the view as a series
of tiles. The tiling begins in the upper-left corner, where the upper-left corner of the
background image is rendered. The image is then tiled to fill the available space of the
view.</p>
<p>Note that setting this to <code>true</code> may incur performance penalties for large views or
background images, as the tiling must be redone whenever a view is resized.</p>
<p>On iOS, the following views do not currently support tiled backgrounds:</p>
<ul>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.TextField}</li>
<li>{@link Titanium.UI.Label}</li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundLeftCap=0]
* @hide
* @type Number
* <p>Size of the left end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundTopCap=0]
* @hide
* @type Number
* <p>Size of the top end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [borderColor=Same as the normal background color of this view (Android, Mobile Web), black (iOS).]
* @hide
* @type String
* <p>Border color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [clipMode=Undefined. Behaves as if set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT}.]
* @hide
* @type Number
* <p>View's clipping behavior.</p>
* @description <p>Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_ENABLED} enforces all child views to be clipped to this views bounds.
Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_DISABLED} allows child views to be drawn outside the bounds of this view.
When set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT} or when this property is not set, clipping behavior is inferred.
See section on iOS Clipping Behavior in {@link Titanium.UI.View}.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [focusable=false]
* @hide
* @type Boolean
* <p>Whether view should be focusable while navigating with the trackball.</p>
* @platform android 0.9
*/
/**
* @property [overrideCurrentAnimation=undefined but behaves as false]
* @hide
* @type Boolean
* @creationOnly
* <p>When on, animate call overrides current animation if applicable.</p>
* @description <p>If this property is set to false, the animate call is ignored if the view is currently being animated.</p>
* @platform android 3.3.0
*/
/**
* @property [pullBackgroundColor=Undefined. Results in a light grey background color on the wrapper view.]
* @hide
* @type String
* <p>Background color of the wrapper view when this view is used as either <Titanium.UI.ListView.pullView> or {@link Titanium.UI.TableView#property-headerPullView}.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [softKeyboardOnFocus={@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}]
* @hide
* @type Number
* <p>Determines keyboard behavior when this view is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_HIDE_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_SHOW_ON_FOCUS}
</ul></p>
* @platform android 0.9
*/
/**
* @property [tintColor=]
* @hide
* @type String
* <p>The view's tintColor. This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of UIView on iOS. If no value is specified,
the tintColor of the View is inherited from its superview. </p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property [transform=Identity matrix]
* @hide
* @type Titanium.UI.2DMatrix/Titanium.UI.3DMatrix
* <p>Transformation matrix to apply to the view.</p>
* @description <p>Android and Mobile Web only support 2DMatrix transforms.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [viewShadowRadius=Undefined. Behaves as if set to 3.]
* @hide
* @type Number
* <p>Determines the blur radius used to create the shadow.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [viewShadowColor=Undefined. Behaves as if transparent.]
* @hide
* @type String
* <p>Determines the color of the shadow.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [viewShadowOffset=Undefined. Behaves as if set to (0,-3)]
* @hide
* @type Point
* <p>Determines the offset for the shadow of the view.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [horizontalWrap=true]
* @hide
* @type Boolean
* <p>Determines whether the layout has wrapping behavior.</p>
* @description <p>For more information, see the discussion of horizontal layout mode in the description of
the {@link Titanium.UI.View#property-layout layout} property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @property [keepScreenOn=false]
* @hide
* @type Boolean
* <p>Determines whether to keep the device screen on.</p>
* @description <p>When <code>true</code> the screen will not power down. Note: enabling this feature will use more
power, thereby adversely affecting run time when on battery.</p>
* @platform android 0.9
*/
/**
* @property [backgroundDisabledColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Disabled background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundDisabledImage=If `backgroundDisabledImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is disabled.
]
* @hide
* @type String
* <p>Disabled background image for the view, specified as a local file path or URL.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Focused background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>For normal views, the focused color is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedImage=If `backgroundFocusedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is focused.
]
* @hide
* @type String
* <p>Focused background image for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the focused background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundGradient=No gradient]
* @hide
* @type Gradient
* <p>A background gradient for the view.</p>
* @description <p>A gradient can be defined as either linear or radial. A linear gradient varies continuously
along a line between the <code>startPoint</code> and <code>endPoint</code>.</p>
<p>A radial gradient is interpolated between two circles, defined by <code>startPoint</code> and
<code>startRadius</code> and <code>endPoint</code> and <code>endRadius</code> respectively.</p>
<p>The start and end points and radius values can be defined in device units, in the view's
coordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center
point of the view can be specified as:</p>
<pre><code>{ x: 30, y: 30 }
</code></pre>
<p>Or:
{ x: '50%', y: '50%' }</p>
<p>When specifying multiple colors, you can specify an <em>offset</em> value for each color, defining
how far into the gradient it takes effect. For example, the following color array specifies
a gradient that goes from red to blue back to red: </p>
<pre><code>colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]
</code></pre>
<p>Mobile Web has two limitations: backfillStart and backfillEnd are ignored and the system
behaves as if they are true, and endPoint is not supported for radial gradients. </p>
<p>Android currently only supports linear gradients. It also ignores backfillStart and backfillEnd
treating them as if they are true.</p>
* <h3>Examples</h3>
<h4>Linear and Radial Gradients</h4>
<p>The following code excerpt creates two views, one with a linear gradient and one with
a radial gradient.</p>
<pre><code>var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var radialGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'radial',
startPoint: { x: 50, y: 50 },
endPoint: { x: 50, y: 50 },
colors: [ 'red', 'blue'],
startRadius: '90%',
endRadius: 0,
backfillStart: true
}
});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],
}
});
win1.add(radialGradient);
win1.add(linearGradient);
win1.open();
</code></pre>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundImage=Default behavior when `backgroundImage` is unspecified depends on the type of view and
the platform. For generic views, no image is used. For most controls (buttons, text
fields, and so on), platform-specific default images are used.
]
* @hide
* @type String
* <p>Background image for the view, specified as a local file path or URL.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedColor=Background color of this view.]
* @hide
* @type String
* <p>Selected background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p><code>focusable</code> must be true for normal views.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedImage=If `backgroundSelectedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is selected.
]
* @hide
* @type String
* <p>Selected background image url for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the selected background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [borderRadius=0]
* @hide
* @type Number
* <p>Radius for the rounded corners of the view's border.</p>
* @description <p>Each corner is rounded using an arc of a circle.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [borderWidth=0]
* @hide
* @type Number
* <p>Border width of the view.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [opacity=1.0 (opaque)]
* @hide
* @type Number
* <p>Opacity of this view, from 0.0 (transparent) to 1.0 (opaque).</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property rect
* @hide
* @type Dimension
* @readonly
* <p>The bounding box of the view relative to its parent, in system units.</p>
* @description <p>The view's bounding box is defined by its size and position. </p>
<p>The view's size is <code>rect.width</code> x <code>rect.height</code>. The view's top-left position relative to
its parent is (<code>rect.x</code> , <code>rect.y</code>). </p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property size
* @hide
* @type Dimension
* @readonly
* <p>The size of the view in system units. </p>
* @description <p>Although property returns a {@link Dimension} dictionary, only the <code>width</code> and <code>height</code>
properties are valid. The position properties--<code>x</code> and <code>y</code>--are always 0.</p>
<p>To find the position <em>and</em> size of the view, use the {@link Titanium.UI.View#property-rect rect}
property instead.</p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [touchEnabled=true]
* @hide
* @type Boolean
* <p>Determines whether view should receive touch events.</p>
* @description <p>If false, will forward the events to peers.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [visible=true]
* @hide
* @type Boolean
* <p>Determines whether the view is visible.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property zIndex
* @hide
* @type Number
* <p>Z-index stack order position, relative to other sibling views.</p>
* @description <p>A view does not have a default z-index value, meaning that it is undefined by default.
When this property is explicitly set, regardless of its value, it causes the view to be
positioned in front of any sibling that has an undefined z-index.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property children
* @hide
* @type Titanium.UI.View[]
* @readonly
* <p>Array of this view's child views.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundColor=Transparent]
* @hide
* @type String
* <p>Background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property top
* @hide
* @type Number/String
* <p>The view's top position.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property left
* @hide
* @type Number/String
* <p>View's left position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property bottom
* @hide
* @type Number/String
* <p>View's bottom position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the parent
view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or a
dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property center
* @hide
* @type Point
* <p>View's center position, in the parent view's coordinates.</p>
* @description <p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property right
* @hide
* @type Number/String
* <p>View's right position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property width
* @hide
* @type Number/String
* <p>View's width, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values: </p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</li>
</ul>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p>
<p>This is an input property for specifying the view's width dimension. To determine
the view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property height
* @hide
* @type Number/String
* <p>View height, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values:</p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li><p>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</p>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p></li>
</ul>
<p>This is an input property for specifying the view's height dimension. To determine the
view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [layout=Composite layout]
* @hide
* @type String
* <p>Specifies how the view positions its children.
One of: 'composite', 'vertical', or 'horizontal'.</p>
* @description <p>There are three layout options:</p>
<ul>
<li><p><code>composite</code> (or <code>absolute</code>). Default layout. A child view is positioned based on its
positioning properties or "pins" (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code> and <code>center</code>).
If no positioning properties are specified, the child is centered. </p>
<p>The child is always sized based on its <code>width</code> and <code>height</code> properties, if these are
specified. If the child's height or width is <em>not</em> specified explicitly, it may be
calculated implicitly from the positioning properties. For example, if both <code>left</code> and
<code>center.x</code> are specified, they can be used to calculate the width of the child control. </p>
<p>Because the size and position properties can conflict, there is a specific precedence
order for the layout properties. For vertical positioning, the precedence
order is: <code>height</code>, <code>top</code>, <code>center.y</code>, <code>bottom</code>.</p>
<p>The following table summarizes the various combinations of properties that can
be used for vertical positioning, in order from highest precedence to lowest.
(For example, if <code>height</code>, <code>center.y</code> and <code>bottom</code> are all specified, the
<code>height</code> and <code>center.y</code> values take precedence.)</p>
<table cellpadding="6px" border="1" rules="all">
<tr>
<th>Scenario</th><th>Behavior</th>
</tr>
<tr>
<td>`height` & `top` specified</td><td>Child positioned `top` unit from
parent's top, using specified `height`;
any `center.y` and `bottom` values are ignored.</td>
</tr>
<tr>
<td>`height` & `center.y` specified</td><td>Child positioned with center at
`center.y`, using specified `height`; any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`height` & `bottom` specified</td><td>Child positioned `bottom` units from
parent's bottom, using specified `height`.</td>
</tr>
<tr>
<td>`top` & `center.y` specified</td><td>Child positioned with top edge `top` units from
parent's top and center at `center.y`. Height is determined implicitly;
any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`top` & `bottom` specified</td><td>Child positioned with top edge `top` units from
parent's top and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly. </td>
</tr>
<tr>
<td>Only `top` specified</td><td>Child positioned `top` units from parent's
top, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`center.y` and `bottom` specified</td><td>Child positioned with center at
`center.y` and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly.</td>
</tr>
<tr>
<td>Only `center.y` specified</td><td>Child positioned with center at
`center.y`, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>Only `bottom` specified</td><td>Child positioned with bottom edge `bottom`
units from parent's bottom, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`height`, `top`, `center.y`, and `bottom` unspecified</td><td>Child
centered vertically in the parent and uses the default height calculation
for the child view type.</td>
</tr>
</table>
<p>Horizontal positioning works like vertical positioning, except that the
precedence is <code>width</code>, <code>left</code>, <code>center.x</code>, <code>right</code>. </p>
<p>For complete details on composite layout rules, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>
in the Titanium Mobile Guides. </p>
<ul><li><code>vertical</code>. Children are laid out vertically from top to bottom. The first child
is laid out <code>top</code> units from its parent's bounding box. Each subsequent child is
laid out below the previous child. The space between children is equal to the
upper child's <code>bottom</code> value plus the lower child's <code>top</code> value. </li></ul>
<p>Each child is positioned horizontally as in the composite layout mode. </p>
<ul><li><code>horizontal</code>. Horizontal layouts have different behavior depending on whether wrapping
is enabled. Wrapping is enabled by default (the <code>horizontalWrap</code> property is <code>true</code>).</li></ul>
<p>With wrapping behavior, the children are laid out horizontally from left to right,
<em>in rows</em>. If a child requires more horizontal space than exists in the current row,
it is wrapped to a new row. The height of each row is equal to the maximum height of
the children in that row.</p>
<p>Wrapping behavior is available on iOS, Android and Mobile Web (Release 2.1.0 and later).
When the <code>horizontalWrap</code> property is set to true, the first row is placed at the top of the
parent view, and successive rows are placed below the first row. Each child is
positioned vertically <em>within its row</em> somewhat like composite layout mode.
In particular: </p>
<ul><li>If neither <code>top</code> or <code>bottom</code> is specified, the child is centered in the
row.</li>
<li>If either <code>top</code> or <code>bottom</code> is specified, the child is aligned to either
the top or bottom of the row, with the specified amount of padding.</li>
<li>If <em>both</em> <code>top</code> and <code>bottom</code> is specified for a given child, the properties
are both treated as padding.</li></ul>
<p>If the <code>horizontalWrap</code> property is false, the behavior is more equivalent to a vertical layout.
Children are laid or horizontally from left to right in a single row. The <code>left</code> and
<code>right</code> properties are used as padding between the children, and the <code>top</code> and <code>bottom</code>
properties are used to position the children vertically.</p>
<p>On Mobile Web <em>prior to</em> Release 2.1.0, the horizontal layout does not wrap by default,
and does not support the <code>horizontalWrap</code> property. On Android and iOS <em>prior to</em> Release
2.1.0, the horizontal layout always wraps and the <code>horizontalWrap</code> property is not supported.</p></li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property barColor
* @type String
* <p>Bar color of the email dialog window, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property CANCELLED
* @type Number
* @readonly
* <p>Constant for the <code>CANCELLED</code> status result. On Android, this property exists but is not used.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property FAILED
* @type Number
* @readonly
* <p>Constant for the <code>FAILED</code> status result.</p>
*/
/**
* @property SAVED
* @type Number
* @readonly
* <p>Constant for the <code>SAVED</code> status result. On Android, this property exists but is not used.</p>
*/
/**
* @property SENT
* @type Number
* @readonly
* <p>Constant for the <code>SENT</code> status result.</p>
*/
/**
* @property bccRecipients
* @type String[]
* <p>Recipients of the email included via the <code>BCC</code> (Blind Carbon Copy) field.</p>
*/
/**
* @property ccRecipients
* @type String[]
* <p>Recipients of the email included via the <code>CC</code> (Carbon Copy) field.</p>
*/
/**
* @property [html=false]
* @type Boolean
* <p>Determines whether the email message, specifically the contents of
{@link Titanium.UI.EmailDialog#property-messageBody messageBody}, should be sent as HTML content type
rather than plain text.</p>
* @description <p>On Mobile Web, while iPhone and iPad properly interpret HTML messages, some email clients,
especially those for the desktop, do not support them.</p>
*/
/**
* @property messageBody
* @type String
* <p>Email message body.</p>
*/
/**
* @property subject
* @type String
* <p>Subject line for the email.</p>
*/
/**
* @property toRecipients
* @type String[]
* <p>Recipients of the email included via the main <code>TO</code> field.</p>
*/
/**
* @class Font
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Font.yml
* <p>An abstract datatype for specifying a text font.</p>
* @description <p>Available fonts vary by platform and device. On iOS, font support depends on the OS
version. On Android, font support depends on the OS version <strong>and</strong> device manufacturer.</p>
<p>Note that to update the font used by a UI component, you must set the object's <code>font</code>
property, like this:</p>
<pre><code>myLabel.font = {
fontSize: 24,
fontFamily: myFontName
}
</code></pre>
<p>Changing the <code>font</code> object after assigning it does not reliably affect the underlying UI
component:</p>
<pre><code>// This may not work as expected
myLabel.font.fontSize = 24;
</code></pre>
<h4>Custom Fonts</h4>
<p>Custom TrueType (.ttf) or OpenType (.otf) fonts may be embedded in an application on iOS and
Android. (Note that you must have redistribution rights on the fonts you ship.)</p>
<p>In Alloy applications, custom fonts must be placed in a "fonts" folder in the platform-specific assets folder (<strong>app/assets/android/fonts</strong>, for example).
In classic Titanium applications, custom fonts must be placed in the <strong>Resources/fonts</strong> directory.</p>
<p>For an example of using custom fonts, see <a href="http://docs.appcelerator.com/platform/#!/guide/Custom_Fonts">Custom Fonts</a>.</p>
*/
/**
* @property [fontFamily=Uses the default system font.]
* @type String
* <p>Specifies the font family or specific font to use.</p>
* @description <p>This can be the name of a font family (for example, "Helvetica" or "DroidSans") the base
name of the font file (for example, "Droid_sans.ttf"), or the font's PostScript name. The
value you specify also depends on the platform you are targeting.</p>
<ul>
<li><p>On Android specify the font file name without its file extension (.otf or .ttf).
For example, if you were using the "Burnstown Dam" font whose file name is
named <code>burnstown_dam.ttf</code>, then you specify <code>fontFamily: 'burnstown_dam'</code>.</p></li>
<li><p>On iOS you use the font's <a href="http://docs.appcelerator.com/platform/latest/#!/guide/Custom_Fonts-section-29004935_CustomFonts-Findingafont%27sPostScriptname">PostScript name</a>.
For example, the PostScript name for Burnstown Dam is "BurnstownDam-Regular so you'd specify: <code>fontFamily: 'BurnstownDam-Regular'</code>.</p></li>
</ul>
<p>For an example of using a custom font, see <a href="http://docs.appcelerator.com/platform/#!/guide/Custom_Fonts">Custom Fonts</a>.</p>
<p>Notes:</p>
<ul>
<li>Available fonts differ by platform.</li>
<li>If the requested family name does not match an existing font, the default font family is used.</li>
<li>On Android, the generic names "sans-serif," "serif," and "monospace" (or "monospaced")
are mapped to system fonts. On iOS, only "monospace" is supported.</li>
</ul>
*/
/**
* @property [fontSize=15px]
* @type Number/String
* <p>Font size, in platform-dependent units.</p>
* @description <p>On iOS and Mobile Web, font sizes are always specified in typographical points
(not to be confused with the Apple "points" used for other measurements on iOS).</p>
<p>On Android the default font sizing is in pixels, but the size can also
include a unit specifier. Supported units and their specifiers are:</p>
<ul>
<li>pixels (px)</li>
<li>typographical points (pt)</li>
<li>density-independent pixels (dp or dip)</li>
<li>millimeters (mm)</li>
<li>inches (in)</li>
</ul>
<p>For example, "16dp" specifies a size of 16 density-independent pixels.</p>
<p>iOS ignores any unit specifier after the size value.</p>
*/
/**
* @property [fontWeight=normal]
* @type String
* <p>Font weight. Valid values are "bold" or "normal".</p>
* @description <p>The "semibold" weight is recognized on iOS only.</p>
*/
/**
* @property [fontStyle=normal]
* @type String
* <p>Font style. Valid values are "italic" or "normal".</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property textStyle
* @type String
* <p>The text style for the font.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use one of the TEXT_STYLE constants from {@link Titanium.UI} to set the font to a predefined system font.
When this property is set to a valid value, all other font properties are ignored. Avaliable on iOS 7 and above.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_STYLE_HEADLINE}
<li> {@link Titanium.UI#property-TEXT_STYLE_SUBHEADLINE}
<li> {@link Titanium.UI#property-TEXT_STYLE_BODY}
<li> {@link Titanium.UI#property-TEXT_STYLE_FOOTNOTE}
<li> {@link Titanium.UI#property-TEXT_STYLE_CAPTION1}
<li> {@link Titanium.UI#property-TEXT_STYLE_CAPTION2}
<li> {@link Titanium.UI#property-TEXT_STYLE_CALLOUT}
<li> {@link Titanium.UI#property-TEXT_STYLE_TITLE1}
<li> {@link Titanium.UI#property-TEXT_STYLE_TITLE2}
<li> {@link Titanium.UI#property-TEXT_STYLE_TITLE3}
</ul></p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @class Titanium.UI.ImageView
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ImageView.yml
* <p>A view to display a single image or series of animated images. </p>
* @description <p>Use the {@link Titanium.UI#method-createImageView} method or <strong><code><ImageView></code></strong> Alloy element to create an <code>ImageView</code>.</p>
<p>Specifying either a <code>width</code> or <code>height</code> property for this view will scale its image(s) with
the aspect ratio maintained, up to a maximum size that does not exceed its parent view.</p>
<h4>Android 9-Patch Scaled Images</h4>
<p>A nine-patch (9-patch) image is simply a standard <code>png</code> image with a transparent border of a
single pixel, containing "guides" defined by solid black (<code>#000</code>) color fills. Guides added to the
top and left edges determine that the image may be stretched in horizontal and vertical planes
respectively. Optionally, the content area may be defined by guides added to the bottom and
right edges.</p>
<p>Although any image editor may be used to create the guides, certain settings can cause the edges
of the graphic to "bleed" into the transparent border, consequently making it non-transparent.
Thus, the <code>draw9patch</code> utility provided in the Android SDK tools directory is recommended for
this purpose.</p>
<p>For further information about nine-patch images and the Android utility, see the
<a href="http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch">Nine-patch</a>
and <a href="http://developer.android.com/guide/developing/tools/draw9patch.html">Draw 9-patch</a> sections
of the Android Developer website.</p>
<p>The nine-patch technique may be used with any of Titanium's static image properties. See the
"Button with Nine-patch Background Image" example for a demonstration.</p>
* <h3>Examples</h3>
<h4>Basic Image View</h4>
<p>In this example, we create a simple image view:</p>
<pre><code>Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow();
var image = Ti.UI.createImageView({
image:'/images/myimage.png'
});
win.add(image);
win.open();
</code></pre><h4>Button with Nine-patch Background Image</h4>
<p>To prepare, copy the images
<a href="https://github.com/appcelerator/titanium_mobile/raw/master/demos/KitchenSink/Resources/images/custom-slider-right.9.png">custom-slider-right.9.png</a>
and <a href="https://github.com/appcelerator/titanium_mobile/raw/master/demos/KitchenSink/Resources/images/custom-slider-left.9.png">custom-slider-left.9.png</a>
into the project <code>/images/</code> directory/.</p>
<p>Create a button with a nine-patch image background, that swaps with another image when
selected, and generates a message in the console when clicked.</p>
<p>Note that images are referenced in the code without the <code>.9</code> part of the filename, and that
the project should be cleaned to ensure that the files are correctly copied to the project.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false,
title: 'Click button to test'
});
var button = Ti.UI.createButton({
backgroundImage: '/images/custom-slider-right.png',
backgroundSelectedImage:'/images/custom-slider-left.png',
title: 'Click me!',
top: 10,
width: 300,
height: 200
});
button.addEventListener('click',function(e){
Ti.API.info("You clicked the button");
});
win.add(button);
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous basic image view example as an Alloy view.</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white">
<ImageView id="image" image="/images/myimage.png" />
</Window>
</Alloy>
</code></pre>
*/
/**
* @event change
* <p>Fired for each frame change during an animation.</p>
* @param {String} index
<p>Index of the image frame being displayed.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event load
* <p>Fired when either the initial image and/or all of the images in an animation are loaded.</p>
* @param {String} state
<p>Set to <code>image</code> when the image defined in the {@link Titanium.UI.ImageView#property-image image}
property is loaded. Set to <code>images</code>, when the series of images defined in the
{@link Titanium.UI.ImageView#property-images images} property are loaded.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event error
* <p>Fired when an image fails to load.</p>
* @param {Boolean} success
<p>Indicates a successful operation. Returns <code>false</code>.</p>
* @param {String} error
<p>Error message, if any returned. May be undefined.</p>
* @param {Number} code
<p>Error code.
If the error was generated by the operating system, that system's error value
is used. Otherwise, this value will be -1.</p>
* @param {String} image
<p>URL of the image that failed to load.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event start
* <p>Fired when the animation starts.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event pause
* <p>Fired when the animation pauses.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 2.1.1
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event stop
* <p>Fired when the animation stops.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method remove
* <p>Removes a child view from this view's hierarchy.</p>
* @description <p>See also: {@link Titanium.UI.ImageView#method-add add}, {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method add
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>Adding children to an <code>ImageView</code> is not supported on all platforms.</p>
<p>If you need to add views on top of this object, consider using
another view as a container for both this object and the views you want
to appear on top of it.</p>
<p>See also: {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method pause
* <p>Pauses a running animation. Use <code>resume</code> method to continue.</p>
* @description <p>This method only works if multiple images are specified.</p>
*/
/**
* @method resume
* <p>Resumes an animation from a <code>pause</code> state.</p>
* @description <p>This method only works if multiple images are specified.</p>
*/
/**
* @method start
* <p>Starts the image animation. On Android and Mobile Web, also resets <code>index</code> to the first image.</p>
* @description <p>This method only works if multiple images are specified.</p>
*/
/**
* @method stop
* <p>Stops a running animation. On iOS and Mobile Web, also resets <code>index</code> to the first image.</p>
* @description <p>This method only works if multiple images are specified.</p>
*/
/**
* @method toBlob
* <p>Returns the image as a Blob object.</p>
* @returns {Titanium.Blob}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getTintColor
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-tintColor} property.</p>
* @returns {String}
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @platform mobileweb 4.1.0
*/
/**
* @method setTintColor
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @platform mobileweb 4.1.0
*/
/**
* @method getAutorotate
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-autorotate} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAutorotate
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-autorotate} property.</p>
* @param {Boolean} autorotate
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getDecodeRetries
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-decodeRetries} property.</p>
* @returns {Number}
* @platform android 1.7.0
*/
/**
* @method setDecodeRetries
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-decodeRetries} property.</p>
* @param {Number} decodeRetries
<p>New value for the property.</p>
* @platform android 1.7.0
*/
/**
* @method getEnableZoomControls
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-enableZoomControls} property.</p>
* @returns {Boolean}
* @platform android 1.3.0
*/
/**
* @method setEnableZoomControls
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-enableZoomControls} property.</p>
* @param {Boolean} enableZoomControls
<p>New value for the property.</p>
* @platform android 1.3.0
*/
/**
* @method getHires
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-hires} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setHires
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-hires} property.</p>
* @param {Boolean} hires
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getPreventDefaultImage
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-preventDefaultImage} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setPreventDefaultImage
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-preventDefaultImage} property.</p>
* @param {Boolean} preventDefaultImage
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-url} property.</p>
* @removed 3.0.0 Use <Titanium.UI.ImageView.image> instead.
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setUrl
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-url} property.</p>
* @removed 3.0.0 Use <Titanium.UI.ImageView.image> instead.
* @param {String} url
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getAnimating
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-animating} property.</p>
* @returns {Boolean}
*/
/**
* @method getDefaultImage
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-defaultImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setDefaultImage
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-defaultImage} property.</p>
* @param {String} defaultImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getDuration
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-duration} property.</p>
* @returns {Number}
*/
/**
* @method setDuration
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-duration} property.</p>
* @param {Number} duration
<p>New value for the property.</p>
*/
/**
* @method getImage
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-image} property.</p>
* @returns {String/Titanium.Blob/Titanium.Filesystem.File}
*/
/**
* @method setImage
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-image} property.</p>
* @param {String/Titanium.Blob/Titanium.Filesystem.File} image
<p>New value for the property.</p>
*/
/**
* @method getImages
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-images} property.</p>
* @returns {String[]/Titanium.Blob[]/Titanium.Filesystem.File[]}
*/
/**
* @method setImages
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-images} property.</p>
* @param {Array<String>/Array<Titanium.Blob>/Array<Titanium.Filesystem.File>} images
<p>New value for the property.</p>
*/
/**
* @method getPaused
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-paused} property.</p>
* @returns {Boolean}
*/
/**
* @method getRepeatCount
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-repeatCount} property.</p>
* @returns {Number}
*/
/**
* @method setRepeatCount
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-repeatCount} property.</p>
* @param {Number} repeatCount
<p>New value for the property.</p>
*/
/**
* @method getReverse
* <p>Gets the value of the {@link Titanium.UI.ImageView#property-reverse} property.</p>
* @returns {Boolean}
*/
/**
* @method setReverse
* <p>Sets the value of the {@link Titanium.UI.ImageView#property-reverse} property.</p>
* @param {Boolean} reverse
<p>New value for the property.</p>
*/
/**
* @property [tintColor=]
* @type String
* <p>The view's tintColor.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of UIView on iOS. If no value is specified,
the tintColor of the View is inherited from its superview. </p>
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @platform mobileweb 4.1.0
*/
/**
* @property [autorotate=false on android, true on iOS.]
* @type Boolean
* @creationOnly
* <p>Indicates whether the image should be rotated based on exif orientation data.
By default, this is false on android and true on iOS.
The auto rotate behavior is not supported on Mobile Web.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [decodeRetries=5]
* @type Number
* <p>Number of times to retry decoding the bitmap at a URL.</p>
* @platform android 1.7.0
*/
/**
* @property [enableZoomControls=false]
* @type Boolean
* <p>Show zoom controls when the user touches the image view.</p>
* @platform android 1.3.0
*/
/**
* @property [hires=false]
* @type Boolean
* <p>Set to <code>true</code> to prevent scaling of 2x-resolution remote images for Retina
displays.</p>
* @description <p>Causes images to display at 50%, where one pixel of the graphic maps to one physical pixel
on-screen. This functionality is automatically determined for local images via their
filenames, and thus this property is only applicable to remote images.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [preventDefaultImage=false]
* @type Boolean
* <p>Prevent the default image from being displayed while loading a remote image. This property
is ignored when the <code>defaultImage</code> property is set.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property url
* @type String
* <p>URL to the image to display.</p>
* @removed 3.0.0 Use <Titanium.UI.ImageView.image> instead.
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [animating=false on creation, true on load (Android), false (iPhone, iPad, Mobile Web)]
* @type Boolean
* @readonly
* <p>Indicates whether animation is running.</p>
*/
/**
* @property defaultImage
* @type String
* <p>Local path to the default image to display while loading a remote image.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [duration=200 ms in Release 2.1.1 and later. Platform-specific default in earlier releases.]
* @type Number
* <p>Amount of time in milliseconds to animate one cycle.</p>
* @description <p>Starting with release 2.1.1, the minimum duration is 30 ms and the default duration is 200 ms.</p>
<p>On Android, prior to release 2.1.1, if any images are assigned to the <code>images</code> property when the animation is
started, duration will be set to the number of images multiplied by 33 ms. If no images
are assigned, duration will be set to 100 ms.</p>
<p>On iOS and Mobile Web, prior to release 2.1.1, the default is 30 ms.</p>
<p>On Android, if the value of duration is changed, {@link Titanium.UI.ImageView#method-stop stop}
and {@link Titanium.UI.ImageView#method-start start} need to be called for the new value to take effect.</p>
*/
/**
* @property image
* @type String/Titanium.Blob/Titanium.Filesystem.File
* <p>Image to display.</p>
* @description <p>Image to display, defined using a local filesystem path, a <code>File</code> object, a remote URL,
or a <code>Blob</code> object containing image data. <code>Blob</code> and <code>File</code> objects are not supported on
Mobile Web.</p>
<p>For Android, if there is a redirect and change in protocol, it will not follow. For example,
from http to https and vice versa. See <a href="http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4620571">Java Bug Database</a>
for more information.</p>
*/
/**
* @property images
* @type String[]/Titanium.Blob[]/Titanium.Filesystem.File[]
* <p>Array of images to animate, defined using local filesystem paths, <code>File</code> objects,
remote URLs (Android only), or <code>Blob</code> objects containing image data. <code>Blob</code> and <code>File</code>
objects are not supported on Mobile Web.</p>
<p>When using this property, an initial <code>start()</code> needs to be called upon the ImageView before any image will show in this imageview. </p>
<p>Related properties/methods to look at: <code>start</code>, <code>stop</code>, <code>pause</code>, <code>reverse</code>, <code>resume</code> and <code>repeatCount</code> </p>
*/
/**
* @property [paused=false]
* @type Boolean
* @readonly
* <p>Indicates whether the animation is paused.</p>
*/
/**
* @property [repeatCount=0 (infinite)]
* @type Number
* <p>Number of times to repeat the image animation.</p>
*/
/**
* @property [reverse=false]
* @type Boolean
* <p>Run the animation in reverse.</p>
*/
/**
* @class Titanium.UI.Label
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Label.yml
* <p>A text label, with optional background image.</p>
* @description <p>Use the {@link Titanium.UI#method-createLabel} method or <strong><code><Label></code></strong> Alloy element to create a label.</p>
* <h3>Examples</h3>
<h4>Basic Label</h4>
<p>Create a center-aligned label with a text shadow and specified-size font, and another
containing forced line breaks and unicode symbols.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false,
layout: 'vertical',
title: 'Label Demo'
});
var label1 = Ti.UI.createLabel({
color: '#900',
font: { fontSize:48 },
shadowColor: '#aaa',
shadowOffset: {x:5, y:5},
shadowRadius: 3,
text: 'A simple label',
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,
top: 30,
width: Ti.UI.SIZE, height: Ti.UI.SIZE
});
var label2 = Ti.UI.createLabel({
color:'blue',
text: 'A long label with\na few line breaks\nand unicode (UTF8)\nsymbols such as\na white chess piece \u2655\nand the euro symbol \u20ac\nlooks like this!\n',
textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,
top: 30,
width: 300, height: 200
});
win.add(label1);
win.add(label2);
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<p>The font and shadowOffset properties need to be defined in the TSS or controller file.
These property values are dictionaries, rather than single values,
so they cannot be included in markup.</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white" exitOnClose="true" fullscreen="false" layout="vertical" title="Label Demo">
<!-- The text property can either be defined as an attribute or as node text. -->
<Label id="label1" color="#900" shadowColor="#aaa" text="A simple label" textAlign="Ti.UI.TEXT_ALIGNMENT_CENTER"
top="30" width="Ti.UI.SIZE" height="Ti.UI.SIZE" />
<Label id="label2" color="blue" textAlign="Ti.UI.TEXT_ALIGNMENT_LEFT" top="30" width="300" height="200">
A long label with\na few line breaks\nand unicode (UTF8)\nsymbols such as\na white chess piece \u2655\nand the euro symbol \u20ac\nlooks like this!\n
</Label>
</Window>
</Alloy>
</code></pre>
*/
/**
* @event link
* <p>Fired when user interacts with a URL in the Label.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>The URL is set using the {@link Titanium.UI#property-ATTRIBUTE_LINK ATTRIBUTE_LINK} property on the {@link Titanium.UI.Label#property-attributedString attributedString}. </p>
<p>On Android, this event also fires if the <code>html</code> property is used instead of the <code>attributedString</code> property. This event will
also override the default behavior of openning the link in its default application.</p>
<p>On iOS, this is only valid on version 7 and above. In previous versions of the the Titanium SDK this event required a <code>longpress</code>
gesture to be performed. Beginning with Titanium SDK 4.0.0, only a <code>singletap</code> gesture is required to invoke this event.</p>
* @param {String} url
<p>The URL that is associated with this event.</p>
* @param {Array} range
<p>An array of two numbers [location, length] describing the character range of the text associated with this URL.</p>
* @param {Boolean} bubbles
<p>This is false. This event does not bubble</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 4.0.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method remove
* <p>Removes a child view from this view's hierarchy.</p>
* @description <p>See also: {@link Titanium.UI.Label#method-add add}, {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method add
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>Adding children to a <code>Label</code> is not supported on all platforms.</p>
<p>If you need to add views on top of this object, consider using
another view as a container for both this object and the views you want
to appear on top of it.</p>
<p>See also: {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getAutoLink
* <p>Gets the value of the {@link Titanium.UI.Label#property-autoLink} property.</p>
* @returns {Number}
* @platform android 0.8
*/
/**
* @method setAutoLink
* <p>Sets the value of the {@link Titanium.UI.Label#property-autoLink} property.</p>
* @param {Number} autoLink
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getBackgroundPaddingBottom
* <p>Gets the value of the {@link Titanium.UI.Label#property-backgroundPaddingBottom} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setBackgroundPaddingBottom
* <p>Sets the value of the {@link Titanium.UI.Label#property-backgroundPaddingBottom} property.</p>
* @param {Number} backgroundPaddingBottom
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getBackgroundPaddingLeft
* <p>Gets the value of the {@link Titanium.UI.Label#property-backgroundPaddingLeft} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setBackgroundPaddingLeft
* <p>Sets the value of the {@link Titanium.UI.Label#property-backgroundPaddingLeft} property.</p>
* @param {Number} backgroundPaddingLeft
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getBackgroundPaddingRight
* <p>Gets the value of the {@link Titanium.UI.Label#property-backgroundPaddingRight} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setBackgroundPaddingRight
* <p>Sets the value of the {@link Titanium.UI.Label#property-backgroundPaddingRight} property.</p>
* @param {Number} backgroundPaddingRight
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getBackgroundPaddingTop
* <p>Gets the value of the {@link Titanium.UI.Label#property-backgroundPaddingTop} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setBackgroundPaddingTop
* <p>Sets the value of the {@link Titanium.UI.Label#property-backgroundPaddingTop} property.</p>
* @param {Number} backgroundPaddingTop
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getEllipsize
* <p>Gets the value of the {@link Titanium.UI.Label#property-ellipsize} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setEllipsize
* <p>Sets the value of the {@link Titanium.UI.Label#property-ellipsize} property.</p>
* @param {Number} ellipsize
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getHighlightedColor
* <p>Gets the value of the {@link Titanium.UI.Label#property-highlightedColor} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setHighlightedColor
* <p>Sets the value of the {@link Titanium.UI.Label#property-highlightedColor} property.</p>
* @param {String} highlightedColor
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getHtml
* <p>Gets the value of the {@link Titanium.UI.Label#property-html} property.</p>
* @returns {String}
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method setHtml
* <p>Sets the value of the {@link Titanium.UI.Label#property-html} property.</p>
* @param {String} html
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method getIncludeFontPadding
* <p>Gets the value of the {@link Titanium.UI.Label#property-includeFontPadding} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
*/
/**
* @method setIncludeFontPadding
* <p>Sets the value of the {@link Titanium.UI.Label#property-includeFontPadding} property.</p>
* @param {Boolean} includeFontPadding
<p>New value for the property.</p>
* @platform android 3.3.0
*/
/**
* @method getLines
* <p>Gets the value of the {@link Titanium.UI.Label#property-lines} property.</p>
* @returns {Number}
* @platform android 4.1.0
*/
/**
* @method setLines
* <p>Sets the value of the {@link Titanium.UI.Label#property-lines} property.</p>
* @param {Number} lines
<p>New value for the property.</p>
* @platform android 4.1.0
*/
/**
* @method getLineSpacing
* <p>Gets the value of the {@link Titanium.UI.Label#property-lineSpacing} property.</p>
* @returns {Dictionary}
* @platform android 5.4.0
*/
/**
* @method setLineSpacing
* <p>Sets the value of the {@link Titanium.UI.Label#property-lineSpacing} property.</p>
* @param {Dictionary} lineSpacing
<p>New value for the property.</p>
* @platform android 5.4.0
*/
/**
* @method getMaxLines
* <p>Gets the value of the {@link Titanium.UI.Label#property-maxLines} property.</p>
* @returns {Number}
* @platform android 4.1.0
*/
/**
* @method setMaxLines
* <p>Sets the value of the {@link Titanium.UI.Label#property-maxLines} property.</p>
* @param {Number} maxLines
<p>New value for the property.</p>
* @platform android 4.1.0
*/
/**
* @method getMinimumFontSize
* <p>Gets the value of the {@link Titanium.UI.Label#property-minimumFontSize} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setMinimumFontSize
* <p>Sets the value of the {@link Titanium.UI.Label#property-minimumFontSize} property.</p>
* @param {Number} minimumFontSize
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getShadowColor
* <p>Gets the value of the {@link Titanium.UI.Label#property-shadowColor} property.</p>
* @returns {String}
* @platform android 3.2.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setShadowColor
* <p>Sets the value of the {@link Titanium.UI.Label#property-shadowColor} property.</p>
* @param {String} shadowColor
<p>New value for the property.</p>
* @platform android 3.2.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getShadowOffset
* <p>Gets the value of the {@link Titanium.UI.Label#property-shadowOffset} property.</p>
* @returns {Dictionary}
* @platform android 3.2.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setShadowOffset
* <p>Sets the value of the {@link Titanium.UI.Label#property-shadowOffset} property.</p>
* @param {Dictionary} shadowOffset
<p>New value for the property.</p>
* @platform android 3.2.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getShadowRadius
* <p>Gets the value of the {@link Titanium.UI.Label#property-shadowRadius} property.</p>
* @returns {Number}
* @platform android 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method setShadowRadius
* <p>Sets the value of the {@link Titanium.UI.Label#property-shadowRadius} property.</p>
* @param {Number} shadowRadius
<p>New value for the property.</p>
* @platform android 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @method getColor
* <p>Gets the value of the {@link Titanium.UI.Label#property-color} property.</p>
* @returns {String}
*/
/**
* @method setColor
* <p>Sets the value of the {@link Titanium.UI.Label#property-color} property.</p>
* @param {String} color
<p>New value for the property.</p>
*/
/**
* @method getFont
* <p>Gets the value of the {@link Titanium.UI.Label#property-font} property.</p>
* @returns {Font}
*/
/**
* @method setFont
* <p>Sets the value of the {@link Titanium.UI.Label#property-font} property.</p>
* @param {Font} font
<p>New value for the property.</p>
*/
/**
* @method getTextid
* <p>Gets the value of the {@link Titanium.UI.Label#property-textid} property.</p>
* @returns {String}
*/
/**
* @method setTextid
* <p>Sets the value of the {@link Titanium.UI.Label#property-textid} property.</p>
* @param {String} textid
<p>New value for the property.</p>
*/
/**
* @method getText
* <p>Gets the value of the {@link Titanium.UI.Label#property-text} property.</p>
* @returns {String}
*/
/**
* @method setText
* <p>Sets the value of the {@link Titanium.UI.Label#property-text} property.</p>
* @param {String} text
<p>New value for the property.</p>
*/
/**
* @method getTextAlign
* <p>Gets the value of the {@link Titanium.UI.Label#property-textAlign} property.</p>
* @returns {String/Number}
*/
/**
* @method setTextAlign
* <p>Sets the value of the {@link Titanium.UI.Label#property-textAlign} property.</p>
* @param {String/Number} textAlign
<p>New value for the property.</p>
*/
/**
* @method getVerticalAlign
* <p>Gets the value of the {@link Titanium.UI.Label#property-verticalAlign} property.</p>
* @returns {Number/String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setVerticalAlign
* <p>Sets the value of the {@link Titanium.UI.Label#property-verticalAlign} property.</p>
* @param {Number/String} verticalAlign
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getWordWrap
* <p>Gets the value of the {@link Titanium.UI.Label#property-wordWrap} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setWordWrap
* <p>Sets the value of the {@link Titanium.UI.Label#property-wordWrap} property.</p>
* @param {Boolean} wordWrap
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAttributedString
* <p>Gets the value of the {@link Titanium.UI.Label#property-attributedString} property.</p>
* @returns {Titanium.UI.AttributedString}
* @platform android 3.6.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @method setAttributedString
* <p>Sets the value of the {@link Titanium.UI.Label#property-attributedString} property.</p>
* @param {Titanium.UI.AttributedString} attributedString
<p>New value for the property.</p>
* @platform android 3.6.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property autoLink
* @type Number
* <p>Automatically convert certain text items in the label to clickable links.</p>
* @description <p>Multiple autolink values can be combined with a bitwise OR. For example:</p>
<pre><code>label.autoLink = Ti.UI.AUTOLINK_MAP_ADDRESSES|Ti.UI.AUTOLINK_PHONE_NUMBERS;
</code></pre>
<p>Prior to Release 3.0, this field used platform-specific constants. These are now
deprecated in favor of the <code>AUTOLINK</code> constants.</p>
<p>The Android-specific <code>LINKIFY</code> legacy constants are defined in {@link Titanium.UI.Android}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-AUTOLINK_MAP_ADDRESSES}
<li> {@link Titanium.UI#property-AUTOLINK_ALL}
<li> {@link Titanium.UI#property-AUTOLINK_CALENDAR}
<li> {@link Titanium.UI#property-AUTOLINK_URLS}
<li> {@link Titanium.UI#property-AUTOLINK_NONE}
<li> {@link Titanium.UI#property-AUTOLINK_PHONE_NUMBERS}
<li> {@link Titanium.UI#property-AUTOLINK_EMAIL_ADDRESSES}
</ul></p>
* @platform android 0.8
*/
/**
* @property backgroundPaddingBottom
* @type Number
* <p>Number of pixels to extend the background image past the label on the bottom.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property backgroundPaddingLeft
* @type Number
* <p>Number of pixels to extend the background image past the label on the left.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property backgroundPaddingRight
* @type Number
* <p>Number of pixels to extend the background image past the label on the right.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property backgroundPaddingTop
* @type Number
* <p>Number of pixels to extend the background image past the label on the top.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [ellipsize=Titanium.UI.TEXT_ELLIPSIZE_TRUNCATE_END]
* @type Number
* <p>Causes words in the text that are longer than the view is wide to be ellipsized instead of broken in the middle.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_ELLIPSIZE_TRUNCATE_WORD_WRAP}
<li> {@link Titanium.UI#property-TEXT_ELLIPSIZE_TRUNCATE_CHAR_WRAP}
<li> {@link Titanium.UI#property-TEXT_ELLIPSIZE_TRUNCATE_CLIP}
<li> {@link Titanium.UI#property-TEXT_ELLIPSIZE_TRUNCATE_START}
<li> {@link Titanium.UI#property-TEXT_ELLIPSIZE_TRUNCATE_MIDDLE}
<li> {@link Titanium.UI#property-TEXT_ELLIPSIZE_TRUNCATE_END}
<li> {@link Titanium.UI#property-TEXT_ELLIPSIZE_TRUNCATE_MARQUEE}
<li> {@link Titanium.UI#property-TEXT_ELLIPSIZE_TRUNCATE_NONE}
</ul></p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property highlightedColor
* @type String
* <p>Color of the label when in the highlighted state, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>Used when the label is part of a view that can be highlighted, such as a
{@link Titanium.UI.TableViewRow}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property html
* @type String
* <p>Simple HTML formatting.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @property [includeFontPadding=undefined but behaves as true]
* @type Boolean
* <p>Includes extra top and bottom padding to make room for accents that go above normal ascent and descent.</p>
* @platform android 3.3.0
*/
/**
* @property lines
* @type Number
* <p>Makes the label be exactly this many lines tall.</p>
* @platform android 4.1.0
*/
/**
* @property lineSpacing
* @type Dictionary
* <p>Line spacing of the {@link Titanium.UI.Label#property-text text}, as a dictionary with the properties <code>add</code> and <code>multiply</code>.</p>
* @platform android 5.4.0
*/
/**
* @property maxLines
* @type Number
* <p>Makes the label at most this many lines tall.</p>
* @platform android 4.1.0
*/
/**
* @property minimumFontSize
* @type Number
* <p>Minimum font size when the font is sized based on the contents.</p>
* @description <p>Enables font scaling to fit and forces the label content to be limited to a single line.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property shadowColor
* @type String
* <p>Shadow color of the {@link Titanium.UI.Label#property-text text}, as a color name or hex triplet.</p>
* @description <p>Use in conjunction with {@link Titanium.UI.Label#property-shadowOffset shadowOffset} and {@link Titanium.UI.Label#property-shadowRadius shadowRadius}.
For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 3.2.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property shadowOffset
* @type Dictionary
* <p>Shadow offset of the {@link Titanium.UI.Label#property-text text}, as a dictionary with the properties <code>x</code> and <code>y</code>.</p>
* @description <p>Use in conjunction with {@link Titanium.UI.Label#property-shadowColor shadowColor} and {@link Titanium.UI.Label#property-shadowRadius shadowRadius}.</p>
* @platform android 3.2.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property shadowRadius
* @type Number
* <p>Shadow radius of the {@link Titanium.UI.Label#property-text text}.</p>
* @description <p>Use in conjunction with {@link Titanium.UI.Label#property-shadowColor shadowColor} and {@link Titanium.UI.Label#property-shadowOffset shadowOffset}.</p>
* @platform android 3.2.0
* @platform mobileweb 3.2.0
*/
/**
* @property color
* @type String
* <p>Color of the label text, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property font
* @type Font
* <p>Font to use for the label text.</p>
*/
/**
* @property textid
* @type String
* <p>Key identifying a string from the locale file to use for the label text.</p>
* @description <p>Only one of <code>text</code> or <code>textid</code> should be specified.</p>
*/
/**
* @property text
* @type String
* <p>Label text.</p>
* @description <p>Use the backslash and letter <code>n</code> line feed character combination, ie <code>\n</code>, to force a new
line. </p>
<p>Use unicode characters, such as those included in (but not limited to) the
<a href="http://en.wikibooks.org/w/index.php?title=Unicode/List_of_useful_symbols">Unicode List of Useful Symbols</a>
section of wikipedia, to insert special characters and symbols.</p>
<p>See the example in {@link Titanium.UI.Label label} for a demonstration.</p>
*/
/**
* @property textAlign
* @type String/Number
* <p>Text alignment.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_CENTER}
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_LEFT}
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_RIGHT}
</ul></p>
*/
/**
* @property [verticalAlign=Titanium.UI.TEXT_VERTICAL_ALIGNMENT_CENTER on Mobile Web. Undefined on Android, iPhone and iPad.]
* @type Number/String
* <p>Vertical text alignment, specified using one of the vertical alignment constants
from {@link Titanium.UI}.</p>
* @description <p>On iPhone and iPad the default value of the property is undefined. The behavior of the label
depends on the actual content height. If the actual content height is larger than the available
height the text is truncated at the end and the content is center aligned.</p>
<p>On Android, the default value of the property is undefined, and the default
behavior when the property is undefined is to center the text vertically.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_BOTTOM}
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_CENTER}
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_TOP}
</ul></p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property [wordWrap=true]
* @type Boolean
* <p>Enable or disable word wrapping in the label.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property attributedString
* @type Titanium.UI.AttributedString
* <p>Specify an attributed string for the label.</p>
* @description <p>The underlying attributed string drawn by the label. If set, avoid setting common attributes
in the label, such as <code>color</code> and <code>font</code>, as unexpected behaviors may result. </p>
<p>Prior to Release 3.6.0, assign this property an object from the
{@link Titanium.UI.iOS.AttributedString} class.</p>
<p>Since Appcelerator CLI 4.1.0 (Alloy 1.7.0), for Alloy, you can use an <code><AttributedString></code>
element inside a <code><Label></code> element and set the text property as node text:</p>
<pre><code><Alloy>
<Window>
<Label>
<AttributedString>
Alloy is great!
</AttributedString>
</Label>
</Window>
</Alloy>
</code></pre>
<p>Then set attributes in the TSS file:</p>
<pre><code>"AttributedString" : {
attributes: [
{
type: Ti.UI.ATTRIBUTE_FOREGROUND_COLOR,
value: 'red',
range: [0, 5]
},
{
type: Ti.UI.ATTRIBUTE_UNDERLINES_STYLE,
value: Ti.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE,
range: [9, 5]
}
]
}
</code></pre>
* @platform android 3.6.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.UI.ListItem
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ListItem.yml
* <p>A list item is an individual item in a list section.</p>
* @description <p>A list item is a combination of a {@link ListDataItem} and {@link ItemTemplate}. The list data item
represents the actual data, while the item template represents the style elements of the item.</p>
<p>You do not create <code>ListItem</code> objects with a JavaScript factory method, as you do other Titanium proxies.
Instead, you pass a {@link ListDataItem} array to the <code>setItems</code> method of a <code>ListSection</code>. The list data items
contain the data you want to display in the list.</p>
<p>Alloy applications can use <strong><code><ListItem></code></strong> elements to create <code>ListItem</code> objects. <code><ListItem></code> elements
must be nested inside a <strong><code><ListSection></code></strong> element, which itself is nested in a <code><ListView></code> element,
as shown below:</p>
<pre><code><Alloy>
<ListView id="list">
<ListSection id="accounts">
<ListItem image="images/checking_account.png" title="Checking"/>
<ListItem image="images/saving_account.png" title="Savings"/>
</ListSection>
</ListView>
</Alloy>
</code></pre>
<p>By default, only the <code>title</code>, <code>image</code> and <code>accessoryType</code> keys of the list data item's
<code>properties</code> dictionary are displayed if an item template is not defined. See "Default List Item"
for an example of using the default template.</p>
<p>See Examples below.</p>
<h4>Item Templates</h4>
<p>To customize the style of a list item, use an item template to create your view structure.</p>
<p>Add key-value pairs of view properties and their values to the <code>properties</code> dictionary of the
item template to set view properties of the list item.</p>
<p><strong>Note:</strong> If possible, do not use <code>Ti.UI.SIZE</code> or non-static dimensions to set the
dimensions of view elements in list items. Instead, try to use static dimensions. Scrolling in
the list view may be jerky if you use non-static dimensions.</p>
<p>Add key-value pairs of event names and their callback functions (or array of callback functions
for multiple callback bindings) to the <code>events</code> dictionary of the item template to bind callbacks
to events, which are bubbled from the subcomponents of the item.</p>
<p>Add additional views, such as labels or image views, to the <code>childTemplates</code> array of the item
template. The child templates are item templates with two extra properties:</p>
<ul>
<li>Set the <code>type</code> property to a Titanium view class, such as <code>Ti.UI.Label</code> or <code>Ti.UI.ImageView</code>,
to use that view in your template.</li>
<li>Set the <code>bindId</code> to bind the template to a custom property in the list data item. The custom
properties in the list data item contain key-value pairs of view properties and their values.</li>
</ul>
<p>A list template supports the following view classes:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator}</li>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.ImageView}</li>
<li>{@link Titanium.UI.Label}</li>
<li>{@link Titanium.UI.ProgressBar}</li>
<li>{@link Titanium.UI.Slider}</li>
<li>{@link Titanium.UI.Switch}</li>
<li>{@link Titanium.UI.TextArea}</li>
<li>{@link Titanium.UI.TextField}</li>
</ul>
<p>For example, suppose you have a list data item defined as <code>{foo:{text: 'foobar'}}</code> and an item
template defined as <code>{childTemplates: [{type: 'Ti.UI.Label', bindId: 'foo'}]}</code>. The <code>foo</code>
property in the list data item binds to the label in the template, which sets the <code>text</code>
property of the label in the template to the <code>text</code> property in the list data item.</p>
<p>To bind the list data item to an item template, use the <Titanium.UI.ListView.templates>
property to map the template to a style name, then use the style name to either set the
{@link Titanium.UI.ListView#property-defaultItemTemplate} property to globally set the style for all items or set the
<code>template</code> property of the list data item to override or individually set the style.</p>
<p>On iOS, you can specify one of the template constants for the {@link ListDataItem#property-template} property
or {@link Titanium.UI.ListView#property-defaultItemTemplate} property: {@link Titanium.UI#property-LIST_ITEM_TEMPLATE_CONTACTS},
{@link Titanium.UI#property-LIST_ITEM_TEMPLATE_SETTINGS} or {@link Titanium.UI#property-LIST_ITEM_TEMPLATE_SUBTITLE}.</p>
<h4>Eventing</h4>
<p>Unlike other views, you cannot use the <code>addEventListener</code> method to bind callbacks to events for a
ListItem.</p>
<p>Use list view's <a href="Titanium.UI.ListView.itemclick">itemclick</a> event to monitor click events on
items in the list view. Do not rely on the <code>source</code> property to determine which item fired the
event. Either use the <code>sectionIndex</code> and <code>itemIndex</code>, or the <code>itemId</code> to determine the list item
that generated the event, and use the <code>bindId</code> to check which child control fired the event.
See "Default List Item" for an example of using the <code>itemclick</code> event.</p>
<p>To monitor events that bubble to the <code>ListItem</code> or to monitor events of the view subcomponents,
bind them to the item by using the <code>events</code> dictionary of the item template or the child view
templates, respectively. Add the bindings as key-value pairs, where the key is the event name
and the value is the callback (or array of callbacks for multiple bindings). See "List Items
with an Item Template" for an example of binding a <code>click</code> event to an item using an item template.</p>
* <h3>Examples</h3>
<h4>Default List Items</h4>
<p>Creates a list without using an item template. Monitors the <code>itemclick</code> event to check and
uncheck tasks.</p>
<pre><code>var win = Ti.UI.createWindow({backgroundColor: 'white'});
var listView = Ti.UI.createListView();
var tasks = [
{id: 'trash', name: 'Take Out the Trash', icon: 'trash.png'},
{id: 'dishes', name: 'Do the Dishes', icon: 'dishes.png'},
{id: 'doggie', name: 'Walk the Dog', icon: 'doggie.png'}
];
var data = [];
for (var i = 0; i < tasks.length; i++) {
data.push(
{ properties: {
itemId: tasks[i].id,
title: tasks[i].name,
image: tasks[i].icon,
accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_NONE,
color: 'black'
}
});
}
var section = Ti.UI.createListSection();
section.setItems(data);
listView.sections = [section];
listView.addEventListener('itemclick', function(e){
var item = section.getItemAt(e.itemIndex);
if (item.properties.accessoryType == Ti.UI.LIST_ACCESSORY_TYPE_NONE) {
item.properties.accessoryType = Ti.UI.LIST_ACCESSORY_TYPE_CHECKMARK;
item.properties.color = 'red';
}
else {
item.properties.accessoryType = Ti.UI.LIST_ACCESSORY_TYPE_NONE;
item.properties.color = 'black';
}
section.updateItemAt(e.itemIndex, item);
});
win.add(listView);
win.open();
</code></pre><h4>Default List Items (Alloy version)</h4>
<p>Alloy version of previous example. For additional Alloy examples of using <code>ListView</code>, see {@link Titanium.UI.ListView}. </p>
<p>index.xml</p>
<pre><code><!-- views/index.xml -->
<Alloy>
<Window class="container" title="Some things">
<ListView id="listView">
<ListSection id="section">
<ListItem image="images/trash.jpg" title="Take Out the Trash"/>
<ListItem image="images/dishes.png" title="Do the Dishes"/>
<ListItem image="images/doge.png" title="Walk the Dog"/>
</ListSection>
</ListView>
</Window>
</Alloy>
</code></pre>
<p>index.js</p>
<pre><code><!-- controllers/index.js -->
$.listView.addEventListener('itemclick', function(e){
var item = $.section.getItemAt(e.itemIndex);
if (item.properties.accessoryType == Ti.UI.LIST_ACCESSORY_TYPE_NONE) {
item.properties.accessoryType = Ti.UI.LIST_ACCESSORY_TYPE_CHECKMARK;
item.properties.color = 'red';
}
else {
item.properties.accessoryType = Ti.UI.LIST_ACCESSORY_TYPE_NONE;
item.properties.color = 'black';
}
$.section.updateItemAt(e.itemIndex, item);
});
</code></pre><h4>List Items with an Item Template</h4>
<p>Previous example modified to use an item template. The template defines a small icon on the
far left, a title label to the right of the icon and a subtitle below the title label in
smaller text.</p>
<p>Monitors the <code>click</code> event of the item rather than the <code>itemclick</code> event of the list view.</p>
<pre><code>var win = Ti.UI.createWindow({backgroundColor: 'white'});
var plainTemplate = {
childTemplates: [
{ // Image justified left
type: 'Ti.UI.ImageView', // Use an image view for the image
bindId: 'pic', // Maps to a custom pic property of the item data
properties: { // Sets the image view properties
width: '50dp', height: '50dp', left: 0
}
},
{ // Title
type: 'Ti.UI.Label', // Use a label for the title
bindId: 'title', // Maps to a custom title property of the item data
properties: { // Sets the label properties
color: 'black',
font: { fontFamily:'Arial', fontSize: '20dp', fontWeight:'bold' },
left: '60dp', top: 0,
},
},
{ // Subtitle
type: 'Ti.UI.Label', // Use a label for the subtitle
bindId: 'subtitle', // Maps to a custom subtitle property of the item data
properties: { // Sets the label properties
color: 'gray',
font: { fontFamily:'Arial', fontSize: '14dp' },
left: '60dp', top: '25dp',
}
}
],
// Binds a callback to the click event, which catches events bubbled by the view subcomponents.
events: {click: toggleCheck }
};
// The following JSON API calls copy the plainTemplate object minus functions.
// This method of copying an object is simple but not quick.
// If performance is a factor, create your own method to copy an object.
var redTemplate = JSON.parse(JSON.stringify(plainTemplate));
// Change the text color to red
redTemplate.childTemplates[1].properties.color = 'red';
redTemplate.childTemplates[2].properties.color = 'red';
// Rebind the click event callback
redTemplate.events.click = toggleCheck;
var listView = Ti.UI.createListView({
// Maps plainTemplate to 'uncheck' and redTemplate to 'check'
templates: { 'uncheck': plainTemplate, 'check': redTemplate },
// Use 'uncheck', that is, the plainTemplate created earlier for all items
// Can be overridden by the item's template property
defaultItemTemplate: 'uncheck'
});
var tasks = [
{id: 'trash', name: 'Take Out the Trash', person: 'Yakko', icon: 'trash.png'},
{id: 'dishes', name: 'Do the Dishes', person: 'Wakko', icon: 'dishes.png'},
{id: 'doggie', name: 'Walk the Dog', person: 'Dot', icon: 'doggie.png'}
];
var data = [];
for (var i = 0; i < tasks.length; i++) {
data.push({
// Maps to the title component in the template
// Sets the text property of the Label component
title : { text: tasks[i].name },
// Maps to the subtitle component in the template
// Sets the text property of the Label component
subtitle : { text : tasks[i].person },
// Maps to the pic component in the template
// Sets the image property of the ImageView component
pic : { image : tasks[i].icon },
// Sets the regular list data properties
properties : {
itemId: tasks[i].id,
accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_NONE,
}
});
}
var section = Ti.UI.createListSection();
section.setItems(data);
listView.sections = [section];
// Modified version of the `itemclick` event listener
// Changes the item template rather than the list item's color property
function toggleCheck (e) {
var item = section.getItemAt(e.itemIndex);
if (item.properties.accessoryType == Ti.UI.LIST_ACCESSORY_TYPE_NONE) {
item.properties.accessoryType = Ti.UI.LIST_ACCESSORY_TYPE_CHECKMARK;
item.template = 'check';
}
else {
item.properties.accessoryType = Ti.UI.LIST_ACCESSORY_TYPE_NONE;
item.template = 'uncheck';
}
section.updateItemAt(e.itemIndex, item);
}
win.add(listView);
win.open();
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Titanium.UI.ListItem#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Titanium.UI.ListItem#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
/**
* @method getEditActions
* <p>Gets the value of the {@link Titanium.UI.ListItem#property-editActions} property.</p>
* @returns {RowActionType[]}
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @method setEditActions
* <p>Sets the value of the {@link Titanium.UI.ListItem#property-editActions} property.</p>
* @param {Array<RowActionType>} editActions
<p>New value for the property.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
/**
* @property [accessoryType=Titanium.UI.LIST_ACCESSORY_TYPE_NONE]
* @type Number
* <p>Sets an accessory on the right side of an item.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-LIST_ACCESSORY_TYPE_NONE}
<li> {@link Titanium.UI#property-LIST_ACCESSORY_TYPE_CHECKMARK}
<li> {@link Titanium.UI#property-LIST_ACCESSORY_TYPE_DETAIL}
<li> {@link Titanium.UI#property-LIST_ACCESSORY_TYPE_DISCLOSURE}
</ul></p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property [selectedBackgroundColor=Transparent]
* @type String
* <p>Background color of the view, as a color name or hex triplet when item is selected.</p>
* @description <p>On Android, clicking on ListItem's sub-views will not trigger this unless these views have 'touchEnabled' set to false.
For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property selectedBackgroundImage
* @type String
* <p>Background image to render when the item is selected.</p>
* @description <p>Must be a local resource.
On Android, clicking on ListItem's sub-views will not trigger this unless these views have 'touchEnabled' set to false.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property selectedBackgroundGradient
* @type Gradient
* <p>Background gradient to render when the item is selected.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [canEdit=false]
* @type Boolean
* <p>Specifies if the item can be deleted by a user initiated action.</p>
* @description <p>For more information see the "Editing Support" section of {@link Titanium.UI.ListView}.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [canInsert=false]
* @type Boolean
* <p>Specifies if the item can be inserted by a user initiated action.</p>
* @description <p>For more information see the "Editing Support" section of {@link Titanium.UI.ListView}.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property [canMove=false]
* @type Boolean
* <p>Specifies if the item can be reordered within the list view by a user initiated action.</p>
* @description <p>For more information see the "Editing Support" section of {@link Titanium.UI.ListView}.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property editActions
* @type RowActionType[]
* <p>Specifies custom action items to be shown when when a list item is edited.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>For more information see the "Editing Support" section of {@link Titanium.UI.ListView}.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @property searchableText
* @type String
* <p>The text to match against when the {@link Titanium.UI.ListView ListView} is performing a search.</p>
* @description <p>Used in conjunction with {@link Titanium.UI.ListView#property-searchView searchView}, {@link Titanium.UI.ListView#property-searchText searchText} and {@link Titanium.UI.ListView#property-caseInsensitiveSearch caseInsensitiveSearch} properties of ListView.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [font=System default font.]
* @type Font
* <p>Font to use for the item title.</p>
* @description <p>Only applies to the built-in templates.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property height
* @type Number/String
* <p>Row height in platform-specific units.</p>
* @description <p>On Android, the value can be either a float value or a dimension string, for example, '40dp'.
By default, the minimum height is 30 dp on the Android platform.</p>
<p>On iOS, the value can only be an absolute value.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property image
* @type String
* <p>Image to render in the image area of the item, specified as a local path or URL.</p>
* @description <p>On iOS, the image is on the left, and on Android, the image is on the right.</p>
<p>On Android, this image only appears on the default template.</p>
<p>On iOS, only local images are supported.</p>
<p>On iOS, this image only appears if the ListDataItem <code>template</code> property or ListView
<code>defaultItemTemplate</code> property is either: {@link Titanium.UI#property-LIST_ITEM_TEMPLATE_DEFAULT},
{@link Titanium.UI#property-LIST_ITEM_TEMPLATE_SETTINGS} or {@link Titanium.UI#property-LIST_ITEM_TEMPLATE_SUBTITLE}.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property selectionStyle
* @type Number
* <p>Selection style constant to control the selection color.</p>
* @description <p>Specify one of the constants from {@link Titanium.UI.iOS.ListViewCellSelectionStyle}.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property [backgroundColor=Transparent]
* @type String
* <p>Background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property backgroundGradient
* @type Gradient
* <p>Background gradient to render when the item is not selected.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property backgroundImage
* @type String
* <p>Background image to render when the item is not selected.</p>
* @description <p>Must be a local resource.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property color
* @type String
* <p>Default text color of the item when not selected, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
<p>On Android, <code>selectedColor</code> is not supported, so the text is always displayed in this color.</p>
<p>Only applies to the built-in templates.</p>
*/
/**
* @property itemId
* @type String
* <p>A user defined string that gets passed to events.</p>
*/
/**
* @property subtitle
* @type String
* <p>Subtitle to set in the text area of the item.</p>
* @description <p>This subtitle only appears if the ListDataItem <code>template</code> property or ListView
<code>defaultItemTemplate</code> property is set to either: {@link Titanium.UI#property-LIST_ITEM_TEMPLATE_CONTACTS},
{@link Titanium.UI#property-LIST_ITEM_TEMPLATE_SETTINGS} or {@link Titanium.UI#property-LIST_ITEM_TEMPLATE_SUBTITLE}.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @property title
* @type String
* <p>Title to set in the text area of the item.</p>
* @description <p>This title only appears for the built-in templates.</p>
*/
/**
* @class ItemTemplate
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ListItem.yml
* <p>Template that represents the basic appearance of a list item.</p>
* @description <p>See {@link Titanium.UI.ListItem} for examples of using an item template.</p>
*/
/**
* @property properties
* @type Dictionary<Titanium.UI.ListItem>
* <p>Contains key-value pairs of view properties and their values that are applied to the ListItem.</p>
* @description <p>If there are properties set in the {@link ListDataItem}, the properties set in the template are
overridden by the ones set in the list data item.</p>
*/
/**
* @property events
* @type Dictionary
* <p>Contains key-value pairs of view events and their listeners that are applied to the ListItem.</p>
* @description <p>Array values are considered as multiple event listeners for that event.</p>
<p>Event listeners added here respond to bubbled events fired from the view subcomponents.</p>
*/
/**
* @property childTemplates
* @type ViewTemplate[]
* <p>Contains an array of subview templates to be added (in order) as children to this view.</p>
*/
/**
* @class ViewTemplate
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ListItem.yml
* <p>Template that represents a view subcomponent of an {@link ItemTemplate}.</p>
* @description <p>See {@link Titanium.UI.ListItem} for examples of using an item template.</p>
*/
/**
* @property type
* @type String
* <p>View's class name, for example, <code>Ti.UI.Button</code>.</p>
* @description <p>Only the following view classes are supported:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator}</li>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.ImageView}</li>
<li>{@link Titanium.UI.Label}</li>
<li>{@link Titanium.UI.ProgressBar}</li>
<li>{@link Titanium.UI.Slider}</li>
<li>{@link Titanium.UI.Switch}</li>
<li>{@link Titanium.UI.TextArea}</li>
<li>{@link Titanium.UI.TextField}</li>
</ul>
*/
/**
* @property bindId
* @type String
* <p>View's ID (or set of IDs) used for data binding. This value must be unique.</p>
*/
/**
* @property properties
* @type Dictionary
* <p>Contains key-value pairs of view properties and their values that are applied to this view component.</p>
*/
/**
* @property events
* @type Dictionary
* <p>Contains key-value pairs of view events and their listeners that are applied to this view component.</p>
* @description <p>Array values are considered as multiple event listeners for that event.</p>
*/
/**
* @property childTemplates
* @type ViewTemplate[]
* <p>Contains an array of subview templates to be added (in order) as children to this view.</p>
*/
/**
* @class ListDataItem
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ListItem.yml
* <p>Represents displayed item data.</p>
* @description <p>In addition to the properties defined below, you can define custom key-value pairs, which bind to
the child templates of an {@link ItemTemplate}. The key for these pairs match the <code>bindId</code> of
the child view templates and the values are a dictionary of view properties applied to the view components.
Any other properties that are not identified by a <code>bindId</code> are permitted but are ignored by the item template.</p>
<p>See {@link Titanium.UI.ListItem} for examples of using a list data item.</p>
*/
/**
* @property [template=If the ListView's `defaultItemTemplate` property is not set,
then {@link Titanium.UI#property-LIST_ITEM_TEMPLATE_DEFAULT} is used.
]
* @type String/Number
* <p>Template ID configured with the <Titanium.UI.ListView.templates> property or
{@link Titanium.UI#property-LIST_ITEM_TEMPLATE_DEFAULT}.</p>
* @description <p>On iOS, you can specify one of the following pre-defined templates:
{@link Titanium.UI#property-LIST_ITEM_TEMPLATE_CONTACTS},
{@link Titanium.UI#property-LIST_ITEM_TEMPLATE_SETTINGS} or {@link Titanium.UI#property-LIST_ITEM_TEMPLATE_SUBTITLE}.</p>
*/
/**
* @property properties
* @type Dictionary<Titanium.UI.ListItem>
* <p>Contains key-value pairs of view properties and their values that are applied to the
<code>ListItem</code>.</p>
* @description <p>If there are properties set in the {@link ItemTemplate} (not the children view templates),
the values set in the list data item override the template's properties.</p>
*/
/**
* @class RowActionType
* @platform iphone 4.1.0
* @platform ipad 4.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ListItem.yml
* <p>Represents the custom edit action for a ListItem.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>By default when a listItem has {@link Titanium.UI.ListItem#property-canEdit canEdit} set to true, a left swipe on the the row presens the 'Delete' button.
This object lets developers define custom titles for editing actions supported on the row.
This object is used in conjunction with the {@link Titanium.UI.ListItem#property-editActions editActions} property and
<a href="Titanium.UI.ListView.editaction">editaction</a> event. </p>
*/
/**
* @property title
* @type String
* <p>The title of the row action.</p>
*/
/**
* @property identifier
* @type String
* <p>The [identifier](RowActionType. identifier) of the row action. Only included in the event
if previously defined. Available in Titanium 6.0.0 and later.</p>
*/
/**
* @property style
* @type Number
* <p>The style of the row action.</p>
* @description <p>Use one of {@link Titanium.UI.iOS#property-ROW_ACTION_STYLE_DEFAULT}, {@link Titanium.UI.iOS#property-ROW_ACTION_STYLE_DESTRUCTIVE} or
{@link Titanium.UI.iOS#property-ROW_ACTION_STYLE_NORMAL} </p>
*/
/**
* @property color
* @type String
* <p>The background color of the row action.</p>
* @description <p>By default the background color of the row action is defined by the style applied. Use this property to
override the default background color of the row action.</p>
*/
/**
* @class Titanium.UI.ListSection
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ListSection.yml
* <p>A list section is a container within a list view used to organize list items.</p>
* @description <p>Use the {@link Titanium.UI#method-createListSection} method or <strong><code><ListSection></code></strong> Alloy element to create a <code>ListSection</code>.</p>
<p>List sections are used to manipulate and organize list items contained within it. For examples
of using list sections, see the examples in {@link Titanium.UI.ListView} and {@link Titanium.UI.ListItem}.</p>
* <h3>Examples</h3>
<h4>Alloy XML Markup</h4>
<p>ListSection is supported by Alloy 1.2.0 and later.</p>
<p>HeaderView and FooterView are supported on Alloy 1.3.0 and later.</p>
<pre><code><Alloy>
<Window fullscreen="true">
<ListView>
<ListSection>
<!-- Sets ListSection's headerView property -->
<HeaderView>
<View backgroundColor="#DDD" height="Ti.UI.SIZE">
<Label>Fruits</Label>
</View>>
</HeaderView>
<ListItem title="Apple" />
<ListItem title="Orange" />
<ListItem title="Pear" />
<!-- Sets ListSection's footerView property -->
<FooterView>
<View backgroundColor="#DDD" height="Ti.UI.SIZE">
<Label>3 items</Label>
</View>
</FooterView>
</ListSection>
</ListView>
</Window>
</Alloy>
</code></pre>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method setItems
* <p>Sets the data entries in the list section.</p>
* @description <p>On iOS, the list item(s) can be inserted with an animation by specifying the <code>animation</code> parameter.</p>
* @param {Array<ListDataItem>} dataItems
<p>List items to set.</p>
* @param {ListViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method appendItems
* <p>Appends the data entries to the end of the list section.</p>
* @description <p>On iOS, the list item(s) can be inserted with an animation by specifying the <code>animation</code> parameter.</p>
* @param {Array<ListDataItem>} dataItems
<p>List items to add.</p>
* @param {ListViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method insertItemsAt
* <p>Inserts data entries to the list section at the specified index.</p>
* @description <p>On iOS, the list item(s) can be inserted with an animation by specifying the <code>animation</code> parameter.</p>
* @param {Number} itemIndex
<p>Index of where to insert the items.</p>
* @param {Array<ListDataItem>} dataItems
<p>List items to insert.</p>
* @param {ListViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method replaceItemsAt
* <p>Removes count entries from the list section at the specified index,
then inserts data entries to the list section at the same index.</p>
* @description <p>On iOS, the list item(s) can be replaced with an animation by specifying the <code>animation</code> parameter.</p>
* @param {Number} index
<p>Index of where to remove then insert items.</p>
* @param {Number} count
<p>Number of list items to remove.</p>
* @param {Array<ListDataItem>} dataItems
<p>List items to insert.</p>
* @param {ListViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method deleteItemsAt
* <p>Removes count entries from the list section at the specified index.</p>
* @description <p>On iOS, the list item(s) can be removed with an animation by specifying the <code>animation</code> parameter.</p>
* @param {Number} itemIndex
<p>Index of where to remove items.</p>
* @param {Number} count
<p>Number of items to remove.</p>
* @param {ListViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method getItemAt
* <p>Returns the item entry from the list view at the specified index.</p>
* @param {Number} itemIndex
<p>Index of where to retrieve an item.</p>
* @returns {ListDataItem}
*/
/**
* @method updateItemAt
* <p>Updates an item at the specified index.</p>
* @description <p>On iOS, the list item can be updated with an animation by specifying the <code>animation</code> parameter.</p>
* @param {Number} index
<p>Index of where to update the item.</p>
* @param {ListDataItem} dataItem
<p>List item to update.</p>
* @param {ListViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Titanium.UI.ListSection#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Titanium.UI.ListSection#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
* @method getFooterTitle
* <p>Gets the value of the {@link Titanium.UI.ListSection#property-footerTitle} property.</p>
* @returns {String}
*/
* @method setFooterTitle
* <p>Sets the value of the {@link Titanium.UI.ListSection#property-footerTitle} property.</p>
* @param {String} footerTitle
<p>New value for the property.</p>
*/
* @method getHeaderTitle
* <p>Gets the value of the {@link Titanium.UI.ListSection#property-headerTitle} property.</p>
* @returns {String}
*/
* @method setHeaderTitle
* <p>Sets the value of the {@link Titanium.UI.ListSection#property-headerTitle} property.</p>
* @param {String} headerTitle
<p>New value for the property.</p>
*/
* @method getFooterView
* <p>Gets the value of the {@link Titanium.UI.ListSection#property-footerView} property.</p>
* @returns {Titanium.UI.View}
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform windowsphone 4.1.0
*/
* @method setFooterView
* <p>Sets the value of the {@link Titanium.UI.ListSection#property-footerView} property.</p>
* @param {Titanium.UI.View} footerView
<p>New value for the property.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @method getItems
* <p>Gets the value of the {@link Titanium.UI.ListSection#property-items} property.</p>
* @returns {ListDataItem[]}
*/
/**
* @method setItems
* <p>Sets the value of the {@link Titanium.UI.ListSection#property-items} property.</p>
* @param {Array<ListDataItem>} items
<p>New value for the property.</p>
*/
* @method getHeaderView
* <p>Gets the value of the {@link Titanium.UI.ListSection#property-headerView} property.</p>
* @returns {Titanium.UI.View}
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform windowsphone 4.1.0
*/
* @method setHeaderView
* <p>Sets the value of the {@link Titanium.UI.ListSection#property-headerView} property.</p>
* @param {Titanium.UI.View} headerView
<p>New value for the property.</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
* @property footerTitle
* @type String
* <p>Title of this section footer.</p>
* @description <p>Using this property and <code>footerView</code> together is not supported. Use one or the other.</p>
*/
* @property headerTitle
* @type String
* <p>Title of this section header.</p>
* @description <p>Using this property and <code>headerView</code> together is not supported. Use one or the other.</p>
*/
* @property footerView
* @type Titanium.UI.View
* <p>View to use for this section footer.</p>
* @description <p>Using this property and <code>footerTitle</code> together is not supported. Use one or the other.
In Alloy you can specify this property with a <code><FooterView></code> child element of a <code><ListSection></code>
element (see Examples).</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @property items
* @type ListDataItem[]
* <p>Items of this list section.</p>
*/
* @property headerView
* @type Titanium.UI.View
* <p>View to use for this section header.</p>
* @description <p>Using this property and <code>headerTitle</code> together is not supported. Use one or the other.
In Alloy you can specify this property with a <code><HeaderView></code> child element of a <code><ListSection></code>
element (see Examples).</p>
* @platform android 3.2.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.UI.MaskedImage
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/MaskedImage.yml
* <p>A control that displays an image composited with a background image or color.</p>
* @description <p>This is an iOS-specific control that can be used to display an image combined with
another image and/or color. The layers are drawn in the following order:</p>
<ul>
<li>The <code>mask</code>, or background image.</li>
<li>The <code>image</code>, or foreground image.</li>
<li>The <code>tint</code>, or constant tint color.</li>
</ul>
<p>The way the layers are combined depends on the value of the <code>mode</code> property.
The <code>mode</code> value can be set to one of the {@link Titanium.UI.iOS} <code>BLEND_MODE</code> constants.
These constants correspond directly to the iOS blend modes described in the iOS developer
library:</p>
<p><a href="http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Reference/CGContext/Reference/reference.html#//apple_ref/c/tdef/CGBlendMode">"CGBlendMode" in CGContext Reference</a></p>
<p>and:</p>
<p><a href="http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_images/dq_images.html#//apple_ref/doc/uid/TP30001066-CH212-TPXREF101">"Using Blend Modes with Images" in Quartz2D
Reference</a></p>
<p>When compositing two images, the <code>mask</code> property specifies the background, or
destination (D) image, and the <code>image</code> property specifies the foreground, or
source (S) layer. For example, to use an image as an alpha mask for another image,
you could use the following code:</p>
<pre><code>var imageMask = Titanium.UI.createMaskedImage({
mask : 'mask.png', // alpha mask
image : 'demo_image.png', // image to mask
mode : Titanium.UI.iOS.BLEND_MODE_SOURCE_OUT
});
</code></pre>
<p>Note that this legacy control lacks many of the features associated with a standard
{@link Titanium.UI.ImageView ImageView} control.</p>
<p>Use the {@link Titanium.UI#method-createMaskedImage} method to create a masked image view.</p>
* <h3>Examples</h3>
<h4>Luminosity Blend Mode</h4>
<p>The following code excerpt creates a monochrome version of the background image,
using the luminosity from the background image and the specified <code>tint</code> color:</p>
<pre><code>var imageMask = Titanium.UI.createMaskedImage({
mask : 'demo_image.png', // background image
tint: 'red',
mode : Titanium.UI.iOS.BLEND_MODE_LUMINOSITY,
});
</code></pre>
*/
/**
* @method getMask
* <p>Gets the value of the {@link Titanium.UI.MaskedImage#property-mask} property.</p>
* @returns {String}
*/
/**
* @method setMask
* <p>Sets the value of the {@link Titanium.UI.MaskedImage#property-mask} property.</p>
* @param {String} mask
<p>New value for the property.</p>
*/
/**
* @method getImage
* <p>Gets the value of the {@link Titanium.UI.MaskedImage#property-image} property.</p>
* @returns {String}
*/
/**
* @method setImage
* <p>Sets the value of the {@link Titanium.UI.MaskedImage#property-image} property.</p>
* @param {String} image
<p>New value for the property.</p>
*/
/**
* @method getMode
* <p>Gets the value of the {@link Titanium.UI.MaskedImage#property-mode} property.</p>
* @returns {Number}
*/
/**
* @method setMode
* <p>Sets the value of the {@link Titanium.UI.MaskedImage#property-mode} property.</p>
* @param {Number} mode
<p>New value for the property.</p>
*/
/**
* @method getTint
* <p>Gets the value of the {@link Titanium.UI.MaskedImage#property-tint} property.</p>
* @returns {String}
*/
/**
* @method setTint
* <p>Sets the value of the {@link Titanium.UI.MaskedImage#property-tint} property.</p>
* @param {String} tint
<p>New value for the property.</p>
*/
/**
* @property mask
* @type String
* <p>Image drawn as the background image.</p>
* @description <p>Specify a local file path. </p>
<p>Unlike the standard {@link Titanium.UI.ImageView ImageView}, images <strong>cannot</strong> be specified
using a remote URL, {@link Titanium.Blob}, or {@link Titanium.Filesystem.File} object.</p>
*/
/**
* @property image
* @type String
* <p>Image drawn as the Foreground image.</p>
* @description <p>Specify a local file path.</p>
<p>Unlike the standard {@link Titanium.UI.ImageView ImageView}, images <strong>cannot</strong> be specified
using a remote URL, {@link Titanium.Blob}, or {@link Titanium.Filesystem.File} object.</p>
*/
/**
* @property [mode=Titanium.UI.iOS.BLEND_MODE_SOURCE_IN]
* @type Number
* <p>Blend mode to use to combine layers.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_CLEAR}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_COLOR}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_COLOR_BURN}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_COLOR_DODGE}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_COPY}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_DARKEN}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_DESTINATION_ATOP}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_DESTINATION_IN}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_DESTINATION_OUT}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_DESTINATION_OVER}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_DIFFERENCE}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_EXCLUSION}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_HARD_LIGHT}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_HUE}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_LIGHTEN}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_LUMINOSITY}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_MULTIPLY}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_NORMAL}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_OVERLAY}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_PLUS_DARKER}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_PLUS_LIGHTER}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_SATURATION}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_SCREEN}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_SOFT_LIGHT}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_SOURCE_ATOP}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_SOURCE_IN}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_SOURCE_OUT}
<li> {@link Titanium.UI.iOS#property-BLEND_MODE_XOR}
</ul></p>
*/
/**
* @property tint
* @type String
* <p>Color to combine with the image, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @class Titanium.UI.MobileWeb
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/MobileWeb/MobileWeb.yml
* <p>The UI capabilities specific to Mobile Web. All events, methods and properties in this namespace
will only work on this platform.</p>
*/
/**
* @method createNavigationGroup
* <p>Creates and returns an instance of {@link Titanium.UI.MobileWeb.NavigationGroup}.</p>
* @param {Dictionary<Titanium.UI.MobileWeb.NavigationGroup>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.MobileWeb.NavigationGroup} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.MobileWeb.NavigationGroup}
* @platform mobileweb 2.0.0
*/
/**
* @class Titanium.UI.MobileWeb.NavigationGroup
* @platform mobileweb 2.0.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/MobileWeb/NavigationGroup.yml
* <p>A Navigation Group implements a specialized view that manages the navigation of hierarchical
content.</p>
* @description <p>The navigation group is created with the method {@link Titanium.UI.MobileWeb#method-createNavigationGroup}.
The <code>window</code> property must be set initially in the constructor when creating a navigation group.
All navigation groups must have a root window that cannot be removed.</p>
* <h3>Examples</h3>
<h4>Simple Navigation Group</h4>
<p>Creates a navigation group with the first window colored red.
Press the button to open the blue window.
Use the back button to return to the red root window.</p>
<pre><code>var win1 = Titanium.UI.createWindow();
var win2 = Titanium.UI.createWindow({
backgroundColor: 'red',
title: 'Red Window'
});
var win3 = Titanium.UI.createWindow({
backgroundColor: 'blue',
title: 'Blue Window'
});
var button = Titanium.UI.createButton({
title: 'Open Blue Window'
});
button.addEventListener('click', function(){
nav.open(win3, {animated:true});
});
var nav = Titanium.UI.MobileWeb.createNavigationGroup({
window: win2
});
win2.add(button);
win1.add(nav);
win1.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as two Alloy views.</p>
<p>navgroup.xml:</p>
<pre><code><Alloy>
<Window>
<NavigationGroup id="nav" platform="mobileweb">
<Window id="win2" title="Red Window" backgroundColor="red">
<Button title="Open Blue Window" onClick="openBlueWindow">
</Window>
</NavigationGroup>
</Window>
</Alloy>
</code></pre>
<p>navgroup.js:</p>
<pre><code>function openBlueWindow(){
var win3 = Alloy.createController('bluewindow').getView();
$.nav.open(win3, {animated : true});
}
</code></pre>
<p>bluewindow.xml:</p>
<pre><code><Alloy>
<Window title="Blue Window" backgroundColor="blue" />
</Alloy>
</code></pre>
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
*/
/**
* @method close
* <p>Closes a window and removes it from the navigation group.</p>
* @param {Titanium.UI.Window} window
<p>Window to close.</p>
* @param {Dictionary} options
<p>Options supporting a single <code>animated</code> boolean property to determine whether the window
will be animated (default) while being closed.</p>
*/
/**
* @method open
* <p>Opens a window within the navigation group.</p>
* @param {Titanium.UI.Window} window
<p>Window to open.</p>
* @param {Dictionary} options
<p>Options supporting a single <code>animated</code> boolean property to determine whether the window
will be animated (default) while being closed.</p>
*/
/**
* @method getWindow
* <p>Gets the value of the {@link Titanium.UI.MobileWeb.NavigationGroup#property-window} property.</p>
* @returns {Titanium.UI.Window}
*/
/**
* @method setWindow
* <p>Sets the value of the {@link Titanium.UI.MobileWeb.NavigationGroup#property-window} property.</p>
* @param {Titanium.UI.Window} window
<p>New value for the property.</p>
*/
/**
* @method getNavBarAtTop
* <p>Gets the value of the {@link Titanium.UI.MobileWeb.NavigationGroup#property-navBarAtTop} property.</p>
* @returns {Boolean}
*/
/**
* @method setNavBarAtTop
* <p>Sets the value of the {@link Titanium.UI.MobileWeb.NavigationGroup#property-navBarAtTop} property.</p>
* @param {Boolean} navBarAtTop
<p>New value for the property.</p>
*/
/**
* @property window
* @type Titanium.UI.Window
* @creationOnly
* <p>Root window to add to this navigation group.</p>
*/
/**
* @property [navBarAtTop=true]
* @type Boolean
* <p>Specifies whether the navigation should be at the top of the screen or the bottom of the screen.</p>
*/
/**
* @class Titanium.UI.MobileWeb.TableViewSeparatorStyle
* @platform mobileweb 1.8.1
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/MobileWeb/TableViewSeparatorStyle.yml
* <p>A set of constants for the style that can be used for the <code>separatorStyle</code> property of
{@link Titanium.UI.TableView}.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>The separator cell has no distinct style.</p>
*/
/**
* @property SINGLE_LINE
* @type Number
* @readonly
* <p>The separator cell has a single line running across its width (default.)</p>
*/
/**
* @class Titanium.UI.Notification
* @platform android 0.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Notification.yml
* <p>A toast notification.</p>
* @description <p>A toast notification is an unobtrusive, pop-up notification that does not
block the UI. Use the {@link Titanium.UI#method-createNotification} method or <strong><code><Notification></code></strong> Alloy element
to create a Toast notification.</p>
<p>On Android, by default, a toast notification appears centered on the bottom half of the screen.
On Windows Phone, by default, a toast notification appears over the status bar on the top part
of the screen.</p>
* <h3>Examples</h3>
<h4>Simple Toast Notification</h4>
<p>The simplest use case is also the most common.</p>
<pre><code>var toast = Ti.UI.createNotification({
message:"Please Stand By",
duration: Ti.UI.NOTIFICATION_DURATION_LONG
});
toast.show();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<p>index.xml</p>
<pre><code><Alloy>
<Window>
<Notification id="toast" platform="android" message="Please Stand By" duration="Ti.UI.NOTIFICATION_DURATION_LONG" />
</Window>
</Alloy>
</code></pre>
<p>index.js</p>
<pre><code>$.index.open();
$.toast.show();
</code></pre>
*/
/**
* @method show
* <p>Show the notification.</p>
* @param {AnimationOption} options (optional)
<p>Animation options for Android. <strong>Since Release 5.1.0.</strong></p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getGravity
* <p>Gets the value of the {@link Titanium.UI.Notification#property-gravity} property.</p>
* @returns {Number}
* @platform android 5.4.0
*/
/**
* @method setGravity
* <p>Sets the value of the {@link Titanium.UI.Notification#property-gravity} property.</p>
* @param {Number} gravity
<p>New value for the property.</p>
* @platform android 5.4.0
*/
/**
* @method getXOffset
* <p>Gets the value of the {@link Titanium.UI.Notification#property-xOffset} property.</p>
* @returns {Number}
* @platform android 0.8
*/
/**
* @method setXOffset
* <p>Sets the value of the {@link Titanium.UI.Notification#property-xOffset} property.</p>
* @param {Number} xOffset
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getYOffset
* <p>Gets the value of the {@link Titanium.UI.Notification#property-yOffset} property.</p>
* @returns {Number}
* @platform android 0.8
*/
/**
* @method setYOffset
* <p>Sets the value of the {@link Titanium.UI.Notification#property-yOffset} property.</p>
* @param {Number} yOffset
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getHorizontalMargin
* <p>Gets the value of the {@link Titanium.UI.Notification#property-horizontalMargin} property.</p>
* @returns {Number}
* @platform android 0.8
*/
/**
* @method setHorizontalMargin
* <p>Sets the value of the {@link Titanium.UI.Notification#property-horizontalMargin} property.</p>
* @param {Number} horizontalMargin
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getVerticalMargin
* <p>Gets the value of the {@link Titanium.UI.Notification#property-verticalMargin} property.</p>
* @returns {Number}
* @platform android 0.8
*/
/**
* @method setVerticalMargin
* <p>Sets the value of the {@link Titanium.UI.Notification#property-verticalMargin} property.</p>
* @param {Number} verticalMargin
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getMessage
* <p>Gets the value of the {@link Titanium.UI.Notification#property-message} property.</p>
* @returns {String}
*/
/**
* @method setMessage
* <p>Sets the value of the {@link Titanium.UI.Notification#property-message} property.</p>
* @param {String} message
<p>New value for the property.</p>
*/
/**
* @method getDuration
* <p>Gets the value of the {@link Titanium.UI.Notification#property-duration} property.</p>
* @returns {Number}
*/
/**
* @method setDuration
* <p>Sets the value of the {@link Titanium.UI.Notification#property-duration} property.</p>
* @param {Number} duration
<p>New value for the property.</p>
*/
/**
* @property gravity
* @type Number
* <p>Determines the location at which the notification should appear on the screen.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-GRAVITY_AXIS_CLIP}
<li> {@link Titanium.UI.Android#property-GRAVITY_AXIS_PULL_AFTER}
<li> {@link Titanium.UI.Android#property-GRAVITY_AXIS_PULL_BEFORE}
<li> {@link Titanium.UI.Android#property-GRAVITY_AXIS_SPECIFIED}
<li> {@link Titanium.UI.Android#property-GRAVITY_AXIS_X_SHIFT}
<li> {@link Titanium.UI.Android#property-GRAVITY_AXIS_Y_SHIFT}
<li> {@link Titanium.UI.Android#property-GRAVITY_BOTTOM}
<li> {@link Titanium.UI.Android#property-GRAVITY_CENTER}
<li> {@link Titanium.UI.Android#property-GRAVITY_CENTER_HORIZONTAL}
<li> {@link Titanium.UI.Android#property-GRAVITY_CENTER_VERTICAL}
<li> {@link Titanium.UI.Android#property-GRAVITY_CLIP_HORIZONTAL}
<li> {@link Titanium.UI.Android#property-GRAVITY_CLIP_VERTICAL}
<li> {@link Titanium.UI.Android#property-GRAVITY_DISPLAY_CLIP_HORIZONTAL}
<li> {@link Titanium.UI.Android#property-GRAVITY_DISPLAY_CLIP_VERTICAL}
<li> {@link Titanium.UI.Android#property-GRAVITY_END}
<li> {@link Titanium.UI.Android#property-GRAVITY_FILL}
<li> {@link Titanium.UI.Android#property-GRAVITY_FILL_HORIZONTAL}
<li> {@link Titanium.UI.Android#property-GRAVITY_FILL_VERTICAL}
<li> {@link Titanium.UI.Android#property-GRAVITY_HORIZONTAL_GRAVITY_MASK}
<li> {@link Titanium.UI.Android#property-GRAVITY_LEFT}
<li> {@link Titanium.UI.Android#property-GRAVITY_NO_GRAVITY}
<li> {@link Titanium.UI.Android#property-GRAVITY_RELATIVE_HORIZONTAL_GRAVITY_MASK}
<li> {@link Titanium.UI.Android#property-GRAVITY_RELATIVE_LAYOUT_DIRECTION}
<li> {@link Titanium.UI.Android#property-GRAVITY_RIGHT}
<li> {@link Titanium.UI.Android#property-GRAVITY_START}
<li> {@link Titanium.UI.Android#property-GRAVITY_TOP}
<li> {@link Titanium.UI.Android#property-GRAVITY_VERTICAL_GRAVITY_MASK}
</ul></p>
* @platform android 5.4.0
*/
/**
* @property [xOffset=0]
* @type Number
* <p>X offset from the default position, in pixels.</p>
* @platform android 0.8
*/
/**
* @property [yOffset=0]
* @type Number
* <p>Y offset from the default position, in pixels.</p>
* @platform android 0.8
*/
/**
* @property [horizontalMargin=0]
* @type Number
* <p>Horizontal placement of the notification, <em>as a fraction of the screen width</em>.</p>
* @description <p>Useful values range from -0.5 (far left) to 0.5 (far right). A value of zero indicates default placement.</p>
* @platform android 0.8
*/
/**
* @property [verticalMargin=0]
* @type Number
* <p>Vertical placement of the notifcation, <em>as a fraction of the screen height</em>.</p>
* @description <p>Useful values range from -0.5 (top) to 0.5 (bottom). A value of zero indicates default placement.</p>
* @platform android 0.8
*/
/**
* @property message
* @type String
* <p>Notification text to display.</p>
*/
/**
* @property [duration={@link Titanium.UI#property-NOTIFICATION_DURATION_SHORT}]
* @type Number
* <p>Determines how long the notification stays on screen.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-NOTIFICATION_DURATION_LONG}
<li> {@link Titanium.UI#property-NOTIFICATION_DURATION_SHORT}
</ul></p>
*/
/**
* @class Titanium.UI.OptionDialog
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/OptionDialog.yml
* <p>An option dialog is a modal view that includes a message and one or more option items positioned
in the middle of the display on Android and at the bottom edge on iOS. On Android, buttons may
be added below the options.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/optiondialog/optiondialog_android.png" height="75" /></td>
<td><img src="images/optiondialog/optiondialog_iphone.png" height="75" /></td>
<td><img src="images/optiondialog/optiondialog_ipad.png" height="75" /></td>
<td><img src="images/optiondialog/optiondialog_mobileweb.png" height="75" /></td>
</tr>
<tr><th>Android</th><th>iPhone</th><td>iPad</td><th>Mobile Web</th></tr>
</table>
<p>An option dialog is created using {@link Titanium.UI#method-createOptionDialog} or Alloy <code><OptionDialog></code>
element. See Examples below for usage.</p>
<p>This dialog is presented differently on each platform, as described below.</p>
<h4>Android</h4>
<p>On Android, the dialog is shown in the middle of the display (not touching the edges),
with the option items represented in a picker. The previously-selected, or default, item can be
set on creation.</p>
<p>You can assign a {@link Titanium.UI.View View} to the {@link Titanium.UI.OptionDialog#property-androidView} property
to define a custom dialog UI and layout, or you can assign a set of options to the
{@link Titanium.UI.OptionDialog#property-options} property, but not both. If both of these properties are set, the custom view
will appear but the options will be hidden.</p>
<p>Buttons below the picker may be optionally defined using the <code>buttonNames</code> property.
The <code>click</code> event returns a Boolean value to indicate whether either an option item or a button was clicked.</p>
<h4>iOS</h4>
<p>The <code>destructive</code> property may be set for an item, to give a visual cue that selecting it
results in an irreversible action.</p>
<p>On iOS 4, option dialogs are automatically cancelled when the application is paused/suspended.</p>
<h5>iPhone</h5>
<p>On iPhone, this dialog is shown at the bottom edge of the display, with the option items
represented as vertical buttons. </p>
<h5>iPad</h5>
<p>On iPad, this dialog is shown in the middle of the display, or as a popover-like dialog if
another view or control is specified via an argument passed to the <code>open()</code> method.</p>
<p>Note that on iPad, the cancel button is not displayed -- users can cancel the dialog
by clicking outside of the dialog.</p>
<h4>Caveats</h4>
<p>Care should be taken not to define any properties that are not documented, as this may produce
unexpected results. For example, setting a <code>message</code> property will prevent the picker of option
items from being displayed on Android.</p>
* <h3>Examples</h3>
<h4>Dialog with 3 Options</h4>
<pre><code>Ti.UI.setBackgroundColor('white');
var win = Ti.UI.createWindow({
title: 'Click window to test',
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false
});
var opts = {
cancel: 2,
options: ['Confirm', 'Help', 'Cancel'],
selectedIndex: 2,
destructive: 0,
title: 'Delete File?'
};
win.addEventListener('click', function(e){
var dialog = Ti.UI.createOptionDialog(opts).show();
});
win.open();</code></pre><h4>Dialog with 2 Options and 1 Button on Android and 3 Options on iOS</h4>
<pre><code>Ti.UI.setBackgroundColor('white');
var win = Ti.UI.createWindow({
title: 'Click window to test',
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false
});
var opts = {
title: 'Delete File?'
};
var isAndroid = Ti.Platform.osname == 'android';
if(isAndroid){
opts.options = ['Confirm', 'Cancel'];
opts.buttonNames = ['Help'];
} else {
opts.options = ['Confirm', 'Help', 'Cancel'];
}
win.addEventListener('click', function(e){
var dialog = Ti.UI.createOptionDialog(opts).show();
});
win.open();</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<p>optiondialog.xml:</p>
<pre><code><Alloy>
<Window id="win" onClick="showOptions" title="Click window to test"
fullscreen="false" onExit="true" backgroundColor="white">
<!--
The OptionDialog tag declares an option dialog,
which will need to be opened by the controller.
-->
<OptionDialog id="dialog" title="Delete File?">
<!-- The Options tag sets the options property. -->
<Options>
<Option>Confirm</Option>
<Option platform="ios">Help</Option>
<Option>Cancel</Option>
</Options>
<!-- The ButtonNames tag sets the Android-only buttonNames property. -->
<ButtonNames>
<ButtonName>Help</ButtonName>
</ButtonNames>
<!-- Add a View for the androidView property here. -->
</OptionDialog>
<!-- Add views here -->
</Window>
</Alloy>
</code></pre>
<p>optiondialog.js:</p>
<pre><code>function showOptions(){
$.dialog.show();
}
</code></pre>
*/
/**
* @event longclick
* @hide
* <p>Fired when the device detects a long click.</p>
* @description <p>A long click is generated by touching and holding on the touchscreen or holding down the
trackball button. </p>
<p>The event occurs before the finger/button is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>As the trackball can fire this event, it is not intended to return the <code>x</code> and <code>y</code>
coordinates of the touch, even when it is generated by the touchscreen. </p>
<p>A <code>longclick</code> blocks a <code>click</code>, meaning that a <code>click</code> event will not fire when a
<code>longclick</code> listener exists.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event click
* <p>Fired when an option of this dialog is clicked or, under certain circumstances, when this
dialog is dismissed.</p>
* @description <p>On iOS as of Release 2.0, when the dialog is dismissed without using an option, for example, using
the {@link Titanium.UI.OptionDialog#method-hide hide} method (iPhone, iPad) or a tap outside of the
dialog (iPad), this event is fired as though the cancel option was selected. In these
circumstances, the <code>index</code> property will be the cancel option index if defined or <code>-1</code>
otherwise.</p>
* @param {Number} index
<p>Index of the option that was pressed. See description for result of the dialog being
dismissed in some other way.</p>
* @param {Boolean} (android) button
<p>Indicates whether the index returned by the <code>index</code> property relates to a button rather
than an option item.</p>
* @param {Boolean/Number} cancel
<p>Boolean type on Android; Number on iOS and Mobile Web. </p>
<p>On Android, indicates whether the cancel button was clicked, in which
case returns <code>true</code>. </p>
<p>On iOS and Mobile Web, the value of the {@link Titanium.UI.OptionDialog#property-cancel cancel}
property is returned, if defined, or <code>-1</code> otherwise. </p>
* @param {Number} (iphone ipad mobileweb) destructive
<p>Index of the destructive option if defined or <code>-1</code> otherwise.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event focus
* @hide
* <p>Fired when the view element gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event postlayout
* @hide
* <p>Fired when a layout cycle is finished.</p>
* @description <p>This event is fired when the view and its ancestors have been laid out.
The {@link Titanium.UI.View#property-rect rect} and {@link Titanium.UI.View#property-size size} values
should be usable when this event is fired.</p>
<p>This event is typically triggered by either changing layout
properties or by changing the orientation of the device. Note that changing the
layout of child views or ancestors can also trigger a relayout of this view.
On Mobile Web, this event can also be triggered by resizing the browser window.</p>
<p>Note that altering any properties that affect layout from the <code>postlayout</code> callback
may result in an endless loop.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @event keypressed
* @hide
* <p>Fired when a hardware key is pressed in the view.</p>
* @description <p>A keypressed event is generated by pressing a hardware key. On Android, this event can only be
fired when the property {@link Titanium.UI.View#property-focusable focusable} is set to true. On iOS the
event is generated only when using {@link Titanium.UI.TextArea Ti.UI.TextArea}, {@link Titanium.UI.TextField Ti.UI.TextField}
and {@link Titanium.UI.SearchBar Ti.UI.SearchBar}.</p>
* @param {Number} keyCode
<p>The code for the physical key that was pressed. For more details, see <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a>. This API is experimental and subject to change.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method animate
* @hide
* <p>Animates this view.</p>
* @description <p>The {@link Titanium.UI.Animation Animation} object or dictionary passed to this method defines
the end state for the animation, the duration of the animation, and other properties.</p>
<p>Note that if you use <code>animate</code> to move a view, the view's actual <em>position</em> is changed, but
its layout properties, such as <code>top</code>, <code>left</code>, <code>center</code> and so on are not changed--these
reflect the original values set by the user, not the actual position of the view.</p>
<p>The {@link Titanium.UI.View#property-rect rect} property can be used to determine the actual size and
position of the view. Note that on Mobile Web, the <code>rect</code> property is not updated after
animation. This is a known issue <a href="https://jira.appcelerator.org/browse/TIMOB-8930">TIMOB-8930</a>.</p>
* @param {Titanium.UI.Animation/Dictionary<Titanium.UI.Animation>} animation
<p>Either a dictionary of animation properties or an
{@link Titanium.UI.Animation Animation} object.</p>
* @param {Callback<Object>} callback
<p>Function to be invoked upon completion of the animation.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method remove
* @hide
* <p>Removes a child view from this view's hierarchy.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method toImage
* @hide
* <p>Returns an image of the rendered view, as a Blob.</p>
* @description <p>The <code>honorScaleFactor</code> method is only supported on iOS.</p>
* @param {Callback<Titanium.Blob>} callback (optional)
<p>Function to be invoked upon completion. If non-null, this method will be performed
asynchronously. If null, it will be performed immediately.</p>
* @param {Boolean} honorScaleFactor (optional)
<p>Determines whether the image is scaled based on scale factor of main screen. (iOS only) </p>
<p>When set to true, image is scale factor is honored. When set to false, the image in the
blob has the same dimensions for retina and non-retina devices.</p>
* @returns {Titanium.Blob}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method convertPointToView
* @hide
* <p>Translates a point from this view's coordinate system to another view's coordinate system.</p>
* @description <p>Returns <code>null</code> if either view is not in the view hierarchy. </p>
<p>Keep in mind that views may be removed from the view hierarchy if their window is blurred
or if the view is offscreen (such as in some situations with {@link Titanium.UI.ScrollableView}).</p>
<p>If this view is a {@link Titanium.UI.ScrollView}, the view's x and y offsets are subtracted from
the return value.</p>
* @param {Point} point
<p>A point in this view's coordinate system. </p>
<p>If this argument is missing an <code>x</code> or <code>y</code> property, or the properties can not be
converted into numbers, an exception will be raised.</p>
* @param {Titanium.UI.View} destinationView
<p>View that specifies the destination coordinate system to convert to. If this argument
is not a view, an exception will be raised.</p>
* @returns {Point}
* @platform android 1.8
* @platform iphone 1.8
* @platform ipad 1.8
* @platform mobileweb 2.0
* @platform windowsphone 4.1.0
*/
/**
* @method add
* @hide
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>The child view is added as the last child in this view's hierarchy. </p>
<p>Although all views inherit from {@link Titanium.UI.View}, not all views are capable of
containing other views. In particular:</p>
<ul>
<li>Some views are not designed to be containers at all.</li>
<li>Some views are special-purpose containers that can only contain certain other
views.</li>
<li>Some views are top-level containers that cannot (or should not) be added to other views.</li>
</ul>
<h4>Non-Container Views</h4>
<p>The following views are not intended to act as containers that can hold other
views:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator ActivityIndicator}</li>
<li>{@link Titanium.UI.Button Button}</li>
<li>{@link Titanium.UI.ImageView ImageView}</li>
<li>{@link Titanium.UI.Label Label}</li>
<li>{@link Titanium.UI.ProgressBar ProgressBar}</li>
<li>{@link Titanium.UI.SearchBar SearchBar}</li>
<li>{@link Titanium.UI.Slider Slider}</li>
<li>{@link Titanium.UI.Switch Switch}</li>
<li>{@link Titanium.UI.TableView TableView}</li>
<li>{@link Titanium.UI.TextArea TextArea}</li>
<li>{@link Titanium.UI.TextField TextField}</li>
<li>{@link Titanium.UI.WebView WebView}</li>
</ul>
<p>Adding children to the these views <em>may</em> be supported on some platforms,
but is not guaranteed to work across platforms. Where it is supported, it may not
work as expected.</p>
<p>For maximum portability, these views should be treated as if they do not support children. <br>
Instead of adding children to these views, applications can positon other views as
siblings. For example, instead of adding a button as a child of a <code>WebView</code>, you can add
the button to the web view's parent such that it appears on top of the web view. </p>
<h4>Special-Purpose Containers</h4>
<p>A few view objects act as special-purpose containers--that is, they only manage
certain types of children, and many of them support a special means of adding
these children, instead of the general <code>add</code> method. These containers include:</p>
<ul>
<li><p>{@link Titanium.UI.ButtonBar ButtonBar} and {@link Titanium.UI.iOS.TabbedBar TabbedBar} are designed
to hold their own internally-created buttons, assigned by adding strings to the "labels" array.
Views added using the <code>add</code> method are displayed on top of these buttons.</p></li>
<li><p>{@link Titanium.UI.Picker Picker}. Can only hold <code>PickerRows</code> and <code>PickerColumns</code>, which
are added using the <code>add</code> method. Adding other types of views to a <code>Picker</code> is not
supported.</p></li>
<li><p>{@link Titanium.UI.TableView TableView} is a specialized container for
<code>TableViewSection</code> and <code>TableViewRow</code> objects. These objects must be
added using the properties and methods that <code>TableView</code> provides
for adding and removing sectons and rows.</p>
<p>On some platforms, it is possible to add arbitrary child views to a table view
using the <code>add</code> method. However, this is not guaranteed to work on all platforms,
and in general, should be avoided.</p></li>
<li><p>{@link Titanium.UI.TableViewSection TableViewSection} is a specialized container
for <code>TableViewRow</code> objects, which <em>are</em> added using the <code>add</code> method. The <code>add</code> method
on <code>TableViewSection</code> can only be used to add <code>TableViewRow</code> objects.</p></li>
<li><p>{@link Titanium.UI.iOS.Toolbar Toolbar} is designed to hold buttons and certain
other controls, added to its <code>items</code> array. Views added using the <code>add</code> method are
displayed on top of the controls in the <code>items</code> array.</p></li>
<li><p>The <code>Tab</code>, <code>TabGroup</code>, <code>NavigationGroup</code>, <code>NavigationWindow</code> and <code>SplitWindow</code> objects are
special containers that manage windows. These are discussed in the
"Top-Level Containers" section.</p></li>
</ul>
<h4>Top-Level Containers</h4>
<p>There are certain top-level containers that are not intended to be added
as the children of other views. These top-level containers include
{@link Titanium.UI.Window}, {@link Titanium.UI.iPad.SplitWindow}, {@link Titanium.UI.iOS.NavigationWindow},
and {@link Titanium.UI.TabGroup}. Other types of views must be added
to a top-level container in order to be displayed on screen.</p>
<p>The special containers {@link Titanium.UI.MobileWeb.NavigationGroup},
{@link Titanium.UI.iOS.NavigationWindow}, {@link Titanium.UI.iPad.SplitWindow},
{@link Titanium.UI.Tab}, and {@link Titanium.UI.TabGroup} manage windows.
These managed windows may be referred to as <em>children</em> of the
container, but they are not added using the <code>add</code> method.</p>
<p>Note that although a <code>NavigationGroup</code> manages windows, it is not itself a
top-level container. It must be added to a <code>Window</code> in order to be displayed.</p>
<p><code>Tab</code> is another kind of special container: it is not itself a top-level container,
but can only be used within a <code>TabGroup</code>. You cannot <code>add</code> a <code>Tab</code> to an arbitrary
container.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method hide
* <p>Hides this dialog.</p>
* @description <p>This triggers a <code>click</code> event as if cancel was invoked.</p>
* @param {hideParams} params (optional)
<p>Argument containing parameters for this method. Only used on iOS.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method show
* <p>Shows this dialog.</p>
* @description <p>On iPad, this dialog is shown in the middle of the display or, when specified via the
<code>params</code> argument, as a popover-like dialog attached to another view or control.</p>
* @param {showParams} params (optional)
<p>Argument containing parameters for this method. Only used on iPad.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAccessibilityHidden
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-accessibilityHidden} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHidden
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-accessibilityHidden} property.</p>
* @param {Boolean} accessibilityHidden
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityHint
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-accessibilityHint} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHint
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-accessibilityHint} property.</p>
* @param {String} accessibilityHint
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityLabel
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-accessibilityLabel} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityLabel
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-accessibilityLabel} property.</p>
* @param {String} accessibilityLabel
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityValue
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-accessibilityValue} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityValue
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-accessibilityValue} property.</p>
* @param {String} accessibilityValue
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAnchorPoint
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-anchorPoint} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setAnchorPoint
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-anchorPoint} property.</p>
* @param {Point} anchorPoint
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getAnimatedCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-animatedCenter} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundRepeat
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-backgroundRepeat} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundRepeat
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-backgroundRepeat} property.</p>
* @param {Boolean} backgroundRepeat
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundLeftCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-backgroundLeftCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundLeftCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-backgroundLeftCap} property.</p>
* @param {Number} backgroundLeftCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundTopCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-backgroundTopCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundTopCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-backgroundTopCap} property.</p>
* @param {Number} backgroundTopCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBorderColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-borderColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setBorderColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-borderColor} property.</p>
* @param {String} borderColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getClipMode
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-clipMode} property.</p>
* @returns {Number}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setClipMode
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-clipMode} property.</p>
* @param {Number} clipMode
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getFocusable
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-focusable} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setFocusable
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-focusable} property.</p>
* @param {Boolean} focusable
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getOverrideCurrentAnimation
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-overrideCurrentAnimation} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
*/
/**
* @method setOverrideCurrentAnimation
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-overrideCurrentAnimation} property.</p>
* @param {Boolean} overrideCurrentAnimation
<p>New value for the property.</p>
* @platform android 3.3.0
*/
/**
* @method getPullBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-pullBackgroundColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setPullBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-pullBackgroundColor} property.</p>
* @param {String} pullBackgroundColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getSoftKeyboardOnFocus
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-softKeyboardOnFocus} property.</p>
* @returns {Number}
* @platform android 0.9
*/
/**
* @method setSoftKeyboardOnFocus
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-softKeyboardOnFocus} property.</p>
* @param {Number} softKeyboardOnFocus
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getTransform
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-transform} property.</p>
* @returns {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setTransform
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-transform} property.</p>
* @param {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix} transform
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getViewShadowRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-viewShadowRadius} property.</p>
* @returns {Number}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-viewShadowRadius} property.</p>
* @param {Number} viewShadowRadius
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getViewShadowColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-viewShadowColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-viewShadowColor} property.</p>
* @param {String} viewShadowColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getViewShadowOffset
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-viewShadowOffset} property.</p>
* @returns {Point}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowOffset
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-viewShadowOffset} property.</p>
* @param {Point} viewShadowOffset
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getHorizontalWrap
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-horizontalWrap} property.</p>
* @returns {Boolean}
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method setHorizontalWrap
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-horizontalWrap} property.</p>
* @param {Boolean} horizontalWrap
<p>New value for the property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method getKeepScreenOn
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-keepScreenOn} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setKeepScreenOn
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-keepScreenOn} property.</p>
* @param {Boolean} keepScreenOn
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getBackgroundDisabledColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-backgroundDisabledColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-backgroundDisabledColor} property.</p>
* @param {String} backgroundDisabledColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundDisabledImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-backgroundDisabledImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-backgroundDisabledImage} property.</p>
* @param {String} backgroundDisabledImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-backgroundFocusedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-backgroundFocusedColor} property.</p>
* @param {String} backgroundFocusedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-backgroundFocusedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-backgroundFocusedImage} property.</p>
* @param {String} backgroundFocusedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundGradient
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-backgroundGradient} property.</p>
* @returns {Gradient}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundGradient
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-backgroundGradient} property.</p>
* @param {Gradient} backgroundGradient
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-backgroundImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-backgroundSelectedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-backgroundSelectedColor} property.</p>
* @param {String} backgroundSelectedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-backgroundSelectedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-backgroundSelectedImage} property.</p>
* @param {String} backgroundSelectedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBorderRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-borderRadius} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBorderRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-borderRadius} property.</p>
* @param {Number} borderRadius
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBorderWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-borderWidth} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBorderWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-borderWidth} property.</p>
* @param {Number} borderWidth
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getOpacity
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-opacity} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setOpacity
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-opacity} property.</p>
* @param {Number} opacity
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getRect
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-rect} property.</p>
* @returns {Dimension}
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getSize
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-size} property.</p>
* @returns {Dimension}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTouchEnabled
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-touchEnabled} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTouchEnabled
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-touchEnabled} property.</p>
* @param {Boolean} touchEnabled
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getVisible
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-visible} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setVisible
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-visible} property.</p>
* @param {Boolean} visible
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getZIndex
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-zIndex} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setZIndex
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getChildren
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-children} property.</p>
* @returns {Titanium.UI.View[]}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-backgroundColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTop
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-top} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTop
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-top} property.</p>
* @param {Number/String} top
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getLeft
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-left} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setLeft
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-left} property.</p>
* @param {Number/String} left
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBottom
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-bottom} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBottom
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-bottom} property.</p>
* @param {Number/String} bottom
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-center} property.</p>
* @returns {Point}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setCenter
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-center} property.</p>
* @param {Point} center
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getRight
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-right} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setRight
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-right} property.</p>
* @param {Number/String} right
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-width} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-width} property.</p>
* @param {Number/String} width
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getHeight
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-height} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setHeight
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-height} property.</p>
* @param {Number/String} height
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getLayout
* @hide
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-layout} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setLayout
* @hide
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-layout} property.</p>
* @param {String} layout
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAndroidView
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-androidView} property.</p>
* @returns {Titanium.UI.View}
* @platform android 0.8
*/
/**
* @method setAndroidView
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-androidView} property.</p>
* @param {Titanium.UI.View} androidView
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getButtonNames
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-buttonNames} property.</p>
* @returns {String[]}
* @platform android 0.8
*/
/**
* @method setButtonNames
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-buttonNames} property.</p>
* @param {Array<String>} buttonNames
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getOpaquebackground
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-opaquebackground} property.</p>
* @returns {Boolean}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setOpaquebackground
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-opaquebackground} property.</p>
* @param {Boolean} opaquebackground
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getPersistent
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-persistent} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setPersistent
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-persistent} property.</p>
* @param {Boolean} persistent
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getTitleid
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-titleid} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setTitleid
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-titleid} property.</p>
* @param {String} titleid
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getCancel
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-cancel} property.</p>
* @returns {Number}
*/
/**
* @method setCancel
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-cancel} property.</p>
* @param {Number} cancel
<p>New value for the property.</p>
*/
/**
* @method getDestructive
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-destructive} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setDestructive
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-destructive} property.</p>
* @param {Number} destructive
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getOptions
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-options} property.</p>
* @returns {String[]}
*/
/**
* @method setOptions
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-options} property.</p>
* @param {Array<String>} options
<p>New value for the property.</p>
*/
/**
* @method getSelectedIndex
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-selectedIndex} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setSelectedIndex
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-selectedIndex} property.</p>
* @param {Number} selectedIndex
<p>New value for the property.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.OptionDialog#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.OptionDialog#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @property [accessibilityHidden=false]
* @hide
* @type Boolean
* <p>Whether the view should be "hidden" from (i.e., ignored by) the accessibility service.</p>
* <p> <b>Requires:</b>
Android 4.0 and later
iOS 5.0 and later
</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityElementsHidden</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility
Protocol</a>.
The native property is only available in iOS 5.0 and later; if
<code>accessibilityHidden</code> is specified on earlier versions of iOS, it is ignored.</p>
<p>On Android, setting <code>accessibilityHidden</code> calls the native
<a href="http://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29">View.setImportantForAccessibility</a>
method. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and
later; if this property is specified on earlier versions of Android, it is ignored.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityHint=]
* @hide
* @type String
* <p>Briefly describes what performing an action (such as a click) on the view will do.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityHint</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityValue} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityLabel=Title or label of the control.]
* @hide
* @type String
* <p>A succint label identifying the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityLabel</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityValue} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityValue=State or value of the control.]
* @hide
* @type String
* <p>A string describing the value (if any) of the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityValue</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [anchorPoint=Center of this view.]
* @hide
* @type Point
* <p>Coordinate of the view about which to pivot an animation.</p>
* @description <p>Used on iOS only. For Android, use {@link Titanium.UI.Animation#property-anchorPoint}. </p>
<p>Anchor point is specified as a fraction of the view's size. For example, <code>{0, 0}</code> is at
the view's top-left corner, <code>{0.5, 0.5}</code> at its center and <code>{1, 1}</code> at its bottom-right
corner. </p>
<p>See the "Using an anchorPoint" example in {@link Titanium.UI.Animation} for a demonstration.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property animatedCenter
* @hide
* @type Point
* @readonly
* <p>Current position of the view during an animation.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundRepeat=false]
* @hide
* @type Boolean
* <p>Determines whether to tile a background across a view.</p>
* @description <p>Setting this to <code>true</code> makes the set <code>backgroundImage</code> repeat across the view as a series
of tiles. The tiling begins in the upper-left corner, where the upper-left corner of the
background image is rendered. The image is then tiled to fill the available space of the
view.</p>
<p>Note that setting this to <code>true</code> may incur performance penalties for large views or
background images, as the tiling must be redone whenever a view is resized.</p>
<p>On iOS, the following views do not currently support tiled backgrounds:</p>
<ul>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.TextField}</li>
<li>{@link Titanium.UI.Label}</li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundLeftCap=0]
* @hide
* @type Number
* <p>Size of the left end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundTopCap=0]
* @hide
* @type Number
* <p>Size of the top end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [borderColor=Same as the normal background color of this view (Android, Mobile Web), black (iOS).]
* @hide
* @type String
* <p>Border color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [clipMode=Undefined. Behaves as if set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT}.]
* @hide
* @type Number
* <p>View's clipping behavior.</p>
* @description <p>Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_ENABLED} enforces all child views to be clipped to this views bounds.
Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_DISABLED} allows child views to be drawn outside the bounds of this view.
When set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT} or when this property is not set, clipping behavior is inferred.
See section on iOS Clipping Behavior in {@link Titanium.UI.View}.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [focusable=false]
* @hide
* @type Boolean
* <p>Whether view should be focusable while navigating with the trackball.</p>
* @platform android 0.9
*/
/**
* @property [overrideCurrentAnimation=undefined but behaves as false]
* @hide
* @type Boolean
* @creationOnly
* <p>When on, animate call overrides current animation if applicable.</p>
* @description <p>If this property is set to false, the animate call is ignored if the view is currently being animated.</p>
* @platform android 3.3.0
*/
/**
* @property [pullBackgroundColor=Undefined. Results in a light grey background color on the wrapper view.]
* @hide
* @type String
* <p>Background color of the wrapper view when this view is used as either <Titanium.UI.ListView.pullView> or {@link Titanium.UI.TableView#property-headerPullView}.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [softKeyboardOnFocus={@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}]
* @hide
* @type Number
* <p>Determines keyboard behavior when this view is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_HIDE_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_SHOW_ON_FOCUS}
</ul></p>
* @platform android 0.9
*/
/**
* @property [transform=Identity matrix]
* @hide
* @type Titanium.UI.2DMatrix/Titanium.UI.3DMatrix
* <p>Transformation matrix to apply to the view.</p>
* @description <p>Android and Mobile Web only support 2DMatrix transforms.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [viewShadowRadius=Undefined. Behaves as if set to 3.]
* @hide
* @type Number
* <p>Determines the blur radius used to create the shadow.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [viewShadowColor=Undefined. Behaves as if transparent.]
* @hide
* @type String
* <p>Determines the color of the shadow.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [viewShadowOffset=Undefined. Behaves as if set to (0,-3)]
* @hide
* @type Point
* <p>Determines the offset for the shadow of the view.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [horizontalWrap=true]
* @hide
* @type Boolean
* <p>Determines whether the layout has wrapping behavior.</p>
* @description <p>For more information, see the discussion of horizontal layout mode in the description of
the {@link Titanium.UI.View#property-layout layout} property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @property [keepScreenOn=false]
* @hide
* @type Boolean
* <p>Determines whether to keep the device screen on.</p>
* @description <p>When <code>true</code> the screen will not power down. Note: enabling this feature will use more
power, thereby adversely affecting run time when on battery.</p>
* @platform android 0.9
*/
/**
* @property [backgroundDisabledColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Disabled background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundDisabledImage=If `backgroundDisabledImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is disabled.
]
* @hide
* @type String
* <p>Disabled background image for the view, specified as a local file path or URL.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Focused background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>For normal views, the focused color is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedImage=If `backgroundFocusedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is focused.
]
* @hide
* @type String
* <p>Focused background image for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the focused background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundGradient=No gradient]
* @hide
* @type Gradient
* <p>A background gradient for the view.</p>
* @description <p>A gradient can be defined as either linear or radial. A linear gradient varies continuously
along a line between the <code>startPoint</code> and <code>endPoint</code>.</p>
<p>A radial gradient is interpolated between two circles, defined by <code>startPoint</code> and
<code>startRadius</code> and <code>endPoint</code> and <code>endRadius</code> respectively.</p>
<p>The start and end points and radius values can be defined in device units, in the view's
coordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center
point of the view can be specified as:</p>
<pre><code>{ x: 30, y: 30 }
</code></pre>
<p>Or:
{ x: '50%', y: '50%' }</p>
<p>When specifying multiple colors, you can specify an <em>offset</em> value for each color, defining
how far into the gradient it takes effect. For example, the following color array specifies
a gradient that goes from red to blue back to red: </p>
<pre><code>colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]
</code></pre>
<p>Mobile Web has two limitations: backfillStart and backfillEnd are ignored and the system
behaves as if they are true, and endPoint is not supported for radial gradients. </p>
<p>Android currently only supports linear gradients. It also ignores backfillStart and backfillEnd
treating them as if they are true.</p>
* <h3>Examples</h3>
<h4>Linear and Radial Gradients</h4>
<p>The following code excerpt creates two views, one with a linear gradient and one with
a radial gradient.</p>
<pre><code>var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var radialGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'radial',
startPoint: { x: 50, y: 50 },
endPoint: { x: 50, y: 50 },
colors: [ 'red', 'blue'],
startRadius: '90%',
endRadius: 0,
backfillStart: true
}
});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],
}
});
win1.add(radialGradient);
win1.add(linearGradient);
win1.open();
</code></pre>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundImage=Default behavior when `backgroundImage` is unspecified depends on the type of view and
the platform. For generic views, no image is used. For most controls (buttons, text
fields, and so on), platform-specific default images are used.
]
* @hide
* @type String
* <p>Background image for the view, specified as a local file path or URL.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedColor=Background color of this view.]
* @hide
* @type String
* <p>Selected background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p><code>focusable</code> must be true for normal views.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedImage=If `backgroundSelectedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is selected.
]
* @hide
* @type String
* <p>Selected background image url for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the selected background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [borderRadius=0]
* @hide
* @type Number
* <p>Radius for the rounded corners of the view's border.</p>
* @description <p>Each corner is rounded using an arc of a circle.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [borderWidth=0]
* @hide
* @type Number
* <p>Border width of the view.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [opacity=1.0 (opaque)]
* @hide
* @type Number
* <p>Opacity of this view, from 0.0 (transparent) to 1.0 (opaque).</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property rect
* @hide
* @type Dimension
* @readonly
* <p>The bounding box of the view relative to its parent, in system units.</p>
* @description <p>The view's bounding box is defined by its size and position. </p>
<p>The view's size is <code>rect.width</code> x <code>rect.height</code>. The view's top-left position relative to
its parent is (<code>rect.x</code> , <code>rect.y</code>). </p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property size
* @hide
* @type Dimension
* @readonly
* <p>The size of the view in system units. </p>
* @description <p>Although property returns a {@link Dimension} dictionary, only the <code>width</code> and <code>height</code>
properties are valid. The position properties--<code>x</code> and <code>y</code>--are always 0.</p>
<p>To find the position <em>and</em> size of the view, use the {@link Titanium.UI.View#property-rect rect}
property instead.</p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [touchEnabled=true]
* @hide
* @type Boolean
* <p>Determines whether view should receive touch events.</p>
* @description <p>If false, will forward the events to peers.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [visible=true]
* @hide
* @type Boolean
* <p>Determines whether the view is visible.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property zIndex
* @hide
* @type Number
* <p>Z-index stack order position, relative to other sibling views.</p>
* @description <p>A view does not have a default z-index value, meaning that it is undefined by default.
When this property is explicitly set, regardless of its value, it causes the view to be
positioned in front of any sibling that has an undefined z-index.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property children
* @hide
* @type Titanium.UI.View[]
* @readonly
* <p>Array of this view's child views.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundColor=Transparent]
* @hide
* @type String
* <p>Background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property top
* @hide
* @type Number/String
* <p>The view's top position.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property left
* @hide
* @type Number/String
* <p>View's left position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property bottom
* @hide
* @type Number/String
* <p>View's bottom position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the parent
view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or a
dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property center
* @hide
* @type Point
* <p>View's center position, in the parent view's coordinates.</p>
* @description <p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property right
* @hide
* @type Number/String
* <p>View's right position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property width
* @hide
* @type Number/String
* <p>View's width, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values: </p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</li>
</ul>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p>
<p>This is an input property for specifying the view's width dimension. To determine
the view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property height
* @hide
* @type Number/String
* <p>View height, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values:</p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li><p>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</p>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p></li>
</ul>
<p>This is an input property for specifying the view's height dimension. To determine the
view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [layout=Composite layout]
* @hide
* @type String
* <p>Specifies how the view positions its children.
One of: 'composite', 'vertical', or 'horizontal'.</p>
* @description <p>There are three layout options:</p>
<ul>
<li><p><code>composite</code> (or <code>absolute</code>). Default layout. A child view is positioned based on its
positioning properties or "pins" (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code> and <code>center</code>).
If no positioning properties are specified, the child is centered. </p>
<p>The child is always sized based on its <code>width</code> and <code>height</code> properties, if these are
specified. If the child's height or width is <em>not</em> specified explicitly, it may be
calculated implicitly from the positioning properties. For example, if both <code>left</code> and
<code>center.x</code> are specified, they can be used to calculate the width of the child control. </p>
<p>Because the size and position properties can conflict, there is a specific precedence
order for the layout properties. For vertical positioning, the precedence
order is: <code>height</code>, <code>top</code>, <code>center.y</code>, <code>bottom</code>.</p>
<p>The following table summarizes the various combinations of properties that can
be used for vertical positioning, in order from highest precedence to lowest.
(For example, if <code>height</code>, <code>center.y</code> and <code>bottom</code> are all specified, the
<code>height</code> and <code>center.y</code> values take precedence.)</p>
<table cellpadding="6px" border="1" rules="all">
<tr>
<th>Scenario</th><th>Behavior</th>
</tr>
<tr>
<td>`height` & `top` specified</td><td>Child positioned `top` unit from
parent's top, using specified `height`;
any `center.y` and `bottom` values are ignored.</td>
</tr>
<tr>
<td>`height` & `center.y` specified</td><td>Child positioned with center at
`center.y`, using specified `height`; any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`height` & `bottom` specified</td><td>Child positioned `bottom` units from
parent's bottom, using specified `height`.</td>
</tr>
<tr>
<td>`top` & `center.y` specified</td><td>Child positioned with top edge `top` units from
parent's top and center at `center.y`. Height is determined implicitly;
any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`top` & `bottom` specified</td><td>Child positioned with top edge `top` units from
parent's top and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly. </td>
</tr>
<tr>
<td>Only `top` specified</td><td>Child positioned `top` units from parent's
top, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`center.y` and `bottom` specified</td><td>Child positioned with center at
`center.y` and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly.</td>
</tr>
<tr>
<td>Only `center.y` specified</td><td>Child positioned with center at
`center.y`, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>Only `bottom` specified</td><td>Child positioned with bottom edge `bottom`
units from parent's bottom, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`height`, `top`, `center.y`, and `bottom` unspecified</td><td>Child
centered vertically in the parent and uses the default height calculation
for the child view type.</td>
</tr>
</table>
<p>Horizontal positioning works like vertical positioning, except that the
precedence is <code>width</code>, <code>left</code>, <code>center.x</code>, <code>right</code>. </p>
<p>For complete details on composite layout rules, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>
in the Titanium Mobile Guides. </p>
<ul><li><code>vertical</code>. Children are laid out vertically from top to bottom. The first child
is laid out <code>top</code> units from its parent's bounding box. Each subsequent child is
laid out below the previous child. The space between children is equal to the
upper child's <code>bottom</code> value plus the lower child's <code>top</code> value. </li></ul>
<p>Each child is positioned horizontally as in the composite layout mode. </p>
<ul><li><code>horizontal</code>. Horizontal layouts have different behavior depending on whether wrapping
is enabled. Wrapping is enabled by default (the <code>horizontalWrap</code> property is <code>true</code>).</li></ul>
<p>With wrapping behavior, the children are laid out horizontally from left to right,
<em>in rows</em>. If a child requires more horizontal space than exists in the current row,
it is wrapped to a new row. The height of each row is equal to the maximum height of
the children in that row.</p>
<p>Wrapping behavior is available on iOS, Android and Mobile Web (Release 2.1.0 and later).
When the <code>horizontalWrap</code> property is set to true, the first row is placed at the top of the
parent view, and successive rows are placed below the first row. Each child is
positioned vertically <em>within its row</em> somewhat like composite layout mode.
In particular: </p>
<ul><li>If neither <code>top</code> or <code>bottom</code> is specified, the child is centered in the
row.</li>
<li>If either <code>top</code> or <code>bottom</code> is specified, the child is aligned to either
the top or bottom of the row, with the specified amount of padding.</li>
<li>If <em>both</em> <code>top</code> and <code>bottom</code> is specified for a given child, the properties
are both treated as padding.</li></ul>
<p>If the <code>horizontalWrap</code> property is false, the behavior is more equivalent to a vertical layout.
Children are laid or horizontally from left to right in a single row. The <code>left</code> and
<code>right</code> properties are used as padding between the children, and the <code>top</code> and <code>bottom</code>
properties are used to position the children vertically.</p>
<p>On Mobile Web <em>prior to</em> Release 2.1.0, the horizontal layout does not wrap by default,
and does not support the <code>horizontalWrap</code> property. On Android and iOS <em>prior to</em> Release
2.1.0, the horizontal layout always wraps and the <code>horizontalWrap</code> property is not supported.</p></li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property androidView
* @type Titanium.UI.View
* <p>View to load inside the message area, to create a custom layout.</p>
* @description <p>On Android you can either define a custom view with this property, or you can assign a set of options to the
{@link Titanium.UI.OptionDialog#property-options} property, but not both. If you do, the custom view will appear
but not the options you defined.</p>
<p>In an Alloy application you can specify this property with either an <code><AndroidView/></code> or
<code><View/></code> element inside the <code><OptionDialog/></code> element, for example:</p>
<pre><code><Alloy>
<OptionDialog id="dialog" title="Delete File?" onClick="clickCB">
<!-- Add View or AndroidView for the androidView property -->
<AndroidView platform="android" layout="vertical">
<Label color="red" text="Warning! This change is permanent and you cannot undo it!" />
</AndroidView>
<ButtonNames>
<ButtonName>Confirm</ButtonName>
<ButtonName>Cancel</ButtonName>
</ButtonNames>
</OptionDialog>
</Alloy>
</code></pre>
* @platform android 0.8
*/
/**
* @property buttonNames
* @type String[]
* @creationOnly
* <p>List of button names.</p>
* @description <p>This property creates buttons underneath the picker options.
The dialog only supports up to three buttons.</p>
* @platform android 0.8
*/
/**
* @property [opaquebackground=false]
* @type Boolean
* <p>Boolean value indicating if the option dialog should have an opaque background.</p>
* @description <p>This property is useful to ensure that the option dialog will display contents properly
on the iPAD idiom without ghosting when scrolling. This property is only respected on the
iPAD idiom on iOS7 and above. </p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [persistent=true]
* @type Boolean
* <p>Boolean value indicating if the option dialog should only be cancelled by user gesture or by hide method.</p>
* @description <p>This property is useful to ensure that the option dialog will not be ignored
by the user when the application is paused/suspended.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property titleid
* @type String
* <p>Key identifying a string in the locale file to use for the title text.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [cancel=undefined (Android), -1 (iOS, Mobile Web)]
* @type Number
* <p>Index to define the cancel option.</p>
* @description <p>On iOS, set to <code>-1</code> to disable the cancel option.</p>
<p>On iPad, the <code>cancel</code> option must be set to either <code>-1</code> or the index of the last
option. For example, if there are 3 options and one of them is a cancel button,
the cancel button must be the last option (index 2). If <code>cancel</code> is set to a
different value, <em>the last entry in the {@link Titanium.UI.OptionDialog#property-options options}
array <strong>is not displayed</strong>.</em></p>
<p>Note that the cancel button is never shown on iPad, since the user can cancel the
dialog by clicking outside of the dialog. </p>
*/
/**
* @property [destructive=-1]
* @type Number
* @creationOnly
* <p>Index to define the destructive option, indicated by a visual cue when rendered.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property options
* @type String[]
* @creationOnly
* <p>List of option names to display in the dialog.</p>
* @description <p>On Android you can assign a set of options to the <code>OptionDialog</code> with this property, or
assign a custom view to the {@link Titanium.UI.OptionDialog#property-androidView} property, but not both.
If you do, the custom view will appear but not the options you defined.</p>
*/
/**
* @property selectedIndex
* @type Number
* @creationOnly
* <p>Defines the default selected option.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property title
* @type String
* <p>Title of the dialog.</p>
*/
/**
* @class hideParams
* @platform ipad 2.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/OptionDialog.yml
* <p>Dictionary of options for the {@link Titanium.UI.OptionDialog#method-hide} method.</p>
*/
/**
* @property animated
* @type Boolean
* <p>Determines whether to animate the dialog as it is dismissed.</p>
*/
/**
* @class showParams
* @platform ipad 0.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/OptionDialog.yml
* <p>Dictionary of options for the {@link Titanium.UI.OptionDialog#method-show} method.</p>
*/
/**
* @property animated
* @type Boolean
* <p>Determines whether to animate the dialog as it is shown.</p>
*/
/**
* @property view
* @type Titanium.UI.View
* <p>View to which to attach the dialog.</p>
*/
/**
* @property rect
* @type Dimension
* <p>Positions the arrow of the option dialog relative to the attached view's dimensions.</p>
* @description <p>Setting the x, y coordinates to (0, 0) places the dialog in the top-left corner of the
view object. Set both the <code>width</code> and <code>height</code> properties to 1.</p>
*/
/**
* @class Titanium.UI.Picker
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Picker.yml
* <p>A control used to select one or more fixed values.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/picker/picker_android.png" height="150" /></td>
<td><img src="images/picker/picker_ios.png" height="75" style="border: 1px solid black;"/></td>
<td><img src="images/picker/picker_mobileweb.png" height="75" style="border: 1px solid black;"/></td>
<td><img src="images/picker/picker_wp.gif" height="150" style="border: 1px solid black;"/></td>
</tr>
<tr><th>Android</th><th>iOS</th><th>Mobile Web</th><th>Windows Phone</th></tr>
</table>
<p>Use the {@link Titanium.UI#method-createPicker} method or Alloy <strong><code><Picker></code></strong> element to create a picker control.</p>
<p>On Android, the <code>useSpinner</code> property must be enabled to support multiple columns.
By default, the spinner is automatically sized to fit its content and can overflow
to additional spinner rows. The size of the picker can be adjusted with the <code>width</code>
and <code>height</code> properties, but may omit picker columns or cut off picker rows
if the size is set too small. This property is deprecated. Please use the default
Android native "dropdown" style by not setting <code>useSpinner</code> to <code>true</code>.</p>
<p>On iOS, the <code>height</code> property is only available in iOS 9 and later.
By default, the size of the picker, including its background, is fixed at the
same height as the iPhone keyboard to respect the
<a href="https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/Controls.html#//apple_ref/doc/uid/TP40006556-CH15-SW3">iOS Human Interface Guidelines</a>.
The default <code>width</code> on iOS is 320px and the <code>height</code> is 228px.
The contents of the picker are sized to fit the picker, which may cut off text
in the picker rows. Adding views to picker rows is also supported on iOS.</p>
<p>On iPad, Apple recommends using a picker only in a popover. Since the size of the picker
cannot be adjusted, it is not suitable for the main screen.</p>
<p>On Mobile Web, by default, the picker fills the entire view it is contained in
but is adjustable using the <code>width</code> and <code>height</code> properties.</p>
<p><strong>Note:</strong> you can only set the {@link Titanium.UI.Picker#property-columns columns} property for the plain picker.
If you set the {@link Titanium.UI.Picker#property-type type} property to anything else except
<code>Titanium.UI.PICKER_TYPE_PLAIN</code>, you cannot modify the picker's columns.</p>
* <h3>Examples</h3>
<h4>Multi-Column Picker using Alloy XML Markup</h4>
<p>Creates a picker with two columns. You can optionally use <code>Column</code> and <code>Row</code> as shorthand
notation for <code>PickerColumn</code> and <code>PickerRow</code>, respectively.</p>
<p><code>app/views/index.xml</code>:</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white" layout="vertical" exitOnClose="true">
<Picker id="picker" top="50" selectionIndicator="true" useSpinner="true">
<PickerColumn id="column1">
<PickerRow title="Bananas"/>
<PickerRow title="Strawberries"/>
<PickerRow title="Mangos"/>
<PickerRow title="Grapes"/>
</PickerColumn>
<!-- Picker shorthand notation -->
<Column id="column2">
<Row title="red"/>
<Row title="green"/>
<Row title="blue"/>
<Row title="orange"/>
</Column>
</Picker>
</Window>
</Alloy>
</code></pre><h4>Date Picker using Alloy XML Markup</h4>
<p>Creates a date picker, then monitors the <code>change</code> event to see when the user updates the picker.</p>
<p>For the date string, use string values accepted by the moment.js constructor in the XML and TSS files.
If you are defining dates in the controller code, use a JavaScript Date object.</p>
<p><code>app/views/index.xml</code>:</p>
<pre><code><Alloy>
<Window backgroundColor="blue">
<Picker id="picker"
onChange="report"
type="Ti.UI.PICKER_TYPE_DATE"
minDate="2014,4,1"
maxDate="May 1, 2014 12:00:00"
value="2014-04-15T12:00:00">
</Picker>
</Window>
</Alloy>
</code></pre>
<p><code>app/controllers/index.js</code>:</p>
<pre><code>function report(e) {
Ti.API.info('User selected: ' + e.value);
}
$.index.open();
</code></pre><h4>Basic Single Column Picker</h4>
<p>Create a one-column, platform-specific style, picker and automatically select a row.</p>
<pre><code>Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
exitOnClose: true,
layout: 'vertical'
});
var picker = Ti.UI.createPicker({
top:50
});
var data = [];
data[0]=Ti.UI.createPickerRow({title:'Bananas'});
data[1]=Ti.UI.createPickerRow({title:'Strawberries'});
data[2]=Ti.UI.createPickerRow({title:'Mangos'});
data[3]=Ti.UI.createPickerRow({title:'Grapes'});
picker.add(data);
picker.selectionIndicator = true;
win.add(picker);
win.open();
// must be after picker has been displayed
picker.setSelectedRow(0, 2, false); // select Mangos
</code></pre><h4>Multi-Column Picker</h4>
<p>Create a two-column, platform-specific style, picker and automatically select a row in
each column.</p>
<pre><code>Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
exitOnClose: true,
layout: 'vertical'
});
var picker = Ti.UI.createPicker({
top:50,
useSpinner: true
});
picker.selectionIndicator = true;
var fruit = [ 'Bananas', 'Strawberries', 'Mangos', 'Grapes' ];
var color = [ 'red', 'green', 'blue', 'orange' ];
var column1 = Ti.UI.createPickerColumn();
for(var i=0, ilen=fruit.length; i<ilen; i++){
var row = Ti.UI.createPickerRow({
title: fruit[i]
});
column1.addRow(row);
}
var column2 = Ti.UI.createPickerColumn();
for(var i=0, ilen=color.length; i<ilen; i++){
var row = Ti.UI.createPickerRow({ title: color[i] });
column2.addRow(row);
}
picker.add([column1,column2]);
win.add(picker);
win.open();
// must be after picker has been displayed
picker.setSelectedRow(0, 2, false); // select Mangos
picker.setSelectedRow(1, 3, false); // select Orange
</code></pre><h4>Date Picker</h4>
<p>Create a date picker and handle the subsequent user action.</p>
<pre><code>Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
exitOnClose: true,
layout: 'vertical'
});
var picker = Ti.UI.createPicker({
type:Ti.UI.PICKER_TYPE_DATE,
minDate:new Date(2009,0,1),
maxDate:new Date(2014,11,31),
value:new Date(2014,3,12),
top:50
});
win.add(picker);
win.open();
picker.addEventListener('change',function(e){
Ti.API.info("User selected date: " + e.value.toLocaleString());
});
</code></pre><h4>Date Picker using showDatePickerDialog() (Android only)</h4>
<p>Create a date picker that is automatically displayed as a modal dialog and handle the
subsequent user action.</p>
<pre><code>Ti.UI.backgroundColor = 'white';
var picker = Ti.UI.createPicker({
type:Ti.UI.PICKER_TYPE_DATE,
minDate:new Date(2009,0,1),
maxDate:new Date(2014,11,31),
value:new Date(2014,3,12)
});
picker.showDatePickerDialog({
value: new Date(2010,8,1),
callback: function(e) {
if (e.cancel) {
Ti.API.info('User canceled dialog');
} else {
Ti.API.info('User selected date: ' + e.value);
}
}
});
</code></pre>
*/
/**
* @event click
* <p>Fired when the device detects a click against the view.</p>
* @description <p>This event is only available for non-spinner plain pickers. </p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event change
* <p>Fired when the value of any column's row is changed.</p>
* @param {Number} columnIndex
<p>Selected column index. On iOS and Mobile Web, only applicable to {@link Titanium.UI#property-PICKER_TYPE_PLAIN}
picker types.</p>
* @param {Number} rowIndex
<p>Selected row index. On iOS and Mobile Web, only applicable to {@link Titanium.UI#property-PICKER_TYPE_PLAIN}
picker types.</p>
* @param {Titanium.UI.PickerColumn} column
<p>The column object. On iOS and Mobile Web, only applicable to {@link Titanium.UI#property-PICKER_TYPE_PLAIN}
picker types.</p>
* @param {Number} countDownDuration
<p>The selected duration in milliseconds. Applicable to {@link Titanium.UI#property-PICKER_TYPE_COUNT_DOWN_TIMER} picker types.</p>
* @param {String} value
<p>The selected value. Applicable to date/time pickers only. This property is read-only
on Android.</p>
* @param {Titanium.UI.PickerRow} row
<p>The row object. On iOS and Mobile Web, only applicable to {@link Titanium.UI#property-PICKER_TYPE_PLAIN} picker types.</p>
* @param {Array<String>} selectedValue
<p>Array of selected values, one element per column in the picker. Applicable to
{@link Titanium.UI#property-PICKER_TYPE_PLAIN} picker types.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method remove
* @hide
* <p>Removes a child view from this view's hierarchy.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method add
* <p>Adds rows or columns to the picker.</p>
* @description <p>Once you use this method to add rows and columns to a picker, you cannot remove or
manipulate them.</p>
* @param {Array<Titanium.UI.PickerRow>/Titanium.UI.PickerRow/Array<Titanium.UI.PickerColumn>/Titanium.UI.PickerColumn} data
<p>A row, set of rows, a column of rows or a set of columns of rows. When this method is
used to add a row or set of rows, a single-column picker is created.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method showDatePickerDialog
* <p>Shows Date picker as a modal dialog.</p>
* @description <p>Applicable to the {@link Titanium.UI#property-PICKER_TYPE_DATE} picker type.</p>
<p>See "Date Picker using showDatePickerDialog()" for an example.</p>
* @param {Object} dictObj
<p>Dictionary object with a subset of <code>Titanium.UI.Picker</code> properties
and a callback defined. Acceptable object properties are
<code>callback</code>, <code>okButtonTitle</code>, <code>title</code> and <code>value</code>.</p>
* @platform android 0.8
*/
/**
* @method showTimePickerDialog
* <p>Shows Time picker as a modal dialog.</p>
* @description <p>Applicable to the {@link Titanium.UI#property-PICKER_TYPE_TIME} picker type. </p>
<p>See "Date Picker using showDatePickerDialog()" for a similar example.</p>
* @param {Object} dictObj
<p>Dictionary object with a subset of <code>Titanium.UI.Picker</code> properties
and a callback defined. Acceptable object properties are
<code>callback</code>, <code>format24</code>, <code>okButtonTitle</code>, <code>title</code> and <code>value</code>.</p>
* @platform android 0.8
*/
/**
* @method reloadColumn
* <p>Repopulates values for a column.</p>
* @param {Titanium.UI.PickerColumn} column
<p>Column to repopulate.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getSelectedRow
* <p>Gets the selected row for a column, or <code>null</code> if none exists.</p>
* @param {Number} index
<p>A column index.</p>
* @returns {Titanium.UI.PickerRow}
*/
/**
* @method setSelectedRow
* <p>Selects a column's row.</p>
* @description <p>On iOS, this method must be called after the picker is rendered.</p>
* @param {Number} column
<p>A column index.</p>
* @param {Number} row
<p>A row index.</p>
* @param {Boolean} animated (optional)
<p>Determines whether the selection should be animated. (iPhone, iPad-only)</p>
*/
/**
* @method setValue
* <p>Sets the date and time value property for Date pickers.</p>
* @description <p>Applicable to the {@link Titanium.UI#property-PICKER_TYPE_DATE} and {@link Titanium.UI#property-PICKER_TYPE_DATE_AND_TIME}
picker types.</p>
* @param {Object} date
<p>A Javascript <code>Date</code> object.</p>
* @param {Boolean} suppressEvent
<p>Determines whether a <code>change</code> event is fired.</p>
* @returns {Titanium.UI.PickerRow}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAnchorPoint
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-anchorPoint} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setAnchorPoint
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-anchorPoint} property.</p>
* @param {Point} anchorPoint
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundRepeat
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-backgroundRepeat} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundRepeat
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-backgroundRepeat} property.</p>
* @param {Boolean} backgroundRepeat
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundLeftCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-backgroundLeftCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundLeftCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-backgroundLeftCap} property.</p>
* @param {Number} backgroundLeftCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundTopCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-backgroundTopCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundTopCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-backgroundTopCap} property.</p>
* @param {Number} backgroundTopCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getTintColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-tintColor} property.</p>
* @returns {String}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setTintColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getBackgroundDisabledColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-backgroundDisabledColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-backgroundDisabledColor} property.</p>
* @param {String} backgroundDisabledColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundDisabledImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-backgroundDisabledImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-backgroundDisabledImage} property.</p>
* @param {String} backgroundDisabledImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-backgroundFocusedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-backgroundFocusedColor} property.</p>
* @param {String} backgroundFocusedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-backgroundFocusedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-backgroundFocusedImage} property.</p>
* @param {String} backgroundFocusedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundGradient
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-backgroundGradient} property.</p>
* @returns {Gradient}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundGradient
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-backgroundGradient} property.</p>
* @param {Gradient} backgroundGradient
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-backgroundImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-backgroundSelectedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-backgroundSelectedColor} property.</p>
* @param {String} backgroundSelectedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-backgroundSelectedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-backgroundSelectedImage} property.</p>
* @param {String} backgroundSelectedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getZIndex
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-zIndex} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setZIndex
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.Picker#property-backgroundColor} property.</p>
* @returns {String}
* @platform android 0.9.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.Picker#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
* @platform android 0.9.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-center} property.</p>
* @returns {Point}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setCenter
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-center} property.</p>
* @param {Point} center
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getLayout
* @hide
* <p>Gets the value of the {@link Titanium.UI.Picker#property-layout} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setLayout
* @hide
* <p>Sets the value of the {@link Titanium.UI.Picker#property-layout} property.</p>
* @param {String} layout
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getCountDownDuration
* <p>Gets the value of the {@link Titanium.UI.Picker#property-countDownDuration} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setCountDownDuration
* <p>Sets the value of the {@link Titanium.UI.Picker#property-countDownDuration} property.</p>
* @param {Number} countDownDuration
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getDateTimeColor
* <p>Gets the value of the {@link Titanium.UI.Picker#property-dateTimeColor} property.</p>
* @returns {String}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setDateTimeColor
* <p>Sets the value of the {@link Titanium.UI.Picker#property-dateTimeColor} property.</p>
* @param {String} dateTimeColor
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getFormat24
* <p>Gets the value of the {@link Titanium.UI.Picker#property-format24} property.</p>
* @returns {Boolean}
* @platform android 0.8
*/
/**
* @method setFormat24
* <p>Sets the value of the {@link Titanium.UI.Picker#property-format24} property.</p>
* @param {Boolean} format24
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getLocale
* <p>Gets the value of the {@link Titanium.UI.Picker#property-locale} property.</p>
* @returns {String}
* @platform android 0.8
*/
/**
* @method setLocale
* <p>Sets the value of the {@link Titanium.UI.Picker#property-locale} property.</p>
* @param {String} locale
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getMinuteInterval
* <p>Gets the value of the {@link Titanium.UI.Picker#property-minuteInterval} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setMinuteInterval
* <p>Sets the value of the {@link Titanium.UI.Picker#property-minuteInterval} property.</p>
* @param {Number} minuteInterval
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getSelectionIndicator
* <p>Gets the value of the {@link Titanium.UI.Picker#property-selectionIndicator} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setSelectionIndicator
* <p>Sets the value of the {@link Titanium.UI.Picker#property-selectionIndicator} property.</p>
* @param {Boolean} selectionIndicator
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getSelectionOpens
* <p>Gets the value of the {@link Titanium.UI.Picker#property-selectionOpens} property.</p>
* @returns {Boolean}
* @platform android 5.0.0
*/
/**
* @method setSelectionOpens
* <p>Sets the value of the {@link Titanium.UI.Picker#property-selectionOpens} property.</p>
* @param {Boolean} selectionOpens
<p>New value for the property.</p>
* @platform android 5.0.0
*/
/**
* @method getUseSpinner
* <p>Gets the value of the {@link Titanium.UI.Picker#property-useSpinner} property.</p>
* @deprecated 5.2.1 This property is deprecated. Please use the default native "dropdown" style.
* @returns {Boolean}
* @platform android 0.8
*/
/**
* @method setUseSpinner
* <p>Sets the value of the {@link Titanium.UI.Picker#property-useSpinner} property.</p>
* @deprecated 5.2.1 This property is deprecated. Please use the default native "dropdown" style.
* @param {Boolean} useSpinner
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getNativeSpinner
* <p>Gets the value of the {@link Titanium.UI.Picker#property-nativeSpinner} property.</p>
* @returns {Boolean}
* @platform android 5.4.0
*/
/**
* @method setNativeSpinner
* <p>Sets the value of the {@link Titanium.UI.Picker#property-nativeSpinner} property.</p>
* @param {Boolean} nativeSpinner
<p>New value for the property.</p>
* @platform android 5.4.0
*/
/**
* @method getCalendarViewShown
* <p>Gets the value of the {@link Titanium.UI.Picker#property-calendarViewShown} property.</p>
* @returns {Boolean}
* @platform android 0.8
*/
/**
* @method setCalendarViewShown
* <p>Sets the value of the {@link Titanium.UI.Picker#property-calendarViewShown} property.</p>
* @param {Boolean} calendarViewShown
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getFont
* <p>Gets the value of the {@link Titanium.UI.Picker#property-font} property.</p>
* @returns {Font}
* @platform android 0.8
*/
/**
* @method setFont
* <p>Sets the value of the {@link Titanium.UI.Picker#property-font} property.</p>
* @param {Font} font
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getColumns
* <p>Gets the value of the {@link Titanium.UI.Picker#property-columns} property.</p>
* @returns {Titanium.UI.PickerColumn[]}
*/
/**
* @method setColumns
* <p>Sets the value of the {@link Titanium.UI.Picker#property-columns} property.</p>
* @param {Array<Titanium.UI.PickerColumn>} columns
<p>New value for the property.</p>
*/
/**
* @method getMaxDate
* <p>Gets the value of the {@link Titanium.UI.Picker#property-maxDate} property.</p>
* @returns {Date}
*/
/**
* @method setMaxDate
* <p>Sets the value of the {@link Titanium.UI.Picker#property-maxDate} property.</p>
* @param {Date} maxDate
<p>New value for the property.</p>
*/
/**
* @method getMinDate
* <p>Gets the value of the {@link Titanium.UI.Picker#property-minDate} property.</p>
* @returns {Date}
*/
/**
* @method setMinDate
* <p>Sets the value of the {@link Titanium.UI.Picker#property-minDate} property.</p>
* @param {Date} minDate
<p>New value for the property.</p>
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.UI.Picker#property-value} property.</p>
* @returns {Date}
*/
/**
* @method setValue
* <p>Sets the value of the {@link Titanium.UI.Picker#property-value} property.</p>
* @param {Date} value
<p>New value for the property.</p>
*/
/**
* @method getVisibleItems
* <p>Gets the value of the {@link Titanium.UI.Picker#property-visibleItems} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setVisibleItems
* <p>Sets the value of the {@link Titanium.UI.Picker#property-visibleItems} property.</p>
* @param {Number} visibleItems
<p>New value for the property.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getType
* <p>Gets the value of the {@link Titanium.UI.Picker#property-type} property.</p>
* @returns {Number}
*/
/**
* @method setType
* <p>Sets the value of the {@link Titanium.UI.Picker#property-type} property.</p>
* @param {Number} type
<p>New value for the property.</p>
*/
/**
* @property [anchorPoint=Center of this view.]
* @hide
* @type Point
* <p>Coordinate of the view about which to pivot an animation.</p>
* @description <p>Used on iOS only. For Android, use {@link Titanium.UI.Animation#property-anchorPoint}. </p>
<p>Anchor point is specified as a fraction of the view's size. For example, <code>{0, 0}</code> is at
the view's top-left corner, <code>{0.5, 0.5}</code> at its center and <code>{1, 1}</code> at its bottom-right
corner. </p>
<p>See the "Using an anchorPoint" example in {@link Titanium.UI.Animation} for a demonstration.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundRepeat=false]
* @hide
* @type Boolean
* <p>Determines whether to tile a background across a view.</p>
* @description <p>Setting this to <code>true</code> makes the set <code>backgroundImage</code> repeat across the view as a series
of tiles. The tiling begins in the upper-left corner, where the upper-left corner of the
background image is rendered. The image is then tiled to fill the available space of the
view.</p>
<p>Note that setting this to <code>true</code> may incur performance penalties for large views or
background images, as the tiling must be redone whenever a view is resized.</p>
<p>On iOS, the following views do not currently support tiled backgrounds:</p>
<ul>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.TextField}</li>
<li>{@link Titanium.UI.Label}</li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundLeftCap=0]
* @hide
* @type Number
* <p>Size of the left end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundTopCap=0]
* @hide
* @type Number
* <p>Size of the top end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [tintColor=]
* @hide
* @type String
* <p>The view's tintColor. This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of UIView on iOS. If no value is specified,
the tintColor of the View is inherited from its superview. </p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property [backgroundDisabledColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Disabled background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundDisabledImage=If `backgroundDisabledImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is disabled.
]
* @hide
* @type String
* <p>Disabled background image for the view, specified as a local file path or URL.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Focused background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>For normal views, the focused color is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedImage=If `backgroundFocusedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is focused.
]
* @hide
* @type String
* <p>Focused background image for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the focused background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundGradient=No gradient]
* @hide
* @type Gradient
* <p>A background gradient for the view.</p>
* @description <p>A gradient can be defined as either linear or radial. A linear gradient varies continuously
along a line between the <code>startPoint</code> and <code>endPoint</code>.</p>
<p>A radial gradient is interpolated between two circles, defined by <code>startPoint</code> and
<code>startRadius</code> and <code>endPoint</code> and <code>endRadius</code> respectively.</p>
<p>The start and end points and radius values can be defined in device units, in the view's
coordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center
point of the view can be specified as:</p>
<pre><code>{ x: 30, y: 30 }
</code></pre>
<p>Or:
{ x: '50%', y: '50%' }</p>
<p>When specifying multiple colors, you can specify an <em>offset</em> value for each color, defining
how far into the gradient it takes effect. For example, the following color array specifies
a gradient that goes from red to blue back to red: </p>
<pre><code>colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]
</code></pre>
<p>Mobile Web has two limitations: backfillStart and backfillEnd are ignored and the system
behaves as if they are true, and endPoint is not supported for radial gradients. </p>
<p>Android currently only supports linear gradients. It also ignores backfillStart and backfillEnd
treating them as if they are true.</p>
* <h3>Examples</h3>
<h4>Linear and Radial Gradients</h4>
<p>The following code excerpt creates two views, one with a linear gradient and one with
a radial gradient.</p>
<pre><code>var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var radialGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'radial',
startPoint: { x: 50, y: 50 },
endPoint: { x: 50, y: 50 },
colors: [ 'red', 'blue'],
startRadius: '90%',
endRadius: 0,
backfillStart: true
}
});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],
}
});
win1.add(radialGradient);
win1.add(linearGradient);
win1.open();
</code></pre>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundImage=Default behavior when `backgroundImage` is unspecified depends on the type of view and
the platform. For generic views, no image is used. For most controls (buttons, text
fields, and so on), platform-specific default images are used.
]
* @hide
* @type String
* <p>Background image for the view, specified as a local file path or URL.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedColor=Background color of this view.]
* @hide
* @type String
* <p>Selected background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p><code>focusable</code> must be true for normal views.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedImage=If `backgroundSelectedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is selected.
]
* @hide
* @type String
* <p>Selected background image url for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the selected background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property zIndex
* @hide
* @type Number
* <p>Z-index stack order position, relative to other sibling views.</p>
* @description <p>A view does not have a default z-index value, meaning that it is undefined by default.
When this property is explicitly set, regardless of its value, it causes the view to be
positioned in front of any sibling that has an undefined z-index.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundColor=White (iOS), Transparent (Android)]
* @type String
* <p>Background color of the picker, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property center
* @hide
* @type Point
* <p>View's center position, in the parent view's coordinates.</p>
* @description <p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [layout=Composite layout]
* @hide
* @type String
* <p>Specifies how the view positions its children.
One of: 'composite', 'vertical', or 'horizontal'.</p>
* @description <p>There are three layout options:</p>
<ul>
<li><p><code>composite</code> (or <code>absolute</code>). Default layout. A child view is positioned based on its
positioning properties or "pins" (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code> and <code>center</code>).
If no positioning properties are specified, the child is centered. </p>
<p>The child is always sized based on its <code>width</code> and <code>height</code> properties, if these are
specified. If the child's height or width is <em>not</em> specified explicitly, it may be
calculated implicitly from the positioning properties. For example, if both <code>left</code> and
<code>center.x</code> are specified, they can be used to calculate the width of the child control. </p>
<p>Because the size and position properties can conflict, there is a specific precedence
order for the layout properties. For vertical positioning, the precedence
order is: <code>height</code>, <code>top</code>, <code>center.y</code>, <code>bottom</code>.</p>
<p>The following table summarizes the various combinations of properties that can
be used for vertical positioning, in order from highest precedence to lowest.
(For example, if <code>height</code>, <code>center.y</code> and <code>bottom</code> are all specified, the
<code>height</code> and <code>center.y</code> values take precedence.)</p>
<table cellpadding="6px" border="1" rules="all">
<tr>
<th>Scenario</th><th>Behavior</th>
</tr>
<tr>
<td>`height` & `top` specified</td><td>Child positioned `top` unit from
parent's top, using specified `height`;
any `center.y` and `bottom` values are ignored.</td>
</tr>
<tr>
<td>`height` & `center.y` specified</td><td>Child positioned with center at
`center.y`, using specified `height`; any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`height` & `bottom` specified</td><td>Child positioned `bottom` units from
parent's bottom, using specified `height`.</td>
</tr>
<tr>
<td>`top` & `center.y` specified</td><td>Child positioned with top edge `top` units from
parent's top and center at `center.y`. Height is determined implicitly;
any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`top` & `bottom` specified</td><td>Child positioned with top edge `top` units from
parent's top and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly. </td>
</tr>
<tr>
<td>Only `top` specified</td><td>Child positioned `top` units from parent's
top, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`center.y` and `bottom` specified</td><td>Child positioned with center at
`center.y` and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly.</td>
</tr>
<tr>
<td>Only `center.y` specified</td><td>Child positioned with center at
`center.y`, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>Only `bottom` specified</td><td>Child positioned with bottom edge `bottom`
units from parent's bottom, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`height`, `top`, `center.y`, and `bottom` unspecified</td><td>Child
centered vertically in the parent and uses the default height calculation
for the child view type.</td>
</tr>
</table>
<p>Horizontal positioning works like vertical positioning, except that the
precedence is <code>width</code>, <code>left</code>, <code>center.x</code>, <code>right</code>. </p>
<p>For complete details on composite layout rules, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>
in the Titanium Mobile Guides. </p>
<ul><li><code>vertical</code>. Children are laid out vertically from top to bottom. The first child
is laid out <code>top</code> units from its parent's bounding box. Each subsequent child is
laid out below the previous child. The space between children is equal to the
upper child's <code>bottom</code> value plus the lower child's <code>top</code> value. </li></ul>
<p>Each child is positioned horizontally as in the composite layout mode. </p>
<ul><li><code>horizontal</code>. Horizontal layouts have different behavior depending on whether wrapping
is enabled. Wrapping is enabled by default (the <code>horizontalWrap</code> property is <code>true</code>).</li></ul>
<p>With wrapping behavior, the children are laid out horizontally from left to right,
<em>in rows</em>. If a child requires more horizontal space than exists in the current row,
it is wrapped to a new row. The height of each row is equal to the maximum height of
the children in that row.</p>
<p>Wrapping behavior is available on iOS, Android and Mobile Web (Release 2.1.0 and later).
When the <code>horizontalWrap</code> property is set to true, the first row is placed at the top of the
parent view, and successive rows are placed below the first row. Each child is
positioned vertically <em>within its row</em> somewhat like composite layout mode.
In particular: </p>
<ul><li>If neither <code>top</code> or <code>bottom</code> is specified, the child is centered in the
row.</li>
<li>If either <code>top</code> or <code>bottom</code> is specified, the child is aligned to either
the top or bottom of the row, with the specified amount of padding.</li>
<li>If <em>both</em> <code>top</code> and <code>bottom</code> is specified for a given child, the properties
are both treated as padding.</li></ul>
<p>If the <code>horizontalWrap</code> property is false, the behavior is more equivalent to a vertical layout.
Children are laid or horizontally from left to right in a single row. The <code>left</code> and
<code>right</code> properties are used as padding between the children, and the <code>top</code> and <code>bottom</code>
properties are used to position the children vertically.</p>
<p>On Mobile Web <em>prior to</em> Release 2.1.0, the horizontal layout does not wrap by default,
and does not support the <code>horizontalWrap</code> property. On Android and iOS <em>prior to</em> Release
2.1.0, the horizontal layout always wraps and the <code>horizontalWrap</code> property is not supported.</p></li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property countDownDuration
* @type Number
* <p>Duration in milliseconds used for a Countdown Timer picker.</p>
* @description <p>Applicable to {@link Titanium.UI#property-PICKER_TYPE_COUNT_DOWN_TIMER} picker types.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [dateTimeColor=Black]
* @type String
* <p>Sets the text color of date- and time-pickers.</p>
* @description <p>Applicable to {@link Titanium.UI#property-PICKER_TYPE_TIME} and {@link Titanium.UI#property-PICKER_TYPE_DATE_AND_TIME} picker types.
The picker type {@link Titanium.UI#property-PICKER_TYPE_DATE} does not support text customizing as stated in the
<a href="https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/UIKitUICatalog/UIDatePicker.html">UIKit User Interface Catalog</a>.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property [format24=true (spinner enabled), false (otherwise)]
* @type Boolean
* <p>Determines whether the Time pickers display in 24-hour or 12-hour clock format.</p>
* @description <p>Applicable to {@link Titanium.UI#property-PICKER_TYPE_TIME} and {@link Titanium.UI#property-PICKER_TYPE_DATE_AND_TIME}
picker types.</p>
<p>When this property is enabled, a time picker is displayed with hours 0 through 23,
or with hours 1 through 12 and am/pm controls otherwise.</p>
<p>For backward compatibility, the default value of this property depends on the style of
picker in use. </p>
<p>For a spinner picker (when <code>useSpinner</code> is <code>true</code>), this defaults to <code>true</code> (24-hour format.) <br>
For a native picker (when <code>useSpinner</code> is either un-set or <code>false</code>), this defaults to <code>false</code>
(12-hour format.)</p>
<p>The value of this property may be modified even after a picker is rendered and the UI will be
updated accordingly.</p>
* @platform android 0.8
*/
/**
* @property [locale=System Settings]
* @type String
* <p>Locale used when displaying Date and Time picker values.</p>
* @description <p>Applicable to {@link Titanium.UI#property-PICKER_TYPE_DATE}, {@link Titanium.UI#property-PICKER_TYPE_TIME} and
{@link Titanium.UI#property-PICKER_TYPE_DATE_AND_TIME} picker types.</p>
<p>Locale must be represented as a combination of ISO 2-letter language and country codes.
For example, <code>en-US</code> or <code>en-GB</code>. See the
<a href="http://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1</a> and
<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements">ISO 3166-1 alpha-2</a>
sections of wikipedia for reference.</p>
<p>On iOS, the system locale is always used.</p>
* @platform android 0.8
*/
/**
* @property [minuteInterval=1]
* @type Number
* <p>Interval in minutes displayed when one of the Time types of pickers is in use.</p>
* @description <p>Applicable to {@link Titanium.UI#property-PICKER_TYPE_TIME} and {@link Titanium.UI#property-PICKER_TYPE_DATE_AND_TIME}
picker types.</p>
<p>The minimum permitted value is 1 and maximum is 30. If the value cannot be evenly divided
into 60, the default value is used. </p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [selectionIndicator=true (Android), false (iPhone, iPad)]
* @type Boolean
* <p>Determines whether the visual selection indicator is shown.</p>
* @description <p>If <code>true</code>, selection indicator is enabled.</p>
<p>On iOS 7 and later, the picker indicator is always shown and you cannot control it.</p>
<p>On iOS 6 and prior, if enabled, a blue bar is displayed to indicate the current selection.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [selectionOpens=false (Android)]
* @type Boolean
* <p>Determines whether calling the method <code>setSelectedRow</code> opens when called</p>
* @description <p>If <code>true</code>, selection will open when <code>setSelectedRow</code> is called.</p>
<p>If <code>false</code>, selection will not open when <code>setSelectedRow</code> is called.</p>
* @platform android 5.0.0
*/
/**
* @property [useSpinner=false]
* @type Boolean
* <p>Determines whether the non-native Android control, with a spinning wheel that looks and
behaves like the iOS picker, is invoked rather than the default native "dropdown" style.</p>
* @deprecated 5.2.1 This property is deprecated. Please use the default native "dropdown" style.
* @description <p>If <code>true</code>, the spinner is enabled.</p>
<p>This property should be set either at picker creation, i.e.
<code>Titanium.UI.createPicker({ useSpinner:true });</code>, or before the picker is added to its parent. </p>
<p>This property must be enabled for multi-column pickers.</p>
* @platform android 0.8
*/
/**
* @property [nativeSpinner=false]
* @type Boolean
* <p>Creates a native Android control for creating a Time Spinner with Type <code>Ti.UI.PICKER_TYPE_TIME</code>.
This is invoked rather than the default native "dropdown" style.</p>
* @description <p>If <code>true</code>, the nativeSpinner is enabled.</p>
<p>This property should be set either at picker creation, i.e.
<code>Titanium.UI.createPicker({ nativeSpinner:true });</code>, or before the picker is added to its parent.</p>
<p>Example as follows:
var picker = Ti.UI.createPicker({
type:Ti.UI.PICKER_TYPE_TIME,
nativeSpinner: true,
format24: false,
minuteInterval: 4,
minDate:new Date(2009,0,1),
maxDate:new Date(2014,11,31),
value:new Date(2014,3,12)
});</p>
* @platform android 5.4.0
*/
/**
* @property [calendarViewShown=false]
* @type Boolean
* <p>Determines whether the calenderView is visible.</p>
* @description <p>If 'calendarViewShown' is 'true', the calenderView is visible</p>
* @platform android 0.8
*/
/**
* @property font
* @type Font
* <p>Font to use for text.</p>
* @description <p>Only applicable to {@link Titanium.UI#property-PICKER_TYPE_DATE} and {@link Titanium.UI#property-PICKER_TYPE_TIME}
picker types for android. For {@link Titanium.UI#property-PICKER_TYPE_PLAIN}, refer to {@link Titanium.UI.PickerColumn}
for android, and {@link Titanium.UI.PickerRow} for iphone / ipad.</p>
* @platform android 0.8
*/
/**
* @property columns
* @type Titanium.UI.PickerColumn[]
* <p>Columns used for this picker, as an array of {@link Titanium.UI.PickerColumn} objects.</p>
* @description <p>You can only set columns for the plain picker. If you set the type to anything
else except <code>Titanium.UI.PICKER_TYPE_PLAIN</code>, you cannot modify the columns.</p>
<p>In an Alloy application you can specify this property with a <code><PickerColumn></code> (or <code><Column></code>)
element that contains one or more <code><PickerRow></code> (or <code><Row></code>) elements, as shown below:</p>
<pre><code><Alloy>
<Window>
<Picker useSpinner="true">
<PickerColumn id="column1">
<PickerRow title="Bananas"/>
<PickerRow title="Strawberries"/>
<PickerRow title="Mangos"/>
</PickerColumn>
<!-- Picker shorthand notation -->
<Column id="column2">
<Row title="red"/>
<Row title="green"/>
<Row title="blue"/>
</Column>
</Picker>
</Window>
</Alloy>
</code></pre>
*/
/**
* @property maxDate
* @type Date
* <p>Maximum date displayed when a Date picker is in use.</p>
* @description <p>Applicable to {@link Titanium.UI#property-PICKER_TYPE_DATE} and {@link Titanium.UI#property-PICKER_TYPE_DATE_AND_TIME}
picker types.</p>
<p>For JavaScript files, use a JavaScript Date object.</p>
<p>For Alloy XML and TSS files, use a date string that can be parsed by the
<a href="http://momentjs.com/docs/#/parsing/string/">moment.js constructor</a>,
which includes ISO-8601 and RFC2822 dates.</p>
<p>This property is ignored when <code>maxDate</code> is less than <code>minDate</code>.</p>
*/
/**
* @property minDate
* @type Date
* <p>Minimum date displayed when a Date picker is in use.</p>
* @description <p>Applicable to {@link Titanium.UI#property-PICKER_TYPE_DATE} and {@link Titanium.UI#property-PICKER_TYPE_DATE_AND_TIME}
picker types.</p>
<p>For JavaScript files, use a JavaScript Date object.</p>
<p>For Alloy XML and TSS files, use a date string that can be parsed by the
<a href="http://momentjs.com/docs/#/parsing/string/">moment.js constructor</a>,
which includes ISO-8601 and RFC2822 dates.</p>
<p>This property is ignored when <code>maxDate</code> is less than <code>minDate</code>.</p>
*/
/**
* @property value
* @type Date
* <p>Date and time value for Date and Time pickers.</p>
* @description <p>Applicable to {@link Titanium.UI#property-PICKER_TYPE_DATE}, {@link Titanium.UI#property-PICKER_TYPE_TIME} and {@link Titanium.UI#property-PICKER_TYPE_DATE_AND_TIME}
picker types.</p>
<p>For JavaScript files, use a JavaScript Date object.</p>
<p>For Alloy XML and TSS files, use a date string that can be parsed by the
<a href="http://momentjs.com/docs/#/parsing/string/">moment.js constructor</a>,
which includes ISO-8601 and RFC2822 dates.</p>
*/
/**
* @property [visibleItems=5]
* @type Number
* <p>Number of visible rows to display. This is only applicable to a plain picker and when the
<code>useSpinner</code> is <code>true</code>.</p>
* @description <p>The spinner-style Android picker shows 5 rows by default; one selected in the middle and 2
above and below. Set to an odd number to ensure the selected row is in the middle.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property [type={@link Titanium.UI#property-PICKER_TYPE_PLAIN}]
* @type Number
* <p>Determines the type of picker displayed</p>
* @description <p>You can only set columns for the plain picker. If you set the type to anything
else except <code>Titanium.UI.PICKER_TYPE_PLAIN</code>, you cannot modify the columns.</p>
<p><code>PICKER_TYPE_DATE_AND_TIME</code> is only available for iOS and Mobile Web.
<code>PICKER_TYPE_COUNT_DOWN_TIMER</code> is only available for iOS.</p>
<p>Mobile Web rely on input types for date and time types, but as of Q1 2012 these input types
are not supported on most browsers, those that do support it support it poorly, and no fall-back
exists. It is recommended not to use these types on Mobile Web until browser support improves.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-PICKER_TYPE_COUNT_DOWN_TIMER}
<li> {@link Titanium.UI#property-PICKER_TYPE_DATE}
<li> {@link Titanium.UI#property-PICKER_TYPE_DATE_AND_TIME}
<li> {@link Titanium.UI#property-PICKER_TYPE_PLAIN}
<li> {@link Titanium.UI#property-PICKER_TYPE_TIME}
</ul></p>
*/
/**
* @class Titanium.UI.PickerColumn
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/PickerColumn.yml
* <p>A picker column, representing a selectable group of items in a {@link Titanium.UI.Picker}.</p>
* @description <p>Use the {@link Titanium.UI#method-createPickerColumn} method to create a picker column control. In an Alloy application,
you can use a <strong><code><PickerColumn></code></strong> element inside a <code><Picker></code> element. You can also use <code><Column></code>
as a shorthand for <code><PickerColumn></code> (see Examples).</p>
<p>On Android, the <code>useSpinner</code> property must be enabled to support multiple columns.</p>
<p>See {@link Titanium.UI.Picker} for further examples of usage.</p>
* <h3>Examples</h3>
<h4>Multi-Column Picker</h4>
<p>Create a two-column, platform-specific style, picker and automatically select a row in
each column.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false,
title: 'Use picker to make selection'
});
var fruit = [ 'Bananas', 'Grapes', 'Blueberries', 'Strawberries' ];
var color = [ 'blue', 'red', 'yellow', 'white' ];
var column1 = Ti.UI.createPickerColumn();
for(var i=0, ilen=fruit.length; i<ilen; i++){
var row = Ti.UI.createPickerRow({
title: fruit[i]
});
column1.addRow(row);
}
var column2 = Ti.UI.createPickerColumn();
for(var i=0, ilen=color.length; i<ilen; i++){
var row = Ti.UI.createPickerRow({
title: color[i]
});
column2.addRow(row);
}
var picker = Ti.UI.createPicker({
columns: [column1, column2],
selectionIndicator: true,
useSpinner: true, // required in order to use multi-column pickers with Android
top:50
});
function pickerDefaults(obj){
// on iOS, must be after picker has been rendered
picker.setSelectedRow(0, 2, false);
picker.setSelectedRow(1, 3, false);
}
win.add(picker);
var isAndroid = Ti.Platform.osname === 'android';
if(isAndroid){
pickerDefaults(picker);
}
win.open();
if(!isAndroid){
setTimeout(function(){
pickerDefaults(picker);
}, 1500);
}
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<p>multicolumnpicker.xml</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white" exitOnClose="true" fullscreen="false"
title="Use picker to make selection">
<Picker id="picker" top="50" selectionIndicator="true" useSpinner="true">
<PickerColumn id="column1">
<PickerRow title="Bananas"/>
<PickerRow title="Grapes"/>
<PickerRow title="Blueberries"/>
<PickerRow title="Strawberries"/>
</PickerColumn>
<!-- Picker shorthand notation -->
<Column id="column2">
<Row title="blue"/>
<Row title="red"/>
<Row title="yellow"/>
<Row title="white"/>
</Column>
</Picker>
</Window>
</Alloy>
</code></pre>
<p>multicolumnpicker.js:</p>
<pre><code>$.picker.setSelectedRow(0, 2, false);
$.picker.setSelectedRow(1, 3, false);
</code></pre>
*/
/**
* @method addRow
* <p>Adds a row to this column.</p>
* @description <p>In an Alloy application you can use one or more <code><PickerRow></code> (or <code><Row></code>) elements inside
a <code><PickerColumn></code> (or <code><Column></code>) element.</p>
<pre><code><Alloy>
<PickerColumn id="hour">
<PickerRow title="10"/>
<PickerRow title="11"/>
<PickerRow title="12"/>
</PickerColumn>
<!-- Picker shorthand notation -->
<Column id="minutes">
<Row title="15"/>
<Row title="30"/>
<Row title="45"/>
<Row title="00"/>
</Column>
</Alloy>
</code></pre>
* @param {Titanium.UI.PickerRow} row
<p>A row to add.</p>
*/
/**
* @method removeRow
* <p>Removes a row from this column.</p>
* @param {Titanium.UI.PickerRow} row
<p>A row to remove.</p>
*/
/**
* @method getRowCount
* <p>Gets the value of the {@link Titanium.UI.PickerColumn#property-rowCount} property.</p>
* @returns {Number}
*/
/**
* @method getRows
* <p>Gets the value of the {@link Titanium.UI.PickerColumn#property-rows} property.</p>
* @returns {Titanium.UI.PickerRow[]}
*/
/**
* @method getSelectedRow
* <p>Gets the value of the {@link Titanium.UI.PickerColumn#property-selectedRow} property.</p>
* @returns {Titanium.UI.PickerRow}
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setSelectedRow
* <p>Sets the value of the {@link Titanium.UI.PickerColumn#property-selectedRow} property.</p>
* @param {Titanium.UI.PickerRow} selectedRow
<p>New value for the property.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getFont
* <p>Gets the value of the {@link Titanium.UI.PickerColumn#property-font} property.</p>
* @returns {Font}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setFont
* <p>Sets the value of the {@link Titanium.UI.PickerColumn#property-font} property.</p>
* @param {Font} font
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property rowCount
* @type Number
* @readonly
* <p>Number of rows in this column.</p>
*/
/**
* @property rows
* @type Titanium.UI.PickerRow[]
* @readonly
* <p>Rows of this column.</p>
* @description <p>While this property is currently writable on Android, changing its value is strongly
discouraged.</p>
*/
/**
* @property selectedRow
* @type Titanium.UI.PickerRow
* <p>The selected row in this column.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property font
* @type Font
* <p>Font to use for text.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.UI.PickerRow
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/PickerRow.yml
* <p>A picker row, representing a selectable item in a {@link Titanium.UI.Picker}. </p>
* @description <p>Use the {@link Titanium.UI#method-createPickerRow} method to create a picker row control. In an Alloy application,
you can use a <strong><code><PickerRow></code></strong> element inside a <code><PickerColumn></code> element. You can also use <code><Row></code>
as a shorthand for <code><PickerRow></code> (see Examples).</p>
<p>Views added to picker rows is only supported on iOS.</p>
* <h3>Examples</h3>
<h4>Custom View for Row (iOS only)</h4>
<p>Create a two-column picker, with the first column containing a child view, and automatically
select a row in each column.</p>
<pre><code>Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
exitOnClose: true,
layout: 'vertical'
});
var fruit = [ 'Bananas', 'Strawberries', 'Mangos', 'Grapes' ];
var color = [ 'red', 'green', 'blue', 'orange' ];
var column1 = Ti.UI.createPickerColumn();
for(var i=0, ilen=fruit.length; i<ilen; i++){
var row = Ti.UI.createPickerRow();
var label = Ti.UI.createLabel({
color:'red',
font:{fontSize:20,fontWeight:'bold'},
text: fruit[i],
textAlign:'left',
width:'126'
});
row.add(label);
column1.addRow(row);
}
var column2 = Ti.UI.createPickerColumn();
for(var i=0, ilen=color.length; i<ilen; i++){
var row = Ti.UI.createPickerRow({
title: color[i],
font: {fontSize:30}
});
column2.addRow(row);
}
var picker = Ti.UI.createPicker({
top:50,
columns: [column1, column2],
selectionIndicator: true
});
win.add(picker);
win.open();
// must be after picker has been displayed
picker.setSelectedRow(0, 2, false); // select Mangos
picker.setSelectedRow(1, 3, false); // select Orange
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<p>pickerrowexample.xml</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white" layout="vertical" exitOnClose="true">
<Picker id="picker" top="50" selectionIndicator="true">
<PickerColumn id="column1">
<!-- On iOS, views can be added to picker rows -->
<PickerRow>
<Label color="red" textAlign="left" width="126">Bananas</Label>
</PickerRow>
<PickerRow>
<Label color="red" textAlign="left" width="126">Strawberries</Label>
</PickerRow>
<PickerRow>
<Label color="red" textAlign="left" width="126">Mangos</Label>
</PickerRow>
<PickerRow>
<Label color="red" textAlign="left" width="126">Grapes</Label>
</PickerRow>
</PickerColumn>
<!-- Picker shorthand notation -->
<Column id="column2">
<Row title="red"/>
<Row title="green"/>
<Row title="blue"/>
<Row title="orange"/>
</Column>
</Picker>
</Window>
</Alloy>
</code></pre>
<p>pickerrowexample.js:</p>
<pre><code>$.picker.setSelectedRow(0, 2, false);
$.picker.setSelectedRow(1, 3, false);
</code></pre>
*/
/**
* @method add
* <p>Adds a child view to this picker row, to provide a custom row.</p>
* @description <p>The child view is added as the last child in this view's hierarchy. </p>
<p>Although all views inherit from {@link Titanium.UI.View}, not all views are capable of
containing other views. In particular:</p>
<ul>
<li>Some views are not designed to be containers at all.</li>
<li>Some views are special-purpose containers that can only contain certain other
views.</li>
<li>Some views are top-level containers that cannot (or should not) be added to other views.</li>
</ul>
<h4>Non-Container Views</h4>
<p>The following views are not intended to act as containers that can hold other
views:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator ActivityIndicator}</li>
<li>{@link Titanium.UI.Button Button}</li>
<li>{@link Titanium.UI.ImageView ImageView}</li>
<li>{@link Titanium.UI.Label Label}</li>
<li>{@link Titanium.UI.ProgressBar ProgressBar}</li>
<li>{@link Titanium.UI.SearchBar SearchBar}</li>
<li>{@link Titanium.UI.Slider Slider}</li>
<li>{@link Titanium.UI.Switch Switch}</li>
<li>{@link Titanium.UI.TableView TableView}</li>
<li>{@link Titanium.UI.TextArea TextArea}</li>
<li>{@link Titanium.UI.TextField TextField}</li>
<li>{@link Titanium.UI.WebView WebView}</li>
</ul>
<p>Adding children to the these views <em>may</em> be supported on some platforms,
but is not guaranteed to work across platforms. Where it is supported, it may not
work as expected.</p>
<p>For maximum portability, these views should be treated as if they do not support children. <br>
Instead of adding children to these views, applications can positon other views as
siblings. For example, instead of adding a button as a child of a <code>WebView</code>, you can add
the button to the web view's parent such that it appears on top of the web view. </p>
<h4>Special-Purpose Containers</h4>
<p>A few view objects act as special-purpose containers--that is, they only manage
certain types of children, and many of them support a special means of adding
these children, instead of the general <code>add</code> method. These containers include:</p>
<ul>
<li><p>{@link Titanium.UI.ButtonBar ButtonBar} and {@link Titanium.UI.iOS.TabbedBar TabbedBar} are designed
to hold their own internally-created buttons, assigned by adding strings to the "labels" array.
Views added using the <code>add</code> method are displayed on top of these buttons.</p></li>
<li><p>{@link Titanium.UI.Picker Picker}. Can only hold <code>PickerRows</code> and <code>PickerColumns</code>, which
are added using the <code>add</code> method. Adding other types of views to a <code>Picker</code> is not
supported.</p></li>
<li><p>{@link Titanium.UI.TableView TableView} is a specialized container for
<code>TableViewSection</code> and <code>TableViewRow</code> objects. These objects must be
added using the properties and methods that <code>TableView</code> provides
for adding and removing sectons and rows.</p>
<p>On some platforms, it is possible to add arbitrary child views to a table view
using the <code>add</code> method. However, this is not guaranteed to work on all platforms,
and in general, should be avoided.</p></li>
<li><p>{@link Titanium.UI.TableViewSection TableViewSection} is a specialized container
for <code>TableViewRow</code> objects, which <em>are</em> added using the <code>add</code> method. The <code>add</code> method
on <code>TableViewSection</code> can only be used to add <code>TableViewRow</code> objects.</p></li>
<li><p>{@link Titanium.UI.iOS.Toolbar Toolbar} is designed to hold buttons and certain
other controls, added to its <code>items</code> array. Views added using the <code>add</code> method are
displayed on top of the controls in the <code>items</code> array.</p></li>
<li><p>The <code>Tab</code>, <code>TabGroup</code>, <code>NavigationGroup</code>, <code>NavigationWindow</code> and <code>SplitWindow</code> objects are
special containers that manage windows. These are discussed in the
"Top-Level Containers" section.</p></li>
</ul>
<h4>Top-Level Containers</h4>
<p>There are certain top-level containers that are not intended to be added
as the children of other views. These top-level containers include
{@link Titanium.UI.Window}, {@link Titanium.UI.iPad.SplitWindow}, {@link Titanium.UI.iOS.NavigationWindow},
and {@link Titanium.UI.TabGroup}. Other types of views must be added
to a top-level container in order to be displayed on screen.</p>
<p>The special containers {@link Titanium.UI.MobileWeb.NavigationGroup},
{@link Titanium.UI.iOS.NavigationWindow}, {@link Titanium.UI.iPad.SplitWindow},
{@link Titanium.UI.Tab}, and {@link Titanium.UI.TabGroup} manage windows.
These managed windows may be referred to as <em>children</em> of the
container, but they are not added using the <code>add</code> method.</p>
<p>Note that although a <code>NavigationGroup</code> manages windows, it is not itself a
top-level container. It must be added to a <code>Window</code> in order to be displayed.</p>
<p><code>Tab</code> is another kind of special container: it is not itself a top-level container,
but can only be used within a <code>TabGroup</code>. You cannot <code>add</code> a <code>Tab</code> to an arbitrary
container.</p>
* @param {Titanium.UI.View} view
<p>A view object.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getColor
* <p>Gets the value of the {@link Titanium.UI.PickerRow#property-color} property.</p>
* @returns {String}
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setColor
* <p>Sets the value of the {@link Titanium.UI.PickerRow#property-color} property.</p>
* @param {String} color
<p>New value for the property.</p>
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getFont
* <p>Gets the value of the {@link Titanium.UI.PickerRow#property-font} property.</p>
* @returns {Font}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setFont
* <p>Sets the value of the {@link Titanium.UI.PickerRow#property-font} property.</p>
* @param {Font} font
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.PickerRow#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.PickerRow#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @property color
* @type String
* <p>Color of the item text, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property font
* @type Font
* <p>Font to use for the item text.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property title
* @type String
* <p>Item text.</p>
*/
/**
* @class Titanium.UI.ProgressBar
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ProgressBar.yml
* <p>A progress bar.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/progressbar/progressbar_android.png" height="50" /></td>
<td><img src="images/progressbar/progressbar_ios.png" height="25" /></td>
<td><img src="images/progressbar/progressbar_mobileweb.png" height="25" /></td>
<td><img src="images/progressbar/progressbar_wp.png" height="25" /></td>
</tr>
<tr><th>Android</th><th>iOS</th><th>Mobile Web</th><th>Windows Phone</th></tr>
</table>
<p>A progress bar is used for displaying an ongoing activity with a defined progression.
For an activity without a defined progression, you can use {@link Titanium.UI.ActivityIndicator}. </p>
<p>Unlike most views, progress bars are hidden by default, so you must explicitly
show the progress bar.</p>
<p>Use the {@link Titanium.UI#method-createProgressBar} method or <strong><code><ProgressBar></code></strong> Alloy element to create a progress bar.</p>
<h4>Android Platform Notes</h4>
<p>In SDK 3.0, use {@link Titanium.UI.Android.ProgressIndicator} to display a progress indicator
in a modal dialog or window title bar. Use <code>ProgressBar</code> to display the progress bar inside
another view.</p>
<h4>iOS Platform Notes</h4>
<p>On iOS, to display the progress bar in the window title bar, assign the progress bar object
to the window's {@link Titanium.UI.Window#property-titleControl titleControl} property.
Make sure the window is modal and not full screen, and that the navigation bar is not hidden.</p>
* <h3>Examples</h3>
<h4>Simple Progress Bar</h4>
<p>In this example we create a progress bar with the min value of <code>0</code> and the max value
of <code>10</code> and the current value of <code>0</code>. Changing the <code>value</code> property causes the
displayed progress bar to update.</p>
<pre><code>var pb = Ti.UI.createProgressBar({
top: 25,
width: 250,
min: 0,
max: 10,
value: 0,
color: 'blue',
message: 'Downloading 0 of 10',
font: {fontSize: 14, fontWeight: 'bold'},
style: Ti.UI.iOS.ProgressBarStyle.PLAIN,
});
var win = Ti.UI.createWindow({backgroundColor: 'white'});
win.addEventListener('click', function(){
if (pb.value < pb.max) {
pb.message = 'Downloading '+ ++pb.value + ' of 10';
}
});
win.add(pb);
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<p>index.xml:</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white" onClick="incPB">
<ProgressBar id="pb" />
</Window>
</Alloy>
</code></pre>
<p>index.js:</p>
<pre><code>function incPB() {
if ($.pb.value < $.pb.max) {
$.pb.message = 'Downloading '+ ++$.pb.value + ' of 10';
}
}
$.win.open();
</code></pre>
<p>index.tss:</p>
<pre><code>"#pb": {
top: 25,
width: 250,
min: 0,
max: 10,
value: 0,
color: 'blue',
message: 'Downloading 0 of 10',
font: {fontSize:14, fontWeight:'bold'},
style: Titanium.UI.iOS.ProgressBarStyle.PLAIN
}
</code></pre>
*/
/**
* @method remove
* <p>Removes a child view from this view's hierarchy.</p>
* @description <p>See also: {@link Titanium.UI.ProgressBar#method-add add}, {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method add
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>Adding children to a <code>ProgressBar</code> is not supported on all platforms.</p>
<p>If you need to display views on top of this object, consider using
another view as a container for both this object and the views you want
to appear on top of it.</p>
<p>See also: {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getTintColor
* <p>Gets the value of the {@link Titanium.UI.ProgressBar#property-tintColor} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 3.1.3
* @platform ipad 3.1.3
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTintColor
* <p>Sets the value of the {@link Titanium.UI.ProgressBar#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 3.1.3
* @platform ipad 3.1.3
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getFont
* <p>Gets the value of the {@link Titanium.UI.ProgressBar#property-font} property.</p>
* @returns {Font}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setFont
* <p>Sets the value of the {@link Titanium.UI.ProgressBar#property-font} property.</p>
* @param {Font} font
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.UI.ProgressBar#property-style} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.UI.ProgressBar#property-style} property.</p>
* @param {Number} style
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getColor
* <p>Gets the value of the {@link Titanium.UI.ProgressBar#property-color} property.</p>
* @returns {String}
*/
/**
* @method setColor
* <p>Sets the value of the {@link Titanium.UI.ProgressBar#property-color} property.</p>
* @param {String} color
<p>New value for the property.</p>
*/
/**
* @method getMax
* <p>Gets the value of the {@link Titanium.UI.ProgressBar#property-max} property.</p>
* @returns {Number}
*/
/**
* @method setMax
* <p>Sets the value of the {@link Titanium.UI.ProgressBar#property-max} property.</p>
* @param {Number} max
<p>New value for the property.</p>
*/
/**
* @method getMessage
* <p>Gets the value of the {@link Titanium.UI.ProgressBar#property-message} property.</p>
* @returns {String}
*/
/**
* @method setMessage
* <p>Sets the value of the {@link Titanium.UI.ProgressBar#property-message} property.</p>
* @param {String} message
<p>New value for the property.</p>
*/
/**
* @method getMin
* <p>Gets the value of the {@link Titanium.UI.ProgressBar#property-min} property.</p>
* @returns {Number}
*/
/**
* @method setMin
* <p>Sets the value of the {@link Titanium.UI.ProgressBar#property-min} property.</p>
* @param {Number} min
<p>New value for the property.</p>
*/
/**
* @method getTrackTintColor
* <p>Gets the value of the {@link Titanium.UI.ProgressBar#property-trackTintColor} property.</p>
* @returns {String}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform windowsphone 5.2.0
*/
/**
* @method setTrackTintColor
* <p>Sets the value of the {@link Titanium.UI.ProgressBar#property-trackTintColor} property.</p>
* @param {String} trackTintColor
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform windowsphone 5.2.0
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.UI.ProgressBar#property-value} property.</p>
* @returns {Number}
*/
/**
* @method setValue
* <p>Sets the value of the {@link Titanium.UI.ProgressBar#property-value} property.</p>
* @param {Number} value
<p>New value for the property.</p>
*/
/**
* @property [tintColor=]
* @type String
* <p>The color shown for the portion of the progress bar that is filled.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of UIView on iOS. If no value is specified,
the tintColor of the View is inherited from its superview. </p>
* @platform android 0.8
* @platform iphone 3.1.3
* @platform ipad 3.1.3
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property font
* @type Font
* <p>Font for the progress bar text.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property style
* @type Number
* <p>Style of the progress bar.</p>
* @description <p>For iOS, progress bar styles are constants defined in {@link Titanium.UI.iOS.ProgressBarStyle ProgressBarStyle}.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property color
* @type String
* <p>Color of the progress bar message, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property max
* @type Number
* <p>Maximum value of the progress bar.</p>
*/
/**
* @property message
* @type String
* <p>Progress bar text.</p>
*/
/**
* @property min
* @type Number
* <p>Minimum value of the progress bar.</p>
*/
/**
* @property trackTintColor
* @type String
* <p>The color shown for the portion of the progress bar that is not filled.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform windowsphone 5.2.0
*/
/**
* @property value
* @type Number
* <p>Current value of the progress bar.</p>
*/
/**
* @class Titanium.UI.RefreshControl
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/RefreshControl.yml
* <p>The RefreshControl is a representation of the native <a href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIRefreshControl_class/Reference/Reference.html">UIRefreshControl</a>.</p>
* @description <p>You use a <code>RefreshControl</code> with a {@link Titanium.UI.TableView}, {@link Titanium.UI.ListView} or {@link Titanium.UI.ScrollView} object.
It provides an alternate method to implement <strong>pull to refresh</strong> functionality provided by
{@link Titanium.UI.TableView#property-headerPullView} and <Titanium.UI.ListView.pullView> properties.</p>
<p>Use the {@link Titanium.UI#method-createRefreshControl} method to create a RefreshControl.</p>
* <h3>Examples</h3>
<h4>Basic Pull To Refresh</h4>
<p>A basic sample showing the usage of refreshstart event with endRefreshing functionality.</p>
<pre><code>var win = Ti.UI.createWindow({
fullscreen:true
});
var counter = 0;
function genData()
{
var data = [];
var i=1;
for (i=1;i<=3;i++) {
data.push({properties:{title:'ROW '+(counter+i)}})
}
counter += 3;
return data;
}
var section = Ti.UI.createListSection();
section.setItems(genData());
var control = Ti.UI.createRefreshControl({
tintColor:'red'
})
var listView = Ti.UI.createListView({
sections:[section],
refreshControl:control
});
control.addEventListener('refreshstart',function(e){
Ti.API.info('refreshstart');
setTimeout(function(){
Ti.API.debug('Timeout');
section.appendItems(genData());
control.endRefreshing();
}, 2000);
})
win.add(listView);
win.open();
</code></pre>
*/
/**
* @event refreshstart
* <p>Fired in response to a user initiated an action to refresh the contents of the
table view, list view or scroll view.</p>
* @param {Boolean} bubbles
<p>This is false. This event does not bubble</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event refreshend
* <p>Fired in response to a user finished action to refresh the contents of the
table view, list view or scroll view.</p>
* @param {Boolean} bubbles
<p>This is false. This event does not bubble</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method beginRefreshing
* <p>Tells the control that a refresh operation was started programmatically.</p>
* @description <p>Call this method when an external event source triggers a programmatic refresh of your table.
This method updates the state of the refresh control to reflect the in-progress refresh operation.
When the refresh operation ends, be sure to call the {@link Titanium.UI.RefreshControl#method-endRefreshing endRefreshing}
method to return the control to its default state.
Note: When triggering the refreshing programmatically, the styling is not applied and the refresh control is tinted
in the native gray.</p>
*/
/**
* @method endRefreshing
* <p>Tells the control that a refresh operation has ended.</p>
* @description <p>Call this method at the end of any refresh operation (whether it was initiated programmatically or by the user)
to return the refresh control to its default state. </p>
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.RefreshControl#property-title} property.</p>
* @returns {Titanium.UI.AttributedString}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.RefreshControl#property-title} property.</p>
* @param {Titanium.UI.AttributedString} title
<p>New value for the property.</p>
*/
/**
* @method getTintColor
* <p>Gets the value of the {@link Titanium.UI.RefreshControl#property-tintColor} property.</p>
* @returns {String}
*/
/**
* @method setTintColor
* <p>Sets the value of the {@link Titanium.UI.RefreshControl#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
*/
/**
* @property title
* @type Titanium.UI.AttributedString
* <p>The attributed title of the control.</p>
*/
/**
* @property tintColor
* @type String
* <p>The tint color for the refresh control, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @class Titanium.UI.ScrollView
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ScrollView.yml
* <p>A view that contains a horizontally and/or vertically-scrollable region of content. </p>
* @description <p>Use the {@link Titanium.UI#method-createScrollView} method or <strong><code><ScrollView></code></strong> Alloy element to create a scroll view.</p>
<p>Views added to the scroll view will be scrolled based on the size of the scrollable region of
content. If a scrollable region fits within the size of its scroll view, the view will not
scroll.</p>
<h4>Android Platform Notes</h4>
<p>On Android, a scroll view can only scroll in one direction, either vertically or horizontally,
and not both at the same time. The {@link Titanium.UI.ScrollView#property-scrollType} property sets the scroll
direction explicitly. If the <code>scrollType</code> property is not assigned a value, the scroll view
attempts to determine the scroll direction based on some the following rules:</p>
<ul>
<li><p>If {@link Titanium.UI.ScrollView#property-contentWidth} and {@link Titanium.UI.ScrollView#property-width} are both
set and are equal to each other, or if they are both set
<em>and</em> <code>showVerticalScrollIndicator</code> is set to <code>true</code>, then the scroll direction is set to
"vertical". </p></li>
<li><p>If {@link Titanium.UI.ScrollView#property-contentHeight} and {@link Titanium.UI.ScrollView#property-height} are
both set and are equal, or if they are both set and {@link Titanium.UI.ScrollView#property-showHorizontalScrollIndicator} is set to
<code>true</code>, then the scroll direction is set to "horizontal".</p></li>
</ul>
<p>Pinching a <code>ScrollableView</code> to zoom in and out of content is not supported on Android. On iOS, this action
is natively supported by the UIScrollView class, but on Android, the native ScrollView class does
not support this action. Parity between the two platforms cannot be achieved with this feature.</p>
* <h3>Examples</h3>
<h4>Simple Scroll View</h4>
<p>Create a scroll view with content.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false,
title: 'ScrollView Demo'
});
var scrollView = Ti.UI.createScrollView({
showVerticalScrollIndicator: true,
showHorizontalScrollIndicator: true,
height: '80%',
width: '80%'
});
var view = Ti.UI.createView({
backgroundColor:'#336699',
borderRadius: 10,
top: 10,
height: 2000,
width: 1000
});
scrollView.add(view);
win.add(scrollView);
win.open();
</code></pre><h4>Scroll View as a Table View</h4>
<p>Create a scroll view that contains a set of views in a layout to resemble a table view with
rows. This approach can mitigate the native Android issue described in the "TextFields in
Tables with SOFT_INPUT_ADJUST_PAN" section of {@link Titanium.UI.TableView}. </p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor:'white'
});
if (Ti.UI.Android){
win.windowSoftInputMode = Ti.UI.Android.SOFT_INPUT_ADJUST_PAN;
}
function createRow(i) {
var row = Ti.UI.createView({
backgroundColor: 'white',
borderColor: '#bbb',
borderWidth: 1,
width:'100%', height: 70,
top: 0, left: 0
});
var inputTextField = Ti.UI.createTextField({
hintText: 'Enter value ' + i,
keyboardType: Ti.UI.KEYBOARD_NUMBERS_PUNCTUATION,
top: 10, left: '10%',
width: '80%', height: 60
});
row.add(inputTextField);
return row;
}
var scrollView = Ti.UI.createScrollView({
bottom:120,
layout: 'vertical'
});
for(var i = 0; i <= 20; i++){
var row = createRow(i);
scrollView.add(row);
}
win.add(scrollView);
var label = Ti.UI.createLabel({
backgroundColor:'darkgray',
text: 'Your advert here',
textAlign: 'center',
bottom:0,
width: Titanium.UI.FILL,
height:100
});
win.add(label);
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous simple scroll view example as an Alloy view.</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white" exitOnClose="true" fullscreen="false" title="ScrollView Demo">
<ScrollView id="scrollView" showVerticalScrollIndicator="true" showHorizontalScrollIndicator="true" height="80%" width="80%">
<View id="view" backgroundColor="#336699" borderRadius="10" top="10" height="2000" width="1000" />
</ScrollView>
</Window>
</Alloy>
</code></pre>
*/
/**
* @event scale
* <p>Fired when the zoom scale factor changes.</p>
* @param {Number} scale
<p>New scaling factor as a float.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event scroll
* <p>Fired when the scrollable region is scrolled.</p>
* @param {Dictionary} (iphone ipad) contentSize
<p>The current content size of the scroll view defined by its <code>width</code> and <code>height</code> properties.
Available in Titanium SDK 5.2.0 and later.</p>
* @param {Boolean} (iphone ipad mobileweb) decelerating
<p>Indicates whether the scroll is decelerating.</p>
* @param {Boolean} (iphone ipad mobileweb) dragging
<p>Indicates whether the event was fired during a dragging gesture, where the touch
remained in contact with the display to physically drag the view, as opposed to it being
the result of scrolling momentum.</p>
* @param {Boolean} (iphone ipad) zooming
<p>Indicates whether the event was fired during a zooming operation. This is only available
from Release 3.2.3 of the Titanium Mobile SDK.</p>
* @param {Number} (iphone ipad) curZoomScale
<p>The current scaling factor of the scroll view content. This might not be equal to
the <code>zoomScale</code> property or be within the range specified by <code>minZoomScale</code> and <code>maxZoomScale</code>.
This is only available from Release 3.2.3 of the Titanium Mobile SDK.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event scrollEnd
* <p>Fired when the view has stopped moving completely.</p>
* @description <p>This event has been deprecated and renamed scrollend (lower case).</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 2.1.0
*/
/**
* @event dragStart
* <p>Fired when the scrollable region starts being dragged.</p>
* @description <p>This event has been deprecated and renamed dragstart (lower case).</p>
<p>A dragging gesture is when a touch remains in contact with the display to physically drag
the view, as opposed to it being the result of scrolling momentum.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event dragEnd
* <p>Fired when the scrollable region stops being dragged.</p>
* @description <p>This event has been deprecated and renamed dragend (lower case).</p>
<p>A dragging gesture is when a touch remains in contact with the display to physically drag
the view, as opposed to it being the result of scrolling momentum.</p>
* @param {Boolean} decelerate
<p>Indicates whether scrolling will continue but decelerate, now that the drag gesture has
been released by the touch. If <code>false</code>, scrolling will stop immediately.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event scrollend
* <p>Fired when the view has stopped moving completely.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 3.0.0
*/
/**
* @event dragstart
* <p>Fired when the scrollable region starts being dragged.</p>
* @description <p>A dragging gesture is when a touch remains in contact with the display to physically drag
the view, as opposed to it being the result of scrolling momentum.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
*/
/**
* @event dragend
* <p>Fired when the scrollable region stops being dragged.</p>
* @description <p>A dragging gesture is when a touch remains in contact with the display to physically drag
the view, as opposed to it being the result of scrolling momentum.</p>
* @param {Boolean} decelerate
<p>Indicates whether scrolling will continue but decelerate, now that the drag gesture has
been released by the touch. If <code>false</code>, scrolling will stop immediately.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
*/
/**
* @method setZoomScale
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-zoomScale zoomScale} property.</p>
* @param {Number} zoomScale
<p>Scaling factor of the scroll view's content.</p>
* @param {zoomScaleOption} animated (optional)
<p>Determines whether the scrollable region reposition should be animated</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method scrollTo
* <p>Moves the specified coordinate of the scrollable region into the viewable area.</p>
* @param {Number} x
<p>X coordinate from the scrollable region's coordinate system.</p>
* @param {Number} y
<p>Y coordinate from the scrollable region's coordinate system.</p>
*/
/**
* @method scrollToBottom
* <p>Moves the end of the scrollable region into the viewable area.</p>
* @description <p>On Android the behavior of <code>scrollToBottom</code> depends on whether this scroll view scrolls
horizontally or vertically. For vertical scroll views, <code>scrollToBottom</code> moves the bottom
of the scrollable region into the viewable area. For horizontal scroll views,
<code>scrollToBottom</code> moves the rightmost edge of of the scrollable region into the viewable area.</p>
<p>On iOS, <code>scrollToBottom</code> moves the bottom-right corner of the scrollable region into the
viewable area.</p>
* @platform android 0.9
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method setContentOffset
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-contentOffset contentOffset} property.</p>
* @param {Dictionary} contentOffset
<p>X and Y coordinates to which to reposition the top-left point of the scrollable region.</p>
* @param {contentOffsetOption} animated (optional)
<p>Determines whether the scrollable region reposition should be animated</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getCanCancelEvents
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-canCancelEvents} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setCanCancelEvents
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-canCancelEvents} property.</p>
* @param {Boolean} canCancelEvents
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getDecelerationRate
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-decelerationRate} property.</p>
* @returns {Number}
* @platform iphone 3.2.3
* @platform ipad 3.2.3
*/
/**
* @method setDecelerationRate
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-decelerationRate} property.</p>
* @param {Number} decelerationRate
<p>New value for the property.</p>
* @platform iphone 3.2.3
* @platform ipad 3.2.3
*/
/**
* @method getDisableBounce
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-disableBounce} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setDisableBounce
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-disableBounce} property.</p>
* @param {Boolean} disableBounce
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getHorizontalBounce
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-horizontalBounce} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setHorizontalBounce
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-horizontalBounce} property.</p>
* @param {Boolean} horizontalBounce
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getKeyboardDismissMode
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-keyboardDismissMode} property.</p>
* @returns {Number}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setKeyboardDismissMode
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-keyboardDismissMode} property.</p>
* @param {Number} keyboardDismissMode
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getMaxZoomScale
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-maxZoomScale} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setMaxZoomScale
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-maxZoomScale} property.</p>
* @param {Number} maxZoomScale
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getMinZoomScale
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-minZoomScale} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setMinZoomScale
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-minZoomScale} property.</p>
* @param {Number} minZoomScale
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getOverScrollMode
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-overScrollMode} property.</p>
* @returns {Number}
* @platform android 3.1.0
*/
/**
* @method setOverScrollMode
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-overScrollMode} property.</p>
* @param {Number} overScrollMode
<p>New value for the property.</p>
* @platform android 3.1.0
*/
/**
* @method getRefreshControl
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-refreshControl} property.</p>
* @returns {Titanium.UI.RefreshControl}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setRefreshControl
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-refreshControl} property.</p>
* @param {Titanium.UI.RefreshControl} refreshControl
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getScrollIndicatorStyle
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-scrollIndicatorStyle} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setScrollIndicatorStyle
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-scrollIndicatorStyle} property.</p>
* @param {Number} scrollIndicatorStyle
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getScrollType
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-scrollType} property.</p>
* @returns {String}
* @platform android 0.9
*/
/**
* @method setScrollType
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-scrollType} property.</p>
* @param {String} scrollType
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getVerticalBounce
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-verticalBounce} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setVerticalBounce
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-verticalBounce} property.</p>
* @param {Boolean} verticalBounce
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getZoomScale
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-zoomScale} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setZoomScale
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-zoomScale} property.</p>
* @param {Number} zoomScale
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getContentOffset
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-contentOffset} property.</p>
* @returns {Dictionary}
*/
/**
* @method setContentOffset
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-contentOffset} property.</p>
* @param {Dictionary} contentOffset
<p>New value for the property.</p>
*/
/**
* @method getScrollsToTop
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-scrollsToTop} property.</p>
* @returns {Boolean}
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setScrollsToTop
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-scrollsToTop} property.</p>
* @param {Boolean} scrollsToTop
<p>New value for the property.</p>
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getContentWidth
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-contentWidth} property.</p>
* @returns {Number/String}
*/
/**
* @method setContentWidth
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-contentWidth} property.</p>
* @param {Number/String} contentWidth
<p>New value for the property.</p>
*/
/**
* @method getContentHeight
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-contentHeight} property.</p>
* @returns {Number/String}
*/
/**
* @method setContentHeight
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-contentHeight} property.</p>
* @param {Number/String} contentHeight
<p>New value for the property.</p>
*/
/**
* @method getScrollingEnabled
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-scrollingEnabled} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setScrollingEnabled
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-scrollingEnabled} property.</p>
* @param {Boolean} scrollingEnabled
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getShowHorizontalScrollIndicator
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-showHorizontalScrollIndicator} property.</p>
* @returns {Boolean}
*/
/**
* @method setShowHorizontalScrollIndicator
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-showHorizontalScrollIndicator} property.</p>
* @param {Boolean} showHorizontalScrollIndicator
<p>New value for the property.</p>
*/
/**
* @method getShowVerticalScrollIndicator
* <p>Gets the value of the {@link Titanium.UI.ScrollView#property-showVerticalScrollIndicator} property.</p>
* @returns {Boolean}
*/
/**
* @method setShowVerticalScrollIndicator
* <p>Sets the value of the {@link Titanium.UI.ScrollView#property-showVerticalScrollIndicator} property.</p>
* @param {Boolean} showVerticalScrollIndicator
<p>New value for the property.</p>
*/
/**
* @property [canCancelEvents=true]
* @type Boolean
* <p>Determines whether this scroll view can cancel subview touches in order to scroll instead.</p>
* @description <p>On iOS, this property maps to the native <code>canCancelContentTouches</code> property which controls
whether touches in the content view always lead to tracking. See <a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIScrollView_Class/Reference/UIScrollView.html">UIScrollView</a> for more details.</p>
<p>On Android, setting this property to false prevents the scroll view from intercepting
any touch events from its subviews. Note that this behavior may be slightly different from iOS.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [decelerationRate=Undefined.]
* @type Number
* <p>The deceleration rate of the ScrollView.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-SCROLL_DECELERATION_RATE_FAST}
<li> {@link Titanium.UI.iOS#property-SCROLL_DECELERATION_RATE_NORMAL}
</ul></p>
* @platform iphone 3.2.3
* @platform ipad 3.2.3
*/
/**
* @property [disableBounce=false]
* @type Boolean
* <p>Determines whether scroll bounce of the scrollable region is enabled.</p>
* @description <p>Set to <code>true</code> to disable horizontal and vertical bounce.</p>
<p>This property takes precedence over the <code>horizontalBounce</code> and <code>verticalBounce</code> properties.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [horizontalBounce=true]
* @type Boolean
* <p>Determines whether horizontal scroll bounce of the scrollable region is enabled.</p>
* @description <p>With the default value of <code>true</code>, dragging in the horizontal direction is always allowed and
also bounces.</p>
<p>Set to <code>false</code> to disable horizontal scroll bounce if the horizontal content is smaller than
the scroll view bounds. However, larger content will still bounce when scrolled.</p>
<p>Note that the <code>disableBounce</code> property takes precedence over the <code>horizontalBounce</code> and
<code>verticalBounce</code> properties.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [keyboardDismissMode=Undefined (behaves like {@link Titanium.UI.iOS#property-KEYBOARD_DISMISS_MODE_NONE})]
* @type Number
* <p>The manner in which the keyboard is dismissed when a drag begins in the scroll view.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-KEYBOARD_DISMISS_MODE_NONE}
<li> {@link Titanium.UI.iOS#property-KEYBOARD_DISMISS_MODE_ON_DRAG}
<li> {@link Titanium.UI.iOS#property-KEYBOARD_DISMISS_MODE_INTERACTIVE}
</ul></p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property [maxZoomScale=1]
* @type Number
* <p>Maximum scaling factor of the scrollable region and its content.</p>
* @description <p>This value determines how large the content can be scaled.
It must be greater than the {@link Titanium.UI.ScrollView#property-minZoomScale minimum zoom scale} for zooming to be enabled.
The default value is 1.0 unless otherwise specified.</p>
<p>Note that specifying a value less than or equal to 0 will hide all contents of the scroll view.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [minZoomScale=1]
* @type Number
* <p>Minimum scaling factor of the scrollable region and its content.</p>
* @description <p>This value determines how small the content can be scaled.
It must be less than the {@link Titanium.UI.ScrollView#property-maxZoomScale maximum zoom scale} for zooming to be enabled.
The default value is 1.0 unless otherwise specified.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [overScrollMode=Titanium.UI.Android.OVER_SCROLL_ALWAYS]
* @type Number
* <p>Determines the behavior when the user overscolls the view.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-OVER_SCROLL_ALWAYS}
<li> {@link Titanium.UI.Android#property-OVER_SCROLL_IF_CONTENT_SCROLLS}
<li> {@link Titanium.UI.Android#property-OVER_SCROLL_NEVER}
</ul></p>
* @platform android 3.1.0
*/
/**
* @property refreshControl
* @type Titanium.UI.RefreshControl
* <p>View positioned above the first row that is only revealed when the user drags the scroll view contents down.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @description <p>An alternate to the pullView property. See {@link Titanium.UI.RefreshControl} for usage and examples.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property [scrollIndicatorStyle={@link Titanium.UI.iOS.ScrollIndicatorStyle#property-DEFAULT}]
* @type Number
* <p>Style of the scrollbar.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS.ScrollIndicatorStyle#property-BLACK}
<li> {@link Titanium.UI.iOS.ScrollIndicatorStyle#property-DEFAULT}
<li> {@link Titanium.UI.iOS.ScrollIndicatorStyle#property-WHITE}
</ul></p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property scrollType
* @type String
* @creationOnly
* <p>Limits the direction of the scrollable region, overriding the deduced setting. Set to
<code>horizontal</code> or <code>vertical</code>.</p>
* @description <p>See the {@link Titanium.UI.ScrollView scrollView} description for more details about how the
scroll direction is deduced when this property is not defined.</p>
* @platform android 0.9
*/
/**
* @property [verticalBounce=true]
* @type Boolean
* <p>Determines whether vertical scroll bounce of the scrollable region is enabled.</p>
* @description <p>With the default value of <code>true</code>, dragging in the vertical direction is always allowed and
also bounces.</p>
<p>Set to <code>false</code> to disable vertical scroll bounce if the vertical content is smaller than
the scroll view bounds. However, larger content will still bounce when scrolled.</p>
<p>Note that the <code>disableBounce</code> property takes precedence over the <code>horizontalBounce</code> and
<code>verticalBounce</code> properties.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [zoomScale=1]
* @type Number
* <p>Scaling factor of the scroll view's content.</p>
* @description <p>This value is bound by the {@link Titanium.UI.ScrollView#property-minZoomScale minZoomScale} and {@link Titanium.UI.ScrollView#property-maxZoomScale maxZoomScale} properties.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property contentOffset
* @type Dictionary
* <p>X and Y coordinates to which to reposition the top-left point of the scrollable region.</p>
* @description <p>On iOS, a new value causes the scroll view to perform an animated scroll to the new offset.
The {@link Titanium.UI.ScrollView#method-setContentOffset} method can be used to prevent this animation.</p>
*/
/**
* @property [scrollsToTop=true]
* @type Boolean
* <p>Controls whether the scroll-to-top gesture is effective.</p>
* @description <p>The scroll-to-top gesture is a tap on the status bar; The default value of this property is true.
This gesture works when you have a single visible scroll view.
If there are multiple table views, web views, text areas, and/or scroll views visible,
you will need to disable (set to false) on the above views you DON'T want this
behaviour on. The remaining view will then respond to scroll-to-top gesture. </p>
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property contentWidth
* @type Number/String
* <p>Width of the scrollable region.</p>
* @description <p>While absolute dimensions are supported, relative values, such as those provided
in percentages, are not. The minimum value for contentWidth is the width of the scroll view.
Measured in platform-specific units; pixels on Android and density-independent pixels (dip) on iOS.</p>
*/
/**
* @property contentHeight
* @type Number/String
* <p>Height of the scrollable region.</p>
* @description <p>While absolute dimensions are supported, relative values, such as those provided
in percentages, are not. The minimum value for contentHeight is the height of the scroll view.
Measured in platform-specific units; pixels on Android and density-independent pixels (dip) on iOS.</p>
*/
/**
* @property [scrollingEnabled=true]
* @type Boolean
* <p>Determines whether scrolling is enabled for the view.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property [showHorizontalScrollIndicator=false]
* @type Boolean
* <p>Determines whether the horizontal scroll indicator is visible.</p>
* @description <p>Set to <code>true</code> to show the horizontal scroll indicator.</p>
*/
/**
* @property [showVerticalScrollIndicator=false]
* @type Boolean
* <p>Determines whether the vertical scroll indicator is visible.</p>
* @description <p>Set to <code>true</code> to show the vertical scroll indicator.</p>
*/
/**
* @class contentOffsetOption
* @platform iphone 1.8.1
* @platform ipad 1.8.1
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ScrollView.yml
* <p>Optional parameter for {@link Titanium.UI.ScrollView#method-setContentOffset setContentOffset} method.</p>
* @description <p>On iOS, the optional parameter <code>animated</code> to enable the animation while the scrollable region
scrolls. For example</p>
<pre><code>setContentOffset({x:50,y:100}, {animated:true})
</code></pre>
*/
/**
* @property animated
* @type Boolean
* <p>Determines whether the scroll view's content area change is animated.</p>
*/
/**
* @class zoomScaleOption
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ScrollView.yml
* <p>Optional parameter for {@link Titanium.UI.ScrollView#method-setZoomScale setZoomScale} method.</p>
* @description <p>On iOS, the optional parameter <code>animated</code> to enable the animation while the scroll view
zooms. For example</p>
<pre><code>setZoomScale(2, {animated:true})
</code></pre>
*/
/**
* @property animated
* @type Boolean
* <p>Determines whether the scroll view's zooming is animated.</p>
*/
/**
* @class Titanium.UI.ScrollableView
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ScrollableView.yml
* <p>A view that encapsulates a horizontally-scrolling set of child views, known as pages, navigable
using its built-in horizontal swipe gestures.</p>
* @description <p>Use the {@link Titanium.UI#method-createScrollableView} method or <strong><code><ScrollableView></code></strong> Alloy element to create
a scrollable view.</p>
<p>The <code>ScrollableView</code> supports an on-screen paging control to indicate whether a previous or next
page exists. When the paging control is enabled on iOS or Mobile Web, by default it appears as
small dots on the bottom of the screen, whereas Android displays arrows on the left and
right-hand sides. </p>
<p>Only the <code>scroll</code> event exists for the <code>ScrollableView</code> on Android. To support others, child
views may be added to pages, and event listeners added to these views instead of the pages
themselves. </p>
<p>In a previous Titanium version for iOS, the <code>maxZoomScale</code> and <code>minZoomScale</code> properties were
removed for performance and parity reasons. As they still remain in {@link Titanium.UI.ScrollView},
the equivalent functionality may be obtained by adding a <code>ScrollView</code> to <code>ScrollableView</code>. See
the "Simple Scrollable View with 2 Zoomable Images" example for a demonstration.</p>
* <h3>Examples</h3>
<h4>Simple Scrollable View with 3 Views</h4>
<p>Create three views and assign them as pages to a scrollable view.</p>
<pre><code>var win = Ti.UI.createWindow();
var view1 = Ti.UI.createView({ backgroundColor:'#123' });
var view2 = Ti.UI.createView({ backgroundColor:'#246' });
var view3 = Ti.UI.createView({ backgroundColor:'#48b' });
var scrollableView = Ti.UI.createScrollableView({
views:[view1,view2,view3],
showPagingControl:true
});
win.add(scrollableView);
win.open();
</code></pre><h4>Simple Scrollable View with 2 Zoomable Images</h4>
<p>Create two scroll views, each containing an image view, and assign them as pages to a
scrollable view.</p>
<pre><code>var img1 = Ti.UI.createImageView({
image:'http://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/' +
'Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/' +
'402px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg'
});
var img1Wrapper = Ti.UI.createScrollView({
maxZoomScale:4.0,
});
img1Wrapper.add(img1);
var img2 = Ti.UI.createImageView({
image:'http://www.nasa.gov/images/content/' +
'616903main_rover_comparison1600_1600-1200.jpg'
});
var img2Wrapper = Ti.UI.createScrollView({
maxZoomScale:4.0,
});
img2Wrapper.add(img2);
var photosView = Ti.UI.createScrollableView({
showPagingControl:true,
views:[img1Wrapper, img2Wrapper]
});
win.add(photosView);
</code></pre><h4>Alloy XML Markup</h4>
<p>First example as an Alloy view.</p>
<pre><code><Alloy>
<Window id="win">
<ScrollableView id="scrollableView" showPagingControl="true">
<View id="view1" backgroundColor="#123">
<Label>View 1</Label>
</View>
<View id="view2" backgroundColor="#246">
<Label>View 2</Label>
</View>
<View id="view3" backgroundColor="#48b">
<Label>View 3</Label>
</View>
</ScrollableView>
</Window>
</Alloy>
</code></pre>
*/
/**
* @event longclick
* @hide
* <p>Fired when the device detects a long click.</p>
* @description <p>A long click is generated by touching and holding on the touchscreen or holding down the
trackball button. </p>
<p>The event occurs before the finger/button is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>As the trackball can fire this event, it is not intended to return the <code>x</code> and <code>y</code>
coordinates of the touch, even when it is generated by the touchscreen. </p>
<p>A <code>longclick</code> blocks a <code>click</code>, meaning that a <code>click</code> event will not fire when a
<code>longclick</code> listener exists.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event twofingertap
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event touchstart
* <p>Fired as soon as the device detects a touch gesture against this view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchcancel
* <p>Fired when a touch gesture is interrupted by the device.</p>
* @description <p>Generated in various circumstances, including an incoming call to allow the UI to clean
up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event click
* @hide
* <p>Fired when the device detects a click against the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event dblclick
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event singletap
* <p>Fired when the device detects a single tap against this view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event doubletap
* <p>Fired when the device detects a double tap against this page.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event longpress
* <p>Fired when the device detects a long press against this view.</p>
* @description <p>Generated by touching and holding on a touchscreen, this event occurs before the
finger is lifted again. Note that <code>longpress</code> cannot be generated with a trackball.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event scroll
* <p>Fired repeatedly as the view is being scrolled.</p>
* @description <p>Prior to 2.1, the scroll event did not fire consistently on all platforms. On iOS and Mobile
Web, it fired when scrolling ended, and on Android, it fired when drag ended. You can restore
the pre-2.1 behavior by listening for the <code>scrollEnd</code> or <code>dragEnd</code> events instead.</p>
* @param {Number} currentPage
<p>Index of the currently visible view of {@link Titanium.UI.ScrollableView#property-views}.</p>
* @param {Number} currentPageAsFloat
<p>Current page index that the view is scrolled to as a float. For
example, if the user is holding the <code>ScrollableView</code> in between
the first and second page, this will have a value of 0.5.</p>
* @param {Titanium.UI.View} view
<p>The currently visible view.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event scrollEnd
* <p>Fired when the view has stopped moving completely.</p>
* @deprecated 3.0.0 Use <Titanium.UI.ScrollableView.scrollend> instead.
* @param {Number} currentPage
<p>Index of the currently visible view of {@link Titanium.UI.ScrollableView#property-views}.</p>
* @param {Titanium.UI.View} view
<p>The currently visible view.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @event dragStart
* <p>Fired when the scrollable region starts being dragged.</p>
* @deprecated 3.0.0 Use <Titanium.UI.ScrollableView.dragstart> instead.
* @description <p>A dragging gesture is when a touch remains in contact with the display to physically drag
the view, as opposed to it being the result of scrolling momentum.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 2.1.0
*/
/**
* @event dragEnd
* <p>Fired when the scrolling drag gesture on the view has been completed.</p>
* @deprecated 3.0.0 Use <Titanium.UI.ScrollableView.dragend> instead.
* @param {Number} currentPage
<p>Index of the currently visible view of {@link Titanium.UI.ScrollableView#property-views}.</p>
* @param {Titanium.UI.View} view
<p>The currently visible view.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @event scrollend
* <p>Fired when the view has stopped moving completely.</p>
* @param {Number} currentPage
<p>Index of the currently visible view of {@link Titanium.UI.ScrollableView#property-views}.</p>
* @param {Titanium.UI.View} view
<p>The currently visible view.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
*/
/**
* @event dragstart
* <p>Fired when the scrollable region starts being dragged.</p>
* @description <p>A dragging gesture is when a touch remains in contact with the display to physically drag
the view, as opposed to it being the result of scrolling momentum.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 3.0.0
*/
/**
* @event dragend
* <p>Fired when the scrolling drag gesture on the view has been completed.</p>
* @param {Number} currentPage
<p>Index of the currently visible view of {@link Titanium.UI.ScrollableView#property-views}.</p>
* @param {Titanium.UI.View} view
<p>The currently visible view.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform mobileweb 3.0.0
*/
/**
* @method insertViewsAt
* <p>Inserts views at the specified position in the {@link Titanium.UI.ScrollableView#property-views views} array.</p>
* @param {Number} position
<p>Position(index) in the {@link Titanium.UI.ScrollableView#property-views views} array to insert the view</p>
* @param {Array<Titanium.UI.View>} views
<p>Views to insert.</p>
* @platform android 5.4.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method addView
* <p>Adds a new page to this Scrollable View.</p>
* @param {Titanium.UI.View} view
<p>The page to add.</p>
*/
/**
* @method moveNext
* <p>Sets the current page to the next consecutive page in {@link Titanium.UI.ScrollableView#property-views}.</p>
* @description <p>Since Titanium Mobile Release 3.3.0, using this method to change current page animates the change on iOS and Android.</p>
* @platform android 0.8
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @method movePrevious
* <p>Sets the current page to the previous consecutive page in {@link Titanium.UI.ScrollableView#property-views}.</p>
* @description <p>Since Titanium Mobile Release 3.3.0, using this method to change current page animates the change on iOS and Android.</p>
* @platform android 0.8
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @method removeView
* <p>Removes an existing page from this Scrollable View.</p>
* @description <p>On Android and Mobile Web, does nothing if the page does not exist in
{@link Titanium.UI.ScrollableView#property-views}. </p>
<p>On iOS, throws an exception if the page does not exist in {@link Titanium.UI.ScrollableView#property-views}
or the index is invalid.</p>
* @param {Number/Titanium.UI.View} view
<p>A {@link Titanium.UI.View} object (all platforms) or integer index (iPhone, iPad only) of
a page to remove.</p>
*/
/**
* @method scrollToView
* <p>Scrolls to the specified page in {@link Titanium.UI.ScrollableView#property-views}.</p>
* @param {Number/Titanium.UI.View} view
<p>An integer index or {@link Titanium.UI.View} object to set as the current page.</p>
*/
/**
* @method getCacheSize
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-cacheSize} property.</p>
* @returns {Number}
* @platform android 4.1.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setCacheSize
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-cacheSize} property.</p>
* @param {Number} cacheSize
<p>New value for the property.</p>
* @platform android 4.1.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getCurrentPageIndicatorColor
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-currentPageIndicatorColor} property.</p>
* @returns {String}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method setCurrentPageIndicatorColor
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-currentPageIndicatorColor} property.</p>
* @param {String} currentPageIndicatorColor
<p>New value for the property.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method getDisableBounce
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-disableBounce} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setDisableBounce
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-disableBounce} property.</p>
* @param {Boolean} disableBounce
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getOverScrollMode
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-overScrollMode} property.</p>
* @returns {Number}
* @platform android 3.1.0
*/
/**
* @method setOverScrollMode
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-overScrollMode} property.</p>
* @param {Number} overScrollMode
<p>New value for the property.</p>
* @platform android 3.1.0
*/
/**
* @method getPagingControlColor
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-pagingControlColor} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setPagingControlColor
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-pagingControlColor} property.</p>
* @param {String} pagingControlColor
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getPagingControlHeight
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-pagingControlHeight} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setPagingControlHeight
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-pagingControlHeight} property.</p>
* @param {Number} pagingControlHeight
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getPageIndicatorColor
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-pageIndicatorColor} property.</p>
* @returns {String}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method setPageIndicatorColor
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-pageIndicatorColor} property.</p>
* @param {String} pageIndicatorColor
<p>New value for the property.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method getShowPagingControl
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-showPagingControl} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setShowPagingControl
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-showPagingControl} property.</p>
* @param {Boolean} showPagingControl
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getPagingControlTimeout
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-pagingControlTimeout} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method setPagingControlTimeout
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-pagingControlTimeout} property.</p>
* @param {Number} pagingControlTimeout
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method getPagingControlAlpha
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-pagingControlAlpha} property.</p>
* @returns {Number}
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method setPagingControlAlpha
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-pagingControlAlpha} property.</p>
* @param {Number} pagingControlAlpha
<p>New value for the property.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method getPagingControlOnTop
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-pagingControlOnTop} property.</p>
* @returns {Boolean}
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method setPagingControlOnTop
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-pagingControlOnTop} property.</p>
* @param {Boolean} pagingControlOnTop
<p>New value for the property.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method getOverlayEnabled
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-overlayEnabled} property.</p>
* @returns {Boolean}
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method setOverlayEnabled
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-overlayEnabled} property.</p>
* @param {Boolean} overlayEnabled
<p>New value for the property.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method getClipViews
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-clipViews} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setClipViews
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-clipViews} property.</p>
* @param {Boolean} clipViews
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getHitRect
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-hitRect} property.</p>
* @returns {Dimension}
* @platform iphone 2.1
* @platform ipad 2.1
*/
/**
* @method setHitRect
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-hitRect} property.</p>
* @param {Dimension} hitRect
<p>New value for the property.</p>
* @platform iphone 2.1
* @platform ipad 2.1
*/
/**
* @method getCurrentPage
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-currentPage} property.</p>
* @returns {Number}
*/
/**
* @method setCurrentPage
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-currentPage} property.</p>
* @param {Number} currentPage
<p>New value for the property.</p>
*/
/**
* @method getScrollingEnabled
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-scrollingEnabled} property.</p>
* @returns {Boolean}
* @platform android 2.1.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setScrollingEnabled
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-scrollingEnabled} property.</p>
* @param {Boolean} scrollingEnabled
<p>New value for the property.</p>
* @platform android 2.1.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getViews
* <p>Gets the value of the {@link Titanium.UI.ScrollableView#property-views} property.</p>
* @returns {Titanium.UI.View[]}
*/
/**
* @method setViews
* <p>Sets the value of the {@link Titanium.UI.ScrollableView#property-views} property.</p>
* @param {Array<Titanium.UI.View>} views
<p>New value for the property.</p>
*/
/**
* @property cacheSize
* @type Number
* <p>Number of pages to cache (pre-render).</p>
* @description <p>Pages are rendered in the range (currentPage +/- (cacheSize - 1)/2), <em>rounded down</em> for even
values (i.e. cacheSize=4 renders 3 pages into the cache.) Keep in mind that improved
performance (larger cache) will lead to faster performance, but greater memory usage.</p>
* @platform android 4.1.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [currentPageIndicatorColor=undefined (system-default white)]
* @type String
* <p>Color for the current page of the paging control, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property [disableBounce=false]
* @type Boolean
* <p>Determines whether page bouncing effect is disabled.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [overScrollMode=Titanium.UI.Android.OVER_SCROLL_ALWAYS]
* @type Number
* <p>Determines the behavior when the user overscolls the view.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-OVER_SCROLL_ALWAYS}
<li> {@link Titanium.UI.Android#property-OVER_SCROLL_IF_CONTENT_SCROLLS}
<li> {@link Titanium.UI.Android#property-OVER_SCROLL_NEVER}
</ul></p>
* @platform android 3.1.0
*/
/**
* @property [pagingControlColor=black]
* @type String
* <p>Color of the paging control, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [pagingControlHeight=20]
* @type Number
* <p>Height of the paging control, in pixels.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [pageIndicatorColor=undefined (system-default gray)]
* @type String
* <p>Color of the paging control, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property [showPagingControl=false]
* @type Boolean
* <p>Determines whether the paging control is visible.</p>
* @description <p>Set to <code>true</code> to show paging control.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [pagingControlTimeout=3000]
* @type Number
* @creationOnly
* <p>Number of milliseconds to wait before hiding the paging control.</p>
* @description <p>Set to less than or equal to <code>0</code> to disable timeout, to keep controls displayed.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @property [pagingControlAlpha=1]
* @type Number
* <p>Alpha value of the paging control.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property [pagingControlOnTop=false]
* @type Boolean
* <p>Determines whether the paging control is displayed at the top or bottom of the view.</p>
* @description <p>Set to <code>true</code> for the paging control at the top.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property [overlayEnabled=false]
* @type Boolean
* <p>Determines whether the paging control is added as an overlay to the view.</p>
* @description <p>If this property is set to <code>true</code>, the view takes up the entire height available in the
parent view and the paging control is placed over the view. It is advisable to set an
appropriate value for {@link Titanium.UI.ScrollableView#property-pagingControlAlpha pagingControlAlpha}
along with this property, so that the underlying view content may be seen properly.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property [clipViews=true]
* @type Boolean
* @creationOnly
* <p>Determines whether the previous and next pages are clipped, so that they are not visible
adjacent to the current page.</p>
* @description <p>Set to <code>false</code> to allow the previous or next pages to be seen. Note that
ScrollableView's {@link Titanium.UI.ScrollableView#property-width width} must be smaller than its parent
view in order to make this property effective.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [hitRect=undefined (hit against size of view)]
* @type Dimension
* <p>Sets the region where this view responds to gestures.</p>
* @description <p>This property is particularly useful when {@link Titanium.UI.ScrollableView#property-clipViews clipViews}
is set to <code>false</code> and the dimension of this view is small, to create a larger area for the
user to perform swipe gestures against. </p>
<p>Note that the <code>x</code> and <code>y</code> values specified are relative to the position of the view.</p>
* @platform iphone 2.1
* @platform ipad 2.1
*/
/**
* @property currentPage
* @type Number
* <p>Index of the active page.</p>
* @description <p>Since Titanium Mobile Release 3.3.0, using this property to change current page changes the
page without animation on iOS and Android.</p>
*/
/**
* @property [scrollingEnabled=undefined (scrolling enabled)]
* @type Boolean
* <p>Determines whether scrolling is enabled for the view.</p>
* @description <p>If this property is unset or <code>true</code>, scrolling is enabled.</p>
* @platform android 2.1.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property views
* @type Titanium.UI.View[]
* <p>Sets the pages within this Scrollable View.</p>
*/
/**
* @class Titanium.UI.SearchBar
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/SearchBar.yml
* <p>A specialized text field for entering search text.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/searchbar/searchbar_android.png" height="25" /></td>
<td><img src="images/searchbar/searchbar_ios.png" height="25" /></td>
</tr>
<tr><th>Android</th><th>iOS</th></tr>
</table>
<p>The <code>SearchBar</code> object is closely modeled on an iOS native search bar.
As such, not all features are supported on other platforms. For Android applications,
consider using a {@link Titanium.UI.Android.SearchView} object instead.</p>
<p>Search bars are most commonly used for filtering the rows in a {@link Titanium.UI.TableView TableView}.
You can add a search bar to a table view by setting the table view's
{@link Titanium.UI.TableView#property-search search} property. </p>
<p>A search bar can also be used without a table view.</p>
<p>Use the {@link Titanium.UI#method-createSearchBar} method or Alloy <strong><code><SearchBar></code></strong> element to create a search bar.</p>
<h4>Android Platform Implementation Notes</h4>
<p>On Android, there are several issues with the current implementation:</p>
<ul>
<li><p>The cancel button does not work. It does not clear the search bar text or
close the onscreen keyboard.</p></li>
<li><p>Calling the <code>blur</code> method on the search bar closes the onscreen keyboard,
but the search bar retains its focused appearance.</p></li>
<li><p>The search bar does not lose focus when the user clicks on a row in the search
results.</p></li>
<li><p>The <code>value</code> property cannot be specified in the <code>createSearchBar</code> method.</p></li>
</ul>
<p>To use a search bar on Android, you may need to explicitly control the focus and
clearing of the search bar, depending on your desired behavior. For example, to clear
the search bar and dismiss the onscreen keyboard when the user selects a row, you
could add code like this to the <code>click</code> event handler on your table view:</p>
<pre><code>myTableView.addEventListener('click', function(e) {
if (Ti.Platform.name === 'android') {
// Clear search bar
mySearchBar.value ="";
// hiding and showing the search bar forces it back to its non-focused appearance.
mySearchBar.hide();
mySearchBar.show();
}
// standard click event handling here
</code></pre>
* <h3>Examples</h3>
<h4>Simple Search Bar</h4>
<pre><code>var search = Titanium.UI.createSearchBar({
barColor:'#000',
showCancel:true,
height:43,
top:0,
});</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<pre><code><Alloy>
<SearchBar id="search" barColor="#000" showCancel="true" height="43" top="0" />
</Alloy>
</code></pre>
*/
/**
* @event focus
* <p>Fired when the search bar gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {String} value
<p>Value of the search bar.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event blur
* <p>Fired when the search bar loses focus.</p>
* @param {String} value
<p>Value of the search bar.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event bookmark
* <p>Fired when the bookmark button is pressed.</p>
* @param {String} value
<p>Value of the search bar.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event cancel
* <p>Fired when the cancel button is pressed.</p>
* @param {String} value
<p>Value of the search bar.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event change
* <p>Fired when the value of the search bar changes.</p>
* @param {String} value
<p>Value of the search bar.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event return
* <p>Fired when keyboard search button is pressed.</p>
* @param {String} value
<p>Value of the search bar.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method add
* @hide
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>The child view is added as the last child in this view's hierarchy. </p>
<p>Although all views inherit from {@link Titanium.UI.View}, not all views are capable of
containing other views. In particular:</p>
<ul>
<li>Some views are not designed to be containers at all.</li>
<li>Some views are special-purpose containers that can only contain certain other
views.</li>
<li>Some views are top-level containers that cannot (or should not) be added to other views.</li>
</ul>
<h4>Non-Container Views</h4>
<p>The following views are not intended to act as containers that can hold other
views:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator ActivityIndicator}</li>
<li>{@link Titanium.UI.Button Button}</li>
<li>{@link Titanium.UI.ImageView ImageView}</li>
<li>{@link Titanium.UI.Label Label}</li>
<li>{@link Titanium.UI.ProgressBar ProgressBar}</li>
<li>{@link Titanium.UI.SearchBar SearchBar}</li>
<li>{@link Titanium.UI.Slider Slider}</li>
<li>{@link Titanium.UI.Switch Switch}</li>
<li>{@link Titanium.UI.TableView TableView}</li>
<li>{@link Titanium.UI.TextArea TextArea}</li>
<li>{@link Titanium.UI.TextField TextField}</li>
<li>{@link Titanium.UI.WebView WebView}</li>
</ul>
<p>Adding children to the these views <em>may</em> be supported on some platforms,
but is not guaranteed to work across platforms. Where it is supported, it may not
work as expected.</p>
<p>For maximum portability, these views should be treated as if they do not support children. <br>
Instead of adding children to these views, applications can positon other views as
siblings. For example, instead of adding a button as a child of a <code>WebView</code>, you can add
the button to the web view's parent such that it appears on top of the web view. </p>
<h4>Special-Purpose Containers</h4>
<p>A few view objects act as special-purpose containers--that is, they only manage
certain types of children, and many of them support a special means of adding
these children, instead of the general <code>add</code> method. These containers include:</p>
<ul>
<li><p>{@link Titanium.UI.ButtonBar ButtonBar} and {@link Titanium.UI.iOS.TabbedBar TabbedBar} are designed
to hold their own internally-created buttons, assigned by adding strings to the "labels" array.
Views added using the <code>add</code> method are displayed on top of these buttons.</p></li>
<li><p>{@link Titanium.UI.Picker Picker}. Can only hold <code>PickerRows</code> and <code>PickerColumns</code>, which
are added using the <code>add</code> method. Adding other types of views to a <code>Picker</code> is not
supported.</p></li>
<li><p>{@link Titanium.UI.TableView TableView} is a specialized container for
<code>TableViewSection</code> and <code>TableViewRow</code> objects. These objects must be
added using the properties and methods that <code>TableView</code> provides
for adding and removing sectons and rows.</p>
<p>On some platforms, it is possible to add arbitrary child views to a table view
using the <code>add</code> method. However, this is not guaranteed to work on all platforms,
and in general, should be avoided.</p></li>
<li><p>{@link Titanium.UI.TableViewSection TableViewSection} is a specialized container
for <code>TableViewRow</code> objects, which <em>are</em> added using the <code>add</code> method. The <code>add</code> method
on <code>TableViewSection</code> can only be used to add <code>TableViewRow</code> objects.</p></li>
<li><p>{@link Titanium.UI.iOS.Toolbar Toolbar} is designed to hold buttons and certain
other controls, added to its <code>items</code> array. Views added using the <code>add</code> method are
displayed on top of the controls in the <code>items</code> array.</p></li>
<li><p>The <code>Tab</code>, <code>TabGroup</code>, <code>NavigationGroup</code>, <code>NavigationWindow</code> and <code>SplitWindow</code> objects are
special containers that manage windows. These are discussed in the
"Top-Level Containers" section.</p></li>
</ul>
<h4>Top-Level Containers</h4>
<p>There are certain top-level containers that are not intended to be added
as the children of other views. These top-level containers include
{@link Titanium.UI.Window}, {@link Titanium.UI.iPad.SplitWindow}, {@link Titanium.UI.iOS.NavigationWindow},
and {@link Titanium.UI.TabGroup}. Other types of views must be added
to a top-level container in order to be displayed on screen.</p>
<p>The special containers {@link Titanium.UI.MobileWeb.NavigationGroup},
{@link Titanium.UI.iOS.NavigationWindow}, {@link Titanium.UI.iPad.SplitWindow},
{@link Titanium.UI.Tab}, and {@link Titanium.UI.TabGroup} manage windows.
These managed windows may be referred to as <em>children</em> of the
container, but they are not added using the <code>add</code> method.</p>
<p>Note that although a <code>NavigationGroup</code> manages windows, it is not itself a
top-level container. It must be added to a <code>Window</code> in order to be displayed.</p>
<p><code>Tab</code> is another kind of special container: it is not itself a top-level container,
but can only be used within a <code>TabGroup</code>. You cannot <code>add</code> a <code>Tab</code> to an arbitrary
container.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method blur
* <p>Causes the search bar to lose focus.</p>
*/
/**
* @method focus
* <p>Causes the search bar to gain focus.</p>
*/
/**
* @method setShowCancel
* <p>Shows or hides the cancel button.</p>
* @description <p>Sets the value of the {@link Titanium.UI.SearchBar#property-showCancel showCancel} property.</p>
<p>On iOS, this method can be used to specify animation properties when changing the
state of the cancel button. </p>
<pre><code>searchBar.setShowCancel(true, { animated: true });
</code></pre>
* @param {Boolean} showCancel
<p>New value for {@link Titanium.UI.SearchBar#property-showCancel showCancel}.</p>
* @param {Dictionary} animated (optional)
<p>Dictionary of animation properties. Currently only a
single boolean property, <code>animated</code> is supported. Only used on iOS.</p>
*/
/**
* @method getAutocapitalization
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-autocapitalization} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setAutocapitalization
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-autocapitalization} property.</p>
* @param {Number} autocapitalization
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getAutocorrect
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-autocorrect} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setAutocorrect
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-autocorrect} property.</p>
* @param {Boolean} autocorrect
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getBarColor
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-barColor} property.</p>
* @returns {String}
*/
/**
* @method setBarColor
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-barColor} property.</p>
* @param {String} barColor
<p>New value for the property.</p>
*/
/**
* @method getCancelButtonTitle
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-cancelButtonTitle} property.</p>
* @returns {String}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method setCancelButtonTitle
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-cancelButtonTitle} property.</p>
* @param {String} cancelButtonTitle
<p>New value for the property.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method getHintText
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-hintText} property.</p>
* @returns {String}
*/
/**
* @method setHintText
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-hintText} property.</p>
* @param {String} hintText
<p>New value for the property.</p>
*/
/**
* @method getHinttextid
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-hinttextid} property.</p>
* @returns {String}
*/
/**
* @method setHinttextid
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-hinttextid} property.</p>
* @param {String} hinttextid
<p>New value for the property.</p>
*/
/**
* @method getKeyboardType
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-keyboardType} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setKeyboardType
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-keyboardType} property.</p>
* @param {Number} keyboardType
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getKeyboardAppearance
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-keyboardAppearance} property.</p>
* @returns {Number}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setKeyboardAppearance
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-keyboardAppearance} property.</p>
* @param {Number} keyboardAppearance
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getPrompt
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-prompt} property.</p>
* @returns {String}
*/
/**
* @method setPrompt
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-prompt} property.</p>
* @param {String} prompt
<p>New value for the property.</p>
*/
/**
* @method getPromptid
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-promptid} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setPromptid
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-promptid} property.</p>
* @param {String} promptid
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getShowBookmark
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-showBookmark} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setShowBookmark
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-showBookmark} property.</p>
* @param {Boolean} showBookmark
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getShowCancel
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-showCancel} property.</p>
* @returns {Boolean}
*/
/**
* @method setShowCancel
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-showCancel} property.</p>
* @param {Boolean} showCancel
<p>New value for the property.</p>
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-style} property.</p>
* @returns {Number}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-style} property.</p>
* @param {Number} style
<p>New value for the property.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.UI.SearchBar#property-value} property.</p>
* @returns {String}
*/
/**
* @method setValue
* <p>Sets the value of the {@link Titanium.UI.SearchBar#property-value} property.</p>
* @param {String} value
<p>New value for the property.</p>
*/
/**
* @property [autocapitalization=No autocapitalization.]
* @type Number
* <p>Determines how text is capitalized during typing.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_ALL}
<li> {@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_NONE}
<li> {@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_SENTENCES}
<li> {@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_WORDS}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [autocorrect=false]
* @type Boolean
* <p>Determines whether the text in the search bar is autocorrected during typing.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [barColor=System default bar color.]
* @type String
* <p>Bar color of the search bar view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>On iOS and Android, <code>barColor</code> specifies the color of the "frame" around the search text field.</p>
*/
/**
* @property [cancelButtonTitle=System-localized "Cancel"]
* @type String
* <p>The title of the cancel button when the search bar field is focused.</p>
* @description <p>Use this property if you want to display a custom cancel title.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property [hintText=On iOS, "Search"; on Android, no hint text.]
* @type String
* <p>Text to show when the search bar field is not focused.</p>
*/
/**
* @property hinttextid
* @type String
* <p>Key identifying a string from the locale file to use for the
{@link Titanium.UI.SearchBar#property-hintText hintText} property.</p>
* @description <p>Only one of <code>hintText</code> or <code>hinttextid</code> should be specified.</p>
*/
/**
* @property [keyboardType={@link Titanium.UI#property-KEYBOARD_TYPE_DEFAULT}]
* @type Number
* <p>Keyboard type constant to use when the field is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_DECIMAL_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_ASCII}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_EMAIL}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NAMEPHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBERS_PUNCTUATION}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBER_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_PHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_WEBSEARCH}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_TWITTER}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_URL}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [keyboardAppearance={@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}]
* @type Number
* <p>Determines the appearance of the keyboard to be displayed the field is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_ALERT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DARK}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_LIGHT}
</ul></p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property [prompt=No prompt.]
* @type String
* <p>Single line of text displayed at the top of the search bar.</p>
*/
/**
* @property promptid
* @type String
* <p>Key identifying a string from the locale file to use for the
{@link Titanium.UI.SearchBar#property-prompt prompt} property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [showBookmark=false]
* @type Boolean
* <p>Determines whether the bookmark button is displayed.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [showCancel=false]
* @type Boolean
* <p>Determines whether the cancel button is displayed.</p>
* @description <p>On iOS, you can specify that showing and hiding the cancel button should be animated.
The change is not animated by default. To enable animation, call
{@link Titanium.UI.SearchBar#method-setShowCancel setShowCancel}.</p>
*/
/**
* @property [style={@link Titanium.UI.iOS#property-SEARCH_BAR_STYLE_PROMINENT}]
* @type Number
* <p>Determines the style of the search bar.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-SEARCH_BAR_STYLE_PROMINENT}
<li> {@link Titanium.UI.iOS#property-SEARCH_BAR_STYLE_MINIMAL}
</ul></p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property value
* @type String
* <p>Value of the search bar.</p>
* @description <p>On Android, the value cannot be set until after the search bar is created.</p>
*/
/**
* @class Titanium.UI.Slider
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Slider.yml
* <p>A slider component with a draggable thumb.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/slider/slider_android.png" height="25" /></td>
<td><img src="images/slider/slider_ios.png" height="25" /></td>
<td><img src="images/slider/slider_mobileweb.png" height="25" /></td>
<td><img src="images/slider/slider_wp.png" height="25" /></td>
</tr>
<tr><th>Android</th><th>iOS</th><th>Mobile Web</th><th>Windows Phone</th></tr>
</table>
<p>A slider lets the user select from a range of values by dragging the slider thumb. </p>
<p>Use the {@link Titanium.UI#method-createSlider} method or <strong><code><Slider></code></strong> Alloy element to create a slider.</p>
<h4>Android Platform Implementation Notes</h4>
<p>On Android, the user can also maniuplate the slider using the arrow keys. For this
reason, placing other focusable UI elements to the left or right of
the slider is not recommended.</p>
<p>On Android, both <code>min</code> and <code>max</code> must be specified for the slider to work properly.</p>
<p>Earlier versions of the Titanium SDK implicitly enforced that both the {@link Titanium.UI.Slider#property-leftTrackImage leftTrackImage} and
{@link Titanium.UI.Slider#property-rightTrackImage rightTrackImage} properties be specified before the properties would be honored. Beginning with
Titanium SDK 4.0.0 this limitation has been removed. However it is recommended that either both or neither be specified.</p>
* <h3>Examples</h3>
<h4>Simple Slider</h4>
<p>The following sample demonstrates creating a slider and adding a listener to
handle the change events.</p>
<pre><code>var slider = Titanium.UI.createSlider({
top: 50,
min: 0,
max: 100,
width: '100%',
value: 50
});
var label = Ti.UI.createLabel({
text: slider.value,
width: '100%',
top: 30,
left: 0,
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER
});
slider.addEventListener('change', function(e) {
label.text = String.format("%3.1f", e.value);
});
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<p>Implement the <code>updateLabel</code> callback in the controller to update the label value
and set the initial <code>text</code> value for the label in the TSS file or controller.</p>
<p>index.xml:</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white">
<Slider id="slider" top="50" min="0" max="100" width="100%" value="50" onChange="updateLabel"/>
<Label id="label" width="100%" top="30" left="0" />
</Window>
</Alloy>
</code></pre>
<p>index.js:</p>
<pre><code>$.slider.text = $.slider.value;
function updateLabel(e){
$.label.text = String.format("%3.1f", e.value);
}
$.win.open();
</code></pre>
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event click
* <p>Fired when the device detects a click against the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>For sliders on Android, the click event is <strong>only</strong> generated by a trackball click
on the slider thumb.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform mobileweb 1.8
*/
/**
* @event change
* <p>Fired when the value of the slider changes.</p>
* @param {Number} value
<p>New value of the slider.</p>
* @param {String} (android) thumbSize
<p>Dictionary with properties <code>width</code> and <code>height</code> of the size of the thumb.
Available with custom thumb image.</p>
* @param {Dictionary} (android) thumbOffset
<p>Dictionary with properties <code>x</code> and <code>y</code> of the thumb's left-top corner in
the control. Available with custom thumb image.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event start
* <p>Fired when the user starts tracking the slider.</p>
* @param {Number} value
<p>Current value of the slider.</p>
* @param {Boolean} bubbles
<p>False. This event does not bubble.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @event stop
* <p>Fired when the user stops tracking the slider.</p>
* @param {Number} value
<p>Current value of the slider.</p>
* @param {Boolean} bubbles
<p>False. This event does not bubble.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method remove
* <p>Removes a child view from this view's hierarchy.</p>
* @description <p>See also: {@link Titanium.UI.Label#method-add add}, {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method add
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>Adding children to a <code>Slider</code> is not supported on all platforms.</p>
<p>If you need to display views on top of this object, consider using
another view as a container for both this object and the views you want
to appear on top of it.</p>
<p>See also: {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setValue
* <p>Sets the {@link Titanium.UI.Slider#property-value value} property.</p>
* @description <p>On iOS, you can specify that the value change should be animated by passing the
optional <code>options</code> parameter. </p>
* @param {Number} value
<p>New value for the {@link Titanium.UI.Slider#property-value value} property.</p>
* @param {Dictionary} options (optional)
<p>Specifies animation options. The only supported property
for this dictionary is the <code>animated</code> flag, which specifies whether
the value change should be animated. <code>animated</code> is false by default. Only used
on iOS.</p>
*/
/**
* @method getHeight
* @hide
* <p>Gets the value of the {@link Titanium.UI.Slider#property-height} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setHeight
* @hide
* <p>Sets the value of the {@link Titanium.UI.Slider#property-height} property.</p>
* @param {Number/String} height
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getDisabledLeftTrackImage
* <p>Gets the value of the {@link Titanium.UI.Slider#property-disabledLeftTrackImage} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setDisabledLeftTrackImage
* <p>Sets the value of the {@link Titanium.UI.Slider#property-disabledLeftTrackImage} property.</p>
* @param {String} disabledLeftTrackImage
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getDisabledRightTrackImage
* <p>Gets the value of the {@link Titanium.UI.Slider#property-disabledRightTrackImage} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setDisabledRightTrackImage
* <p>Sets the value of the {@link Titanium.UI.Slider#property-disabledRightTrackImage} property.</p>
* @param {String} disabledRightTrackImage
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getDisabledThumbImage
* <p>Gets the value of the {@link Titanium.UI.Slider#property-disabledThumbImage} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setDisabledThumbImage
* <p>Sets the value of the {@link Titanium.UI.Slider#property-disabledThumbImage} property.</p>
* @param {String} disabledThumbImage
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getEnabled
* <p>Gets the value of the {@link Titanium.UI.Slider#property-enabled} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setEnabled
* <p>Sets the value of the {@link Titanium.UI.Slider#property-enabled} property.</p>
* @param {Boolean} enabled
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getHighlightedLeftTrackImage
* <p>Gets the value of the {@link Titanium.UI.Slider#property-highlightedLeftTrackImage} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setHighlightedLeftTrackImage
* <p>Sets the value of the {@link Titanium.UI.Slider#property-highlightedLeftTrackImage} property.</p>
* @param {String} highlightedLeftTrackImage
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getHighlightedRightTrackImage
* <p>Gets the value of the {@link Titanium.UI.Slider#property-highlightedRightTrackImage} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setHighlightedRightTrackImage
* <p>Sets the value of the {@link Titanium.UI.Slider#property-highlightedRightTrackImage} property.</p>
* @param {String} highlightedRightTrackImage
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getHighlightedThumbImage
* <p>Gets the value of the {@link Titanium.UI.Slider#property-highlightedThumbImage} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setHighlightedThumbImage
* <p>Sets the value of the {@link Titanium.UI.Slider#property-highlightedThumbImage} property.</p>
* @param {String} highlightedThumbImage
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getLeftTrackImage
* <p>Gets the value of the {@link Titanium.UI.Slider#property-leftTrackImage} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setLeftTrackImage
* <p>Sets the value of the {@link Titanium.UI.Slider#property-leftTrackImage} property.</p>
* @param {String} leftTrackImage
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getLeftTrackLeftCap
* <p>Gets the value of the {@link Titanium.UI.Slider#property-leftTrackLeftCap} property.</p>
* @returns {Number}
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setLeftTrackLeftCap
* <p>Sets the value of the {@link Titanium.UI.Slider#property-leftTrackLeftCap} property.</p>
* @param {Number} leftTrackLeftCap
<p>New value for the property.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getLeftTrackTopCap
* <p>Gets the value of the {@link Titanium.UI.Slider#property-leftTrackTopCap} property.</p>
* @returns {Number}
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setLeftTrackTopCap
* <p>Sets the value of the {@link Titanium.UI.Slider#property-leftTrackTopCap} property.</p>
* @param {Number} leftTrackTopCap
<p>New value for the property.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getMaxRange
* <p>Gets the value of the {@link Titanium.UI.Slider#property-maxRange} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method setMaxRange
* <p>Sets the value of the {@link Titanium.UI.Slider#property-maxRange} property.</p>
* @param {Number} maxRange
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method getMinRange
* <p>Gets the value of the {@link Titanium.UI.Slider#property-minRange} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method setMinRange
* <p>Sets the value of the {@link Titanium.UI.Slider#property-minRange} property.</p>
* @param {Number} minRange
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method getRightTrackImage
* <p>Gets the value of the {@link Titanium.UI.Slider#property-rightTrackImage} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setRightTrackImage
* <p>Sets the value of the {@link Titanium.UI.Slider#property-rightTrackImage} property.</p>
* @param {String} rightTrackImage
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getRightTrackLeftCap
* <p>Gets the value of the {@link Titanium.UI.Slider#property-rightTrackLeftCap} property.</p>
* @returns {Number}
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setRightTrackLeftCap
* <p>Sets the value of the {@link Titanium.UI.Slider#property-rightTrackLeftCap} property.</p>
* @param {Number} rightTrackLeftCap
<p>New value for the property.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getRightTrackTopCap
* <p>Gets the value of the {@link Titanium.UI.Slider#property-rightTrackTopCap} property.</p>
* @returns {Number}
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setRightTrackTopCap
* <p>Sets the value of the {@link Titanium.UI.Slider#property-rightTrackTopCap} property.</p>
* @param {Number} rightTrackTopCap
<p>New value for the property.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getSelectedLeftTrackImage
* <p>Gets the value of the {@link Titanium.UI.Slider#property-selectedLeftTrackImage} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setSelectedLeftTrackImage
* <p>Sets the value of the {@link Titanium.UI.Slider#property-selectedLeftTrackImage} property.</p>
* @param {String} selectedLeftTrackImage
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getSelectedRightTrackImage
* <p>Gets the value of the {@link Titanium.UI.Slider#property-selectedRightTrackImage} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setSelectedRightTrackImage
* <p>Sets the value of the {@link Titanium.UI.Slider#property-selectedRightTrackImage} property.</p>
* @param {String} selectedRightTrackImage
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getSelectedThumbImage
* <p>Gets the value of the {@link Titanium.UI.Slider#property-selectedThumbImage} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setSelectedThumbImage
* <p>Sets the value of the {@link Titanium.UI.Slider#property-selectedThumbImage} property.</p>
* @param {String} selectedThumbImage
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getThumbImage
* <p>Gets the value of the {@link Titanium.UI.Slider#property-thumbImage} property.</p>
* @returns {String/Titanium.Blob}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setThumbImage
* <p>Sets the value of the {@link Titanium.UI.Slider#property-thumbImage} property.</p>
* @param {String/Titanium.Blob} thumbImage
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getMax
* <p>Gets the value of the {@link Titanium.UI.Slider#property-max} property.</p>
* @returns {Number}
*/
/**
* @method setMax
* <p>Sets the value of the {@link Titanium.UI.Slider#property-max} property.</p>
* @param {Number} max
<p>New value for the property.</p>
*/
/**
* @method getMin
* <p>Gets the value of the {@link Titanium.UI.Slider#property-min} property.</p>
* @returns {Number}
*/
/**
* @method setMin
* <p>Sets the value of the {@link Titanium.UI.Slider#property-min} property.</p>
* @param {Number} min
<p>New value for the property.</p>
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.UI.Slider#property-value} property.</p>
* @returns {String}
*/
/**
* @property height
* @hide
* @type Number/String
* <p>View height, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values:</p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li><p>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</p>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p></li>
</ul>
<p>This is an input property for specifying the view's height dimension. To determine the
view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property disabledLeftTrackImage
* @type String
* <p>Image URL of the slider left track when in the disabled state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property disabledRightTrackImage
* @type String
* <p>Image URL of the slider right track when in the disabled state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property disabledThumbImage
* @type String
* <p>Image URL of the slider thumb when in the disabled state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [enabled=Slider is enabled by default (property value may be `undefined`).]
* @type Boolean
* <p>Boolean to indicate the enabled state of the slider.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property highlightedLeftTrackImage
* @type String
* <p>Image URL of the slider left track when in the highlighted state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property highlightedRightTrackImage
* @type String
* <p>Image URL of the slider right track when in the highlighted state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property highlightedThumbImage
* @type String
* <p>Image URL of the slider thumb when in the highlighted state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property leftTrackImage
* @type String
* <p>Image URL of the slider left track.</p>
* @description <p>See introduction of the {@link Titanium.UI.Slider} component for implementation specific information on Android Platform.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [leftTrackLeftCap=1]
* @type Number
* <p>Size of the left end cap for the leftTrackImage, disabledLeftTrackImage, highlightedLeftTrackImage and selectedLeftTrackImage properties.</p>
* @description <p>This property must be set before the track images are loaded. When specified at creation
this property is loaded before loading any of the track images</p>
<p>End caps specify the portion of an image that should not be resized when an image is
stretched. This technique is used to implement buttons and other resizable image-based
interface elements. When an image with end caps is resized, the resizing occurs only in
the middle of the image, in the region between the end caps. The end caps themselves keep
their original size and appearance. This property specifies the size of the left end cap. </p>
<p>On iOS 6 and above the endCaps are used to compute a rectangle which is streched in
the strechable portion. On iOS 5.X, the computed rectangle is tiled in the strechable portion.
On earlier versions of iOS the strechable portion is assumed to be
1 pixel wide. The right end cap is therefore computed by adding the size of the left end cap
and the middle portion together and then subtracting that value from the width of the image</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [leftTrackTopCap=1]
* @type Number
* <p>Size of the top end cap for the leftTrackImage, disabledLeftTrackImage, highlightedLeftTrackImage and selectedLeftTrackImage properties.</p>
* @description <p>This property must be set before the track images are loaded. When specified at creation
this property is loaded before loading any of the track images</p>
<p>End caps specify the portion of an image that should not be resized when an image is
stretched. This technique is used to implement buttons and other resizable image-based
interface elements. When an image with end caps is resized, the resizing occurs only in
the middle of the image, in the region between the end caps. The end caps themselves keep
their original size and appearance. This property specifies the size of the top end cap. </p>
<p>On iOS 6 and above the endCaps are used to compute a rectangle which is streched in
the strechable portion. On iOS 5.X, the computed rectangle is tiled in the strechable portion.
On earlier versions of iOS the strechable portion is assumed to be
1 pixel wide. The bottom end cap is therefore computed by adding the size of the top end cap
and the middle portion together and then subtracting that value from the height of the image</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property maxRange
* @type Number
* <p>Upper limit on the slider value that can be selected.</p>
* @description <p>If <code>maxRange</code> is specified, value of the slider can't be increased above <code>maxRange</code>.</p>
<p>The total displayed range of the slider is still from <code>min</code> to <code>max</code>.</p>
<p>If <code>undefined</code>, the slider can go all the way to <code>max</code>.</p>
<p>On Android this must be an integer value.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @property minRange
* @type Number
* <p>Lower limit on the slider value that can be selected.</p>
* @description <p>If <code>minRange</code> is specified, value of the slider can't be decreased below <code>minRange</code>.</p>
<p>The total displayed range of the slider is still from <code>min</code> to <code>max</code>.</p>
<p>If <code>undefined</code>, the slider can go all the way to <code>min</code>.</p>
<p>On Android this must be an integer value.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @property rightTrackImage
* @type String
* <p>Image URL of the slider right track.</p>
* @description <p>See introduction of the {@link Titanium.UI.Slider} component for implementation specific information on Android Platform.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [rightTrackLeftCap=1]
* @type Number
* <p>Size of the left end cap for the rightTrackImage, disabledRightTrackImage, highlightedRightTrackImage and selectedRightTrackImage properties.</p>
* @description <p>This property must be set before the track images are loaded. When specified at creation
this property is loaded before loading any of the track images</p>
<p>End caps specify the portion of an image that should not be resized when an image is
stretched. This technique is used to implement buttons and other resizable image-based
interface elements. When an image with end caps is resized, the resizing occurs only in
the middle of the image, in the region between the end caps. The end caps themselves keep
their original size and appearance. This property specifies the size of the left end cap. </p>
<p>On iOS 6 and above the endCaps are used to compute a rectangle which is streched in
the strechable portion. On iOS 5.X, the computed rectangle is tiled in the strechable portion.
On earlier versions of iOS the strechable portion is assumed to be
1 pixel wide. The right end cap is therefore computed by adding the size of the left end cap
and the middle portion together and then subtracting that value from the width of the image</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [rightTrackTopCap=1]
* @type Number
* <p>Size of the top end cap for the rightTrackImage, disabledRightTrackImage, highlightedRightTrackImage and selectedRightTrackImage properties.</p>
* @description <p>This property must be set before the track images are loaded. When specified at creation
this property is loaded before loading any of the track images</p>
<p>End caps specify the portion of an image that should not be resized when an image is
stretched. This technique is used to implement buttons and other resizable image-based
interface elements. When an image with end caps is resized, the resizing occurs only in
the middle of the image, in the region between the end caps. The end caps themselves keep
their original size and appearance. This property specifies the size of the top end cap. </p>
<p>On iOS 6 and above the endCaps are used to compute a rectangle which is streched in
the strechable portion. On iOS 5.X, the computed rectangle is tiled in the strechable portion.
On earlier versions of iOS the strechable portion is assumed to be
1 pixel wide. The bottom end cap is therefore computed by adding the size of the top end cap
and the middle portion together and then subtracting that value from the height of the image</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property selectedLeftTrackImage
* @type String
* <p>Image URL of the slider left track when in the selected state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property selectedRightTrackImage
* @type String
* <p>Image URL of the slider right track when in the selected state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property selectedThumbImage
* @type String
* <p>Image URL of the slider thumb when in the selected state.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property thumbImage
* @type String/Titanium.Blob
* <p>Image for the slider thumb.</p>
* @description <p>The thumb image can be specified as a URL.</p>
<p>Support for using {@link Titanium.Blob} for this property is only available on iOS.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [max=1. (property value might be undefined)]
* @type Number
* <p>Maximum value of the slider.</p>
* @description <p>Specifies the value of the slider when the thumb is all the way to the right. This
value is inclusive.</p>
<p>On Android and Mobile Web, the selectable values can be limited using the
{@link Titanium.UI.Slider#property-minRange minRange} and {@link Titanium.UI.Slider#property-maxRange maxRange}
properties.</p>
<p>On Android this must be an integer value.</p>
*/
/**
* @property [min=0. (property value might be undefined)]
* @type Number
* <p>Minimum value of the slider.</p>
* @description <p>Specifies the value of the slider when the thumb is all the way to the left. This
value is inclusive.</p>
<p>On Android, the selectable values can be limited using the
{@link Titanium.UI.Slider#property-minRange minRange} and {@link Titanium.UI.Slider#property-maxRange maxRange}
properties.</p>
<p>On Android this must be an integer value.</p>
*/
/**
* @property value
* @type String
* <p>Current value of the slider.</p>
*/
/**
* @class Titanium.UI.Switch
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Switch.yml
* <p>An on/off switch control.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/switch/switch_android.png" height="75" /></td>
<td><img src="images/switch/switch_ios.png" height="75" /></td>
<td><img src="images/switch/switch_mobileweb.png" height="75" /></td>
<td><img src="images/switch/switch_wp.png" height="75" /></td>
</tr>
<tr><th>Android</th><th>iOS</th><th>Mobile Web</th><th>Windows Phone</th></tr>
</table>
<p>The appearance of a <code>Switch</code> control varies by platform: </p>
<ul>
<li><p>On Android, a Switch object can be styled either as a switch, checkbox or
toggle button based on the {@link Titanium.UI.Switch#property-style} property. The checkbox style can
optionally display a label next to the control.</p></li>
<li><p>On iOS, a Switch appears as an iOS on/off switch and doesn't have any text associated with it. </p></li>
<li><p>On Mobile Web, a switch always has text associated with it, and appears as a toggle button,
similar to Android.</p></li>
</ul>
<p>Use the {@link Titanium.UI#method-createSwitch} method or <strong><code><Switch></code></strong> Alloy element to create a switch.</p>
* <h3>Examples</h3>
<h4>Simple Switch Example</h4>
<p>Create a standard switch, using default values, and output value property on each <code>change</code>
event.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var basicSwitch = Ti.UI.createSwitch({
value:true // mandatory property for iOS
});
win.add(basicSwitch);
basicSwitch.addEventListener('change',function(e){
Ti.API.info('Switch value: ' + basicSwitch.value);
});
win.open();
// print initial value
Ti.API.info('Switch value: ' + basicSwitch.value);
</code></pre><h4>Toggle Button Switch Example (Android)</h4>
<p>Create a standard (toggle button) switch with a customized title for each on/off state, and
output value property on each <code>change</code> event.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var basicSwitch = Ti.UI.createSwitch({
style: Ti.UI.Android.SWITCH_STYLE_TOGGLEBUTTON,
titleOn:'Notifications Enabled',
titleOff:'Notifications Disabled',
value:true,
width: 200, height:120
});
win.add(basicSwitch);
basicSwitch.addEventListener('change',function(e){
Ti.API.info('Switch value: ' + basicSwitch.value);
});
win.open();
</code></pre><h4>Checkbox Switch Example (Android)</h4>
<p>Create a checkbox switch, and output value property on each <code>change</code> event.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var basicSwitch = Ti.UI.createSwitch({
style: Ti.UI.Android.SWITCH_STYLE_CHECKBOX,
textAlign:Ti.UI.TEXT_ALIGNMENT_CENTER,
title:'Notifications',
value:true,
width: 300 // necessary for textAlign to be effective
});
win.add(basicSwitch);
basicSwitch.addEventListener('change',function(e){
Ti.API.info('Switch value: ' + basicSwitch.value);
});
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous simple switch example as an Alloy view.</p>
<p>switchexample.xml:</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white">
<Switch id="basicSwitch" value="true" onChange="outputState"/>
</Window>
</Alloy>
</code></pre>
<p>switchexample.js:</p>
<pre><code>function outputState(){
Ti.API.info('Switch value: ' + $.basicSwitch.value);
}
</code></pre>
*/
/**
* @event click
* <p>Fired when the device detects a click against the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>The click event can also be generated by a trackball click.</p>
<p>If you want to receive and trigger the value of switch, please use the <code>change</code>
event instead.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event change
* <p>Fired when the switch value changes.</p>
* @param {Boolean} value
<p>New value of the switch.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method remove
* <p>Removes a child view from this view's hierarchy.</p>
* @description <p>See also: {@link Titanium.UI.Switch#method-add add}, {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform mobileweb 1.8
*/
/**
* @method add
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>Adding children to a <code>Switch</code> is not supported on all platforms.</p>
<p>If you need to display something on top of this object, consider using
another view as a container for both this object and views you want
to appear on top of it.</p>
<p>See also: {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform mobileweb 1.8
*/
/**
* @method getTintColor
* <p>Gets the value of the {@link Titanium.UI.Switch#property-tintColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setTintColor
* <p>Sets the value of the {@link Titanium.UI.Switch#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getAnimated
* <p>Gets the value of the {@link Titanium.UI.Switch#property-animated} property.</p>
* @returns {Boolean}
* @platform iphone 5.1.1
* @platform ipad 5.1.1
*/
/**
* @method setAnimated
* <p>Sets the value of the {@link Titanium.UI.Switch#property-animated} property.</p>
* @param {Boolean} animated
<p>New value for the property.</p>
* @platform iphone 5.1.1
* @platform ipad 5.1.1
*/
/**
* @method getFont
* <p>Gets the value of the {@link Titanium.UI.Switch#property-font} property.</p>
* @returns {Font}
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method setFont
* <p>Sets the value of the {@link Titanium.UI.Switch#property-font} property.</p>
* @param {Font} font
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.UI.Switch#property-style} property.</p>
* @returns {Number}
* @platform android 0.8
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.UI.Switch#property-style} property.</p>
* @param {Number} style
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getTextAlign
* <p>Gets the value of the {@link Titanium.UI.Switch#property-textAlign} property.</p>
* @returns {String/Number}
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method setTextAlign
* <p>Sets the value of the {@link Titanium.UI.Switch#property-textAlign} property.</p>
* @param {String/Number} textAlign
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.Switch#property-title} property.</p>
* @returns {String}
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.Switch#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method getOnTintColor
* <p>Gets the value of the {@link Titanium.UI.Switch#property-onTintColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setOnTintColor
* <p>Sets the value of the {@link Titanium.UI.Switch#property-onTintColor} property.</p>
* @param {String} onTintColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getThumbTintColor
* <p>Gets the value of the {@link Titanium.UI.Switch#property-thumbTintColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setThumbTintColor
* <p>Sets the value of the {@link Titanium.UI.Switch#property-thumbTintColor} property.</p>
* @param {String} thumbTintColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getVerticalAlign
* <p>Gets the value of the {@link Titanium.UI.Switch#property-verticalAlign} property.</p>
* @returns {Number/String}
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method setVerticalAlign
* <p>Sets the value of the {@link Titanium.UI.Switch#property-verticalAlign} property.</p>
* @param {Number/String} verticalAlign
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @method getColor
* <p>Gets the value of the {@link Titanium.UI.Switch#property-color} property.</p>
* @returns {String}
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setColor
* <p>Sets the value of the {@link Titanium.UI.Switch#property-color} property.</p>
* @param {String} color
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getEnabled
* <p>Gets the value of the {@link Titanium.UI.Switch#property-enabled} property.</p>
* @returns {Boolean}
*/
/**
* @method setEnabled
* <p>Sets the value of the {@link Titanium.UI.Switch#property-enabled} property.</p>
* @param {Boolean} enabled
<p>New value for the property.</p>
*/
/**
* @method getTitleOff
* <p>Gets the value of the {@link Titanium.UI.Switch#property-titleOff} property.</p>
* @returns {String}
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTitleOff
* <p>Sets the value of the {@link Titanium.UI.Switch#property-titleOff} property.</p>
* @param {String} titleOff
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTitleOn
* <p>Gets the value of the {@link Titanium.UI.Switch#property-titleOn} property.</p>
* @returns {String}
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTitleOn
* <p>Sets the value of the {@link Titanium.UI.Switch#property-titleOn} property.</p>
* @param {String} titleOn
<p>New value for the property.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.UI.Switch#property-value} property.</p>
* @returns {Boolean}
*/
/**
* @method setValue
* <p>Sets the value of the {@link Titanium.UI.Switch#property-value} property.</p>
* @param {Boolean} value
<p>New value for the property.</p>
*/
/**
* @property [tintColor=Undefined.]
* @type String
* <p>The color used to tint the outline of the switch when it is turned off.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is supported on iOS 6 and above unlike the {@link Titanium.UI.View#property-tintColor tintColor} property defined on {@link Titanium.UI.View}.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [animated=undefined (equivalent to true)]
* @type Boolean
* <p>Determines if there is animation when the switch value changes.</p>
* @description <p>Set to <code>true</code> if animation is desired or <code>false</code> for no animation.</p>
* @platform iphone 5.1.1
* @platform ipad 5.1.1
*/
/**
* @property font
* @type Font
* <p>Font to use for the switch text.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @property [style=Titanium.UI.Android.SWITCH_STYLE_SWITCH; prior to Release 4.0, Titanium.UI.Android.SWITCH_STYLE_TOGGLEBUTTON
]
* @type Number
* <p>Style of the switch.</p>
* @description <p>Prior to Release 4.0, you can only specify either a toggle button or checkbox.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-SWITCH_STYLE_CHECKBOX}
<li> {@link Titanium.UI.Android#property-SWITCH_STYLE_TOGGLEBUTTON}
<li> {@link Titanium.UI.Android#property-SWITCH_STYLE_SWITCH}
</ul></p>
* @platform android 0.8
*/
/**
* @property [textAlign={@link Titanium.UI#property-TEXT_ALIGNMENT_CENTER} (toggle button, Android),
{@link Titanium.UI#property-TEXT_ALIGNMENT_LEFT} (checkbox, Android),
{@link Titanium.UI#property-TEXT_ALIGNMENT_CENTER} (Mobile Web)
]
* @type String/Number
* <p>Horizontal text alignment of the switch title.</p>
* @description <p>On Android, when the switch {@link Titanium.UI.Switch#property-style style} property is set to
{@link Titanium.UI.Android#property-SWITCH_STYLE_CHECKBOX}, this property is only effective if the
{@link Titanium.UI.Switch#property-width width} property is set to a value greater than the width of the
{@link Titanium.UI.Switch#property-title title} contents. </p>
<p>On Mobile Web this property is always supported, as the <code>style</code> property is not supported.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_CENTER}
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_LEFT}
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_RIGHT}
</ul></p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @property title
* @type String
* <p>Text to display next to the switch, when the checkbox style is in use.</p>
* @description <p>This property is only effective when the {@link Titanium.UI.Switch#property-style} property is set to
{@link Titanium.UI.Android#property-SWITCH_STYLE_CHECKBOX}. </p>
<p>Use the {@link Titanium.UI.Switch#property-textAlign textAlign} property to align this text within the
switch.</p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @property [onTintColor=Undefined.]
* @type String
* <p>The color used to tint the appearance of the switch when it is turned on.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [thumbTintColor=Undefined.]
* @type String
* <p>The color used to tint the appearance of the thumb.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [verticalAlign=Titanium.UI.TEXT_VERTICAL_ALIGNMENT_CENTER]
* @type Number/String
* <p>Vertical alignment for the text field.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_BOTTOM}
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_CENTER}
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_TOP}
</ul></p>
* @platform android 0.8
* @platform mobileweb 1.8
*/
/**
* @property [color=black]
* @type String
* <p>Color to use for switch text, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [enabled=undefined (equivalent to enabled)]
* @type Boolean
* <p>Determines whether the switch is enabled.</p>
* @description <p>Be careful not to confused this with the {@link Titanium.UI.Switch#property-value value} property, which
is used to turn the switch on and off. </p>
<p>Set to <code>true</code> to enable or <code>false</code> to disable the switch.</p>
*/
/**
* @property [titleOff=Off]
* @type String
* <p>Text to display on the switch in its "off" state, when the toggle button style is in use.</p>
* @description <p>Set to an empty string to remove title text. </p>
<p>It is typically useful to set the <code>width</code> and/or <code>height</code> properties, to prevent the switch
changing size between its on/off state.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [titleOn=On]
* @type String
* <p>Text to display on the switch in its "on" state, when the toggle button style is in use.</p>
* @description <p>Set to an empty string to remove title text. </p>
<p>It is typically useful to set the <code>width</code> and/or <code>height</code> properties, to prevent the switch
changing size between its on/off state.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [value=undefined (visual state off, Android), false (Mobile Web)]
* @type Boolean
* <p>Indicates whether the switch has been turned on or off by the user. May also be set
programmatically.</p>
* @description <p>Set to <code>true</code> to turn on and <code>false</code> to turn off the switch. </p>
<p>On Android, if this property is not defined, the rendered state of the switch is off. </p>
<p>On iOS, be aware that this property must be set when the switch is rendered, otherwise it
will not be visible. This is a known issue. </p>
*/
/**
* @class Titanium.UI.Tab
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Tab.yml
* <p>A tab instance for a {@link Titanium.UI.TabGroup TabGroup}.</p>
* @description <p>A <code>TabGroup</code> tab instance. Each tab includes a button and one or more windows, which
holds the "contents" of the tab. Users can select a tab by clicking on the tab button.</p>
<p>Use the {@link Titanium.UI#method-createTab} method or <strong><code><Tab></code></strong> Alloy element to create a tab.</p>
<p>Use {@link Titanium.UI.TabGroup#method-setActiveTab TabGroup.setActiveTab} to switch between tabs
in a tab group. The {@link Titanium.UI#property-currentTab} property provides a global reference to
the currently active tab. </p>
<p>The behavior of tabs and tab groups follows the platform's native navigation style,
which varies significantly between platforms.</p>
<h4>iOS and Mobile Web Platform Implementation Notes</h4>
<p>On iOS and Mobile Web, the tab maintains a stack of windows. On Mobile Web, the tab is
really just a {@link Titanium.UI.MobileWeb.NavigationGroup NavigationGroup}. Windows on top
of the stack can partially or totally obscure windows lower in the stack. Calling
{@link Titanium.UI.Tab#method-open open} opens a new window on top of the window stack. When a window
is closed, either by the user or by code, the window is removed from the stack, making
the previous window visible. The root tab window cannot be removed. </p>
<p>On iOS and Mobile Web the tab controls are generally kept on screen to allow a user to
navigate inside the app. Tab controls are hidden when the user is performing a modal
task (for example, composing a message). In this case, the app should provide a button
in the navigation bar to return to the previous screen. On iOS, the window should also
be opened as modal. On iOS, The tab controls can also be hidden by opening the new window
with {@link Titanium.UI.Window#property-tabBarHidden tabBarHidden} set to <code>true</code>.</p>
<p>When closing a tab window in iOS and Mobile Web, you should always use the
{@link Titanium.UI.Tab#method-close Tab.close} method to ensure that the tab group maintains its
navigation state.</p>
<h4>Android Platform Implementation Notes</h4>
<p>On Android, the tab does not maintain a stack of windows.
Calling {@link Titanium.UI.Tab#method-open open} opens a new, heavyweight window, which
by default covers the tab group entirely. This seems quite different from the iOS model,
but it is the standard model for Android applications. Users can use the <strong>Back</strong> button
to close the window and return to the tab group. </p>
<p>On Android, tab windows can be closed using either
{@link Titanium.UI.Tab#method-close Tab.close} or {@link Titanium.UI.Window#method-close Window.close}. Since
no window stack is maintained, only a single window opened using
{@link Titanium.UI.Tab#method-open Tab.open} can be closed using <code>Tab.close</code>.</p>
<p>As on iOS, the root tab window cannot be closed.</p>
* <h3>Examples</h3>
<h4>Simple Tab Example</h4>
<p>In this example, we create a simple tab and add it to a tab group.</p>
<pre><code>var mywin = Titanium.UI.createWindow({title: "Hello"});
var tab = Titanium.UI.createTab({
window:mywin,
title:'Hello',
icon:'myicon.png'
});
tabGroup.addTab(tab);
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example an an Alloy view.</p>
<pre><code><Alloy>
<TabGroup id="tabGroup">
<Tab id="tab" title="Hello" icon="myicon.png">
<Window id="mywin" title="Hello"/>
</Tab>
</TabGroup>
</Alloy>
</code></pre>
*/
/**
* @event longclick
* @hide
* <p>Fired when the device detects a long click.</p>
* @description <p>A long click is generated by touching and holding on the touchscreen or holding down the
trackball button. </p>
<p>The event occurs before the finger/button is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>As the trackball can fire this event, it is not intended to return the <code>x</code> and <code>y</code>
coordinates of the touch, even when it is generated by the touchscreen. </p>
<p>A <code>longclick</code> blocks a <code>click</code>, meaning that a <code>click</code> event will not fire when a
<code>longclick</code> listener exists.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event swipe
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchmove
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event touchstart
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event touchcancel
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event touchend
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event click
* <p>Fired when this tab is clicked in the tab group.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event dblclick
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event singletap
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event doubletap
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event longpress
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event focus
* <p>Fired when the tab gains focus.</p>
* @deprecated 5.2.0 Use <Titanium.UI.Tab.selected> instead.
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {Number} index
<p>Index of the current active tab.</p>
* @param {Number} previousIndex
<p>Index of the previous active tab.</p>
* @param {Titanium.UI.Tab} tab
<p>Current active tab object.</p>
* @param {Titanium.UI.Tab} previousTab
<p>Previous active tab object.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event postlayout
* <p>Fired when a layout cycle is finished.</p>
* @description <p>This event is fired when the view and its ancestors have been laid out.
The {@link Titanium.UI.View#property-rect rect} and {@link Titanium.UI.View#property-size size} values
should be usable when this event is fired.</p>
<p>This event is typically triggered by either changing layout
properties or by changing the orientation of the device. Note that changing the
layout of child views or ancestors can also trigger a relayout of this view.
On Mobile Web, this event can also be triggered by resizing the browser window.</p>
<p>Note that altering any properties that affect layout from the <code>postlayout</code> callback
may result in an endless loop.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 2.0.0
*/
/**
* @event keypressed
* @hide
* <p>Fired when a hardware key is pressed in the view.</p>
* @description <p>A keypressed event is generated by pressing a hardware key. On Android, this event can only be
fired when the property {@link Titanium.UI.View#property-focusable focusable} is set to true. On iOS the
event is generated only when using {@link Titanium.UI.TextArea Ti.UI.TextArea}, {@link Titanium.UI.TextField Ti.UI.TextField}
and {@link Titanium.UI.SearchBar Ti.UI.SearchBar}.</p>
* @param {Number} keyCode
<p>The code for the physical key that was pressed. For more details, see <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a>. This API is experimental and subject to change.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @event blur
* <p>Fired when the tab loses focus.</p>
* @deprecated 5.2.0 Use <Titanium.UI.Tab.unselected> instead.
* @param {Number} index
<p>Index of the current active tab.</p>
* @param {Number} previousIndex
<p>Index of the previous active tab.</p>
* @param {Titanium.UI.Tab} tab
<p>Current active tab object.</p>
* @param {Titanium.UI.Tab} previousTab
<p>Previous active tab object.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event unselected
* <p>Fired when the tab is no longer selected.</p>
* @param {Number} index
<p>Index of the current active tab.</p>
* @param {Number} previousIndex
<p>Index of the previous active tab.</p>
* @param {Titanium.UI.Tab} tab
<p>Current active tab object.</p>
* @param {Titanium.UI.Tab} previousTab
<p>Previous active tab object.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.5.1
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform mobileweb 1.8
*/
/**
* @event selected
* <p>Fired when the tab is selected.</p>
* @param {Number} index
<p>Index of the current active tab.</p>
* @param {Number} previousIndex
<p>Index of the previous active tab.</p>
* @param {Titanium.UI.Tab} tab
<p>Current active tab object.</p>
* @param {Titanium.UI.Tab} previousTab
<p>Previous active tab object.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.5.1
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform mobileweb 1.8
*/
/**
* @event selected
* <p>Fired when the tab is selected.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.6.0
*/
/**
* @event unselected
* <p>Fired when the tab is unselected.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.6.0
*/
/**
* @method animate
* @hide
* <p>Animates this view.</p>
* @description <p>The {@link Titanium.UI.Animation Animation} object or dictionary passed to this method defines
the end state for the animation, the duration of the animation, and other properties.</p>
<p>Note that if you use <code>animate</code> to move a view, the view's actual <em>position</em> is changed, but
its layout properties, such as <code>top</code>, <code>left</code>, <code>center</code> and so on are not changed--these
reflect the original values set by the user, not the actual position of the view.</p>
<p>The {@link Titanium.UI.View#property-rect rect} property can be used to determine the actual size and
position of the view. Note that on Mobile Web, the <code>rect</code> property is not updated after
animation. This is a known issue <a href="https://jira.appcelerator.org/browse/TIMOB-8930">TIMOB-8930</a>.</p>
* @param {Titanium.UI.Animation/Dictionary<Titanium.UI.Animation>} animation
<p>Either a dictionary of animation properties or an
{@link Titanium.UI.Animation Animation} object.</p>
* @param {Callback<Object>} callback
<p>Function to be invoked upon completion of the animation.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method remove
* @hide
* <p>Removes a child view from this view's hierarchy.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method add
* @hide
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>The child view is added as the last child in this view's hierarchy. </p>
<p>Although all views inherit from {@link Titanium.UI.View}, not all views are capable of
containing other views. In particular:</p>
<ul>
<li>Some views are not designed to be containers at all.</li>
<li>Some views are special-purpose containers that can only contain certain other
views.</li>
<li>Some views are top-level containers that cannot (or should not) be added to other views.</li>
</ul>
<h4>Non-Container Views</h4>
<p>The following views are not intended to act as containers that can hold other
views:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator ActivityIndicator}</li>
<li>{@link Titanium.UI.Button Button}</li>
<li>{@link Titanium.UI.ImageView ImageView}</li>
<li>{@link Titanium.UI.Label Label}</li>
<li>{@link Titanium.UI.ProgressBar ProgressBar}</li>
<li>{@link Titanium.UI.SearchBar SearchBar}</li>
<li>{@link Titanium.UI.Slider Slider}</li>
<li>{@link Titanium.UI.Switch Switch}</li>
<li>{@link Titanium.UI.TableView TableView}</li>
<li>{@link Titanium.UI.TextArea TextArea}</li>
<li>{@link Titanium.UI.TextField TextField}</li>
<li>{@link Titanium.UI.WebView WebView}</li>
</ul>
<p>Adding children to the these views <em>may</em> be supported on some platforms,
but is not guaranteed to work across platforms. Where it is supported, it may not
work as expected.</p>
<p>For maximum portability, these views should be treated as if they do not support children. <br>
Instead of adding children to these views, applications can positon other views as
siblings. For example, instead of adding a button as a child of a <code>WebView</code>, you can add
the button to the web view's parent such that it appears on top of the web view. </p>
<h4>Special-Purpose Containers</h4>
<p>A few view objects act as special-purpose containers--that is, they only manage
certain types of children, and many of them support a special means of adding
these children, instead of the general <code>add</code> method. These containers include:</p>
<ul>
<li><p>{@link Titanium.UI.ButtonBar ButtonBar} and {@link Titanium.UI.iOS.TabbedBar TabbedBar} are designed
to hold their own internally-created buttons, assigned by adding strings to the "labels" array.
Views added using the <code>add</code> method are displayed on top of these buttons.</p></li>
<li><p>{@link Titanium.UI.Picker Picker}. Can only hold <code>PickerRows</code> and <code>PickerColumns</code>, which
are added using the <code>add</code> method. Adding other types of views to a <code>Picker</code> is not
supported.</p></li>
<li><p>{@link Titanium.UI.TableView TableView} is a specialized container for
<code>TableViewSection</code> and <code>TableViewRow</code> objects. These objects must be
added using the properties and methods that <code>TableView</code> provides
for adding and removing sectons and rows.</p>
<p>On some platforms, it is possible to add arbitrary child views to a table view
using the <code>add</code> method. However, this is not guaranteed to work on all platforms,
and in general, should be avoided.</p></li>
<li><p>{@link Titanium.UI.TableViewSection TableViewSection} is a specialized container
for <code>TableViewRow</code> objects, which <em>are</em> added using the <code>add</code> method. The <code>add</code> method
on <code>TableViewSection</code> can only be used to add <code>TableViewRow</code> objects.</p></li>
<li><p>{@link Titanium.UI.iOS.Toolbar Toolbar} is designed to hold buttons and certain
other controls, added to its <code>items</code> array. Views added using the <code>add</code> method are
displayed on top of the controls in the <code>items</code> array.</p></li>
<li><p>The <code>Tab</code>, <code>TabGroup</code>, <code>NavigationGroup</code>, <code>NavigationWindow</code> and <code>SplitWindow</code> objects are
special containers that manage windows. These are discussed in the
"Top-Level Containers" section.</p></li>
</ul>
<h4>Top-Level Containers</h4>
<p>There are certain top-level containers that are not intended to be added
as the children of other views. These top-level containers include
{@link Titanium.UI.Window}, {@link Titanium.UI.iPad.SplitWindow}, {@link Titanium.UI.iOS.NavigationWindow},
and {@link Titanium.UI.TabGroup}. Other types of views must be added
to a top-level container in order to be displayed on screen.</p>
<p>The special containers {@link Titanium.UI.MobileWeb.NavigationGroup},
{@link Titanium.UI.iOS.NavigationWindow}, {@link Titanium.UI.iPad.SplitWindow},
{@link Titanium.UI.Tab}, and {@link Titanium.UI.TabGroup} manage windows.
These managed windows may be referred to as <em>children</em> of the
container, but they are not added using the <code>add</code> method.</p>
<p>Note that although a <code>NavigationGroup</code> manages windows, it is not itself a
top-level container. It must be added to a <code>Window</code> in order to be displayed.</p>
<p><code>Tab</code> is another kind of special container: it is not itself a top-level container,
but can only be used within a <code>TabGroup</code>. You cannot <code>add</code> a <code>Tab</code> to an arbitrary
container.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method hide
* @hide
* <p>Hides this view.</p>
* @param {AnimationOption} options (optional)
<p>Animation options for Android. <strong>Since Release 5.1.0.</strong></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method show
* @hide
* <p>Makes this view visible.</p>
* @param {AnimationOption} options (optional)
<p>Animation options for Android. <strong>Since Release 5.1.0.</strong></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method open
* <p>Opens a new window.</p>
* @description <p>On iOS and Mobile Web, the new window is opened as the top window in the tab's window stack. On Android, the new window is opened as a new, heavyweight window, obscuring the tab group.</p>
* @param {Titanium.UI.Window} window
<p>Window to open.</p>
* @param {Object} options
<p>Dictionary of display and animation settings to use when opening the window.
Identical to the <code>options</code> parameter to {@link Titanium.UI.Window#method-open Window.open}.
iOS only supports the <strong>animated</strong> parameter.</p>
*/
/**
* @method close
* <p>Closes the top-level window for this tab.</p>
* @description <p>On iOS, this method should be used when closing a window opened from a tab, to
correctly maintain the iOS tab group's navigation state. Note that the window to
be closed <strong>must</strong> be passed in as a parameter:</p>
<pre><code>myTab.close(tabWin);
</code></pre>
<p>On Android, this method does <strong>not</strong> take a <code>window</code> parameter.</p>
<pre><code>myTab.close();
</code></pre>
<p>On Mobile Web, calling <code>Tab.close</code> is identical to calling <code>close</code> on
the tab's current topmost window.</p>
<p>On Android, if a window has been opened in front of the tab using <code>Tab.open</code>,
a subsequent call to <code>Tab.close</code> is equivalent to calling <code>close</code> on that window.
No window stack is maintained, so only the most-recently opened window on a given
tab can be closed in this way.</p>
<p>All platforms accept an optional <code>options</code> parameter. The only supported property
for this dictionary is the <code>animated</code> flag, which specifies whether the window
close should be animated. <code>animated</code> is true by default.</p>
* @param {Titanium.UI.Window} window
<p>Window to close. This parameter <strong>must</strong> be omitted on Android.</p>
* @param {Object} options (optional)
<p>Dictionary of display and animation settings to use when closing the window.
Identical to the <code>options</code> parameter to {@link Titanium.UI.Window#method-close Window.close}.
iOS only supports the <strong>animated</strong> parameter.</p>
*/
/**
* @method setWindow
* <p>Sets the root window that appears in the tab.</p>
* @description <p>You can only use this method to set the tab's root window before the TabGroup containing this tab
is openened, that is, once the TabGroup is displayed, you cannot change the root window
that appears in the tab.</p>
* @param {Titanium.UI.Window} window
<p>Root window of the tab.</p>
*/
/**
* @method getAccessibilityHidden
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-accessibilityHidden} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHidden
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-accessibilityHidden} property.</p>
* @param {Boolean} accessibilityHidden
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityHint
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-accessibilityHint} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHint
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-accessibilityHint} property.</p>
* @param {String} accessibilityHint
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityLabel
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-accessibilityLabel} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityLabel
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-accessibilityLabel} property.</p>
* @param {String} accessibilityLabel
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityValue
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-accessibilityValue} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityValue
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-accessibilityValue} property.</p>
* @param {String} accessibilityValue
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAnchorPoint
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-anchorPoint} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setAnchorPoint
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-anchorPoint} property.</p>
* @param {Point} anchorPoint
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getAnimatedCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-animatedCenter} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundRepeat
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-backgroundRepeat} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundRepeat
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-backgroundRepeat} property.</p>
* @param {Boolean} backgroundRepeat
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundLeftCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-backgroundLeftCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundLeftCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-backgroundLeftCap} property.</p>
* @param {Number} backgroundLeftCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundTopCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-backgroundTopCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundTopCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-backgroundTopCap} property.</p>
* @param {Number} backgroundTopCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBorderColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-borderColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setBorderColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-borderColor} property.</p>
* @param {String} borderColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getFocusable
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-focusable} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setFocusable
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-focusable} property.</p>
* @param {Boolean} focusable
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getSoftKeyboardOnFocus
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-softKeyboardOnFocus} property.</p>
* @returns {Number}
* @platform android 0.9
*/
/**
* @method setSoftKeyboardOnFocus
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-softKeyboardOnFocus} property.</p>
* @param {Number} softKeyboardOnFocus
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getTransform
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-transform} property.</p>
* @returns {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setTransform
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-transform} property.</p>
* @param {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix} transform
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getHorizontalWrap
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-horizontalWrap} property.</p>
* @returns {Boolean}
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method setHorizontalWrap
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-horizontalWrap} property.</p>
* @param {Boolean} horizontalWrap
<p>New value for the property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method getKeepScreenOn
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-keepScreenOn} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setKeepScreenOn
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-keepScreenOn} property.</p>
* @param {Boolean} keepScreenOn
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getBackgroundDisabledColor
* <p>Gets the value of the {@link Titanium.UI.Tab#property-backgroundDisabledColor} property.</p>
* @returns {String}
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledColor
* <p>Sets the value of the {@link Titanium.UI.Tab#property-backgroundDisabledColor} property.</p>
* @param {String} backgroundDisabledColor
<p>New value for the property.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundDisabledImage
* <p>Gets the value of the {@link Titanium.UI.Tab#property-backgroundDisabledImage} property.</p>
* @returns {String}
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledImage
* <p>Sets the value of the {@link Titanium.UI.Tab#property-backgroundDisabledImage} property.</p>
* @param {String} backgroundDisabledImage
<p>New value for the property.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedColor
* <p>Gets the value of the {@link Titanium.UI.Tab#property-backgroundFocusedColor} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedColor
* <p>Sets the value of the {@link Titanium.UI.Tab#property-backgroundFocusedColor} property.</p>
* @param {String} backgroundFocusedColor
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedImage
* <p>Gets the value of the {@link Titanium.UI.Tab#property-backgroundFocusedImage} property.</p>
* @returns {String}
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedImage
* <p>Sets the value of the {@link Titanium.UI.Tab#property-backgroundFocusedImage} property.</p>
* @param {String} backgroundFocusedImage
<p>New value for the property.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundGradient
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-backgroundGradient} property.</p>
* @returns {Gradient}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundGradient
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-backgroundGradient} property.</p>
* @param {Gradient} backgroundGradient
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundImage
* <p>Gets the value of the {@link Titanium.UI.Tab#property-backgroundImage} property.</p>
* @returns {String}
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundImage
* <p>Sets the value of the {@link Titanium.UI.Tab#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedImage
* <p>Gets the value of the {@link Titanium.UI.Tab#property-backgroundSelectedImage} property.</p>
* @returns {String}
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedImage
* <p>Sets the value of the {@link Titanium.UI.Tab#property-backgroundSelectedImage} property.</p>
* @param {String} backgroundSelectedImage
<p>New value for the property.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBorderRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-borderRadius} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBorderRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-borderRadius} property.</p>
* @param {Number} borderRadius
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBorderWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-borderWidth} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBorderWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-borderWidth} property.</p>
* @param {Number} borderWidth
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getOpacity
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-opacity} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setOpacity
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-opacity} property.</p>
* @param {Number} opacity
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getRect
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-rect} property.</p>
* @returns {Dimension}
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getSize
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-size} property.</p>
* @returns {Dimension}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTouchEnabled
* <p>Gets the value of the {@link Titanium.UI.Tab#property-touchEnabled} property.</p>
* @returns {Boolean}
* @platform mobileweb 1.8
*/
/**
* @method setTouchEnabled
* <p>Sets the value of the {@link Titanium.UI.Tab#property-touchEnabled} property.</p>
* @param {Boolean} touchEnabled
<p>New value for the property.</p>
* @platform mobileweb 1.8
*/
/**
* @method getVisible
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-visible} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setVisible
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-visible} property.</p>
* @param {Boolean} visible
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getZIndex
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-zIndex} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setZIndex
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getChildren
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-children} property.</p>
* @returns {Titanium.UI.View[]}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.Tab#property-backgroundColor} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.Tab#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTop
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-top} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setTop
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-top} property.</p>
* @param {Number/String} top
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getLeft
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-left} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setLeft
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-left} property.</p>
* @param {Number/String} left
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBottom
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-bottom} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBottom
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-bottom} property.</p>
* @param {Number/String} bottom
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-center} property.</p>
* @returns {Point}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setCenter
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-center} property.</p>
* @param {Point} center
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getRight
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-right} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setRight
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-right} property.</p>
* @param {Number/String} right
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-width} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-width} property.</p>
* @param {Number/String} width
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getHeight
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-height} property.</p>
* @returns {Number/String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setHeight
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-height} property.</p>
* @param {Number/String} height
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getLayout
* @hide
* <p>Gets the value of the {@link Titanium.UI.Tab#property-layout} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setLayout
* @hide
* <p>Sets the value of the {@link Titanium.UI.Tab#property-layout} property.</p>
* @param {String} layout
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getActiveIcon
* <p>Gets the value of the {@link Titanium.UI.Tab#property-activeIcon} property.</p>
* @returns {String}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method setActiveIcon
* <p>Sets the value of the {@link Titanium.UI.Tab#property-activeIcon} property.</p>
* @param {String} activeIcon
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getBadge
* <p>Gets the value of the {@link Titanium.UI.Tab#property-badge} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setBadge
* <p>Sets the value of the {@link Titanium.UI.Tab#property-badge} property.</p>
* @param {String} badge
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getBadgeColor
* <p>Gets the value of the {@link Titanium.UI.Tab#property-badgeColor} property.</p>
* @returns {String}
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @method setBadgeColor
* <p>Sets the value of the {@link Titanium.UI.Tab#property-badgeColor} property.</p>
* @param {String} badgeColor
<p>New value for the property.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @method getIcon
* <p>Gets the value of the {@link Titanium.UI.Tab#property-icon} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setIcon
* <p>Sets the value of the {@link Titanium.UI.Tab#property-icon} property.</p>
* @param {String} icon
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getIconInsets
* <p>Gets the value of the {@link Titanium.UI.Tab#property-iconInsets} property.</p>
* @returns {TabIconInsets}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setIconInsets
* <p>Sets the value of the {@link Titanium.UI.Tab#property-iconInsets} property.</p>
* @param {TabIconInsets} iconInsets
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getIconIsMask
* <p>Gets the value of the {@link Titanium.UI.Tab#property-iconIsMask} property.</p>
* @returns {Boolean}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setIconIsMask
* <p>Sets the value of the {@link Titanium.UI.Tab#property-iconIsMask} property.</p>
* @param {Boolean} iconIsMask
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getActiveIconIsMask
* <p>Gets the value of the {@link Titanium.UI.Tab#property-activeIconIsMask} property.</p>
* @returns {Boolean}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setActiveIconIsMask
* <p>Sets the value of the {@link Titanium.UI.Tab#property-activeIconIsMask} property.</p>
* @param {Boolean} activeIconIsMask
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getActive
* <p>Gets the value of the {@link Titanium.UI.Tab#property-active} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setActive
* <p>Sets the value of the {@link Titanium.UI.Tab#property-active} property.</p>
* @param {Boolean} active
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getActiveTitleColor
* <p>Gets the value of the {@link Titanium.UI.Tab#property-activeTitleColor} property.</p>
* @returns {String}
* @platform iphone 4.1.0
* @platform ipad 4.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method setActiveTitleColor
* <p>Sets the value of the {@link Titanium.UI.Tab#property-activeTitleColor} property.</p>
* @param {String} activeTitleColor
<p>New value for the property.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.Tab#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.Tab#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getTitleColor
* <p>Gets the value of the {@link Titanium.UI.Tab#property-titleColor} property.</p>
* @returns {String}
* @platform iphone 4.1.0
* @platform ipad 4.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method setTitleColor
* <p>Sets the value of the {@link Titanium.UI.Tab#property-titleColor} property.</p>
* @param {String} titleColor
<p>New value for the property.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method getTitleid
* <p>Gets the value of the {@link Titanium.UI.Tab#property-titleid} property.</p>
* @returns {String}
*/
/**
* @method setTitleid
* <p>Sets the value of the {@link Titanium.UI.Tab#property-titleid} property.</p>
* @param {String} titleid
<p>New value for the property.</p>
*/
/**
* @method getWindow
* <p>Gets the value of the {@link Titanium.UI.Tab#property-window} property.</p>
* @returns {Titanium.UI.Window}
*/
/**
* @property [accessibilityHidden=false]
* @hide
* @type Boolean
* <p>Whether the view should be "hidden" from (i.e., ignored by) the accessibility service.</p>
* <p> <b>Requires:</b>
Android 4.0 and later
iOS 5.0 and later
</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityElementsHidden</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility
Protocol</a>.
The native property is only available in iOS 5.0 and later; if
<code>accessibilityHidden</code> is specified on earlier versions of iOS, it is ignored.</p>
<p>On Android, setting <code>accessibilityHidden</code> calls the native
<a href="http://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29">View.setImportantForAccessibility</a>
method. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and
later; if this property is specified on earlier versions of Android, it is ignored.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityHint=]
* @hide
* @type String
* <p>Briefly describes what performing an action (such as a click) on the view will do.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityHint</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityValue} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityLabel=Title or label of the control.]
* @hide
* @type String
* <p>A succint label identifying the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityLabel</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityValue} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityValue=State or value of the control.]
* @hide
* @type String
* <p>A string describing the value (if any) of the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityValue</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [anchorPoint=Center of this view.]
* @hide
* @type Point
* <p>Coordinate of the view about which to pivot an animation.</p>
* @description <p>Used on iOS only. For Android, use {@link Titanium.UI.Animation#property-anchorPoint}. </p>
<p>Anchor point is specified as a fraction of the view's size. For example, <code>{0, 0}</code> is at
the view's top-left corner, <code>{0.5, 0.5}</code> at its center and <code>{1, 1}</code> at its bottom-right
corner. </p>
<p>See the "Using an anchorPoint" example in {@link Titanium.UI.Animation} for a demonstration.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property animatedCenter
* @hide
* @type Point
* @readonly
* <p>Current position of the view during an animation.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundRepeat=false]
* @hide
* @type Boolean
* <p>Determines whether to tile a background across a view.</p>
* @description <p>Setting this to <code>true</code> makes the set <code>backgroundImage</code> repeat across the view as a series
of tiles. The tiling begins in the upper-left corner, where the upper-left corner of the
background image is rendered. The image is then tiled to fill the available space of the
view.</p>
<p>Note that setting this to <code>true</code> may incur performance penalties for large views or
background images, as the tiling must be redone whenever a view is resized.</p>
<p>On iOS, the following views do not currently support tiled backgrounds:</p>
<ul>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.TextField}</li>
<li>{@link Titanium.UI.Label}</li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundLeftCap=0]
* @hide
* @type Number
* <p>Size of the left end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundTopCap=0]
* @hide
* @type Number
* <p>Size of the top end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [borderColor=Same as the normal background color of this view (Android, Mobile Web), black (iOS).]
* @hide
* @type String
* <p>Border color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [focusable=false]
* @hide
* @type Boolean
* <p>Whether view should be focusable while navigating with the trackball.</p>
* @platform android 0.9
*/
/**
* @property [softKeyboardOnFocus={@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}]
* @hide
* @type Number
* <p>Determines keyboard behavior when this view is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_HIDE_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_SHOW_ON_FOCUS}
</ul></p>
* @platform android 0.9
*/
/**
* @property [transform=Identity matrix]
* @hide
* @type Titanium.UI.2DMatrix/Titanium.UI.3DMatrix
* <p>Transformation matrix to apply to the view.</p>
* @description <p>Android and Mobile Web only support 2DMatrix transforms.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [horizontalWrap=true]
* @hide
* @type Boolean
* <p>Determines whether the layout has wrapping behavior.</p>
* @description <p>For more information, see the discussion of horizontal layout mode in the description of
the {@link Titanium.UI.View#property-layout layout} property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @property [keepScreenOn=false]
* @hide
* @type Boolean
* <p>Determines whether to keep the device screen on.</p>
* @description <p>When <code>true</code> the screen will not power down. Note: enabling this feature will use more
power, thereby adversely affecting run time when on battery.</p>
* @platform android 0.9
*/
/**
* @property [backgroundDisabledColor=Same as the normal background color of this view.]
* @type String
* <p>Disabled background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundDisabledImage=If `backgroundDisabledImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is disabled.
]
* @type String
* <p>Disabled background image for the view, specified as a local file path or URL.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedColor=Same as the normal background color of this view.]
* @type String
* <p>Sets the color of the tab when it is focused.</p>
* @description <p>On the Android platform, this sets the color of the active tab.</p>
<p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
* @platform android 3.0.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedImage=If `backgroundFocusedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is focused.
]
* @type String
* <p>Focused background image for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the focused background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundGradient=No gradient]
* @hide
* @type Gradient
* <p>A background gradient for the view.</p>
* @description <p>A gradient can be defined as either linear or radial. A linear gradient varies continuously
along a line between the <code>startPoint</code> and <code>endPoint</code>.</p>
<p>A radial gradient is interpolated between two circles, defined by <code>startPoint</code> and
<code>startRadius</code> and <code>endPoint</code> and <code>endRadius</code> respectively.</p>
<p>The start and end points and radius values can be defined in device units, in the view's
coordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center
point of the view can be specified as:</p>
<pre><code>{ x: 30, y: 30 }
</code></pre>
<p>Or:
{ x: '50%', y: '50%' }</p>
<p>When specifying multiple colors, you can specify an <em>offset</em> value for each color, defining
how far into the gradient it takes effect. For example, the following color array specifies
a gradient that goes from red to blue back to red: </p>
<pre><code>colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]
</code></pre>
<p>Mobile Web has two limitations: backfillStart and backfillEnd are ignored and the system
behaves as if they are true, and endPoint is not supported for radial gradients. </p>
<p>Android currently only supports linear gradients. It also ignores backfillStart and backfillEnd
treating them as if they are true.</p>
* <h3>Examples</h3>
<h4>Linear and Radial Gradients</h4>
<p>The following code excerpt creates two views, one with a linear gradient and one with
a radial gradient.</p>
<pre><code>var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var radialGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'radial',
startPoint: { x: 50, y: 50 },
endPoint: { x: 50, y: 50 },
colors: [ 'red', 'blue'],
startRadius: '90%',
endRadius: 0,
backfillStart: true
}
});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],
}
});
win1.add(radialGradient);
win1.add(linearGradient);
win1.open();
</code></pre>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundImage=Default behavior when `backgroundImage` is unspecified depends on the type of view and
the platform. For generic views, no image is used. For most controls (buttons, text
fields, and so on), platform-specific default images are used.
]
* @type String
* <p>Background image for the view, specified as a local file path or URL.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedImage=If `backgroundSelectedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is selected.
]
* @type String
* <p>Selected background image url for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the selected background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [borderRadius=0]
* @hide
* @type Number
* <p>Radius for the rounded corners of the view's border.</p>
* @description <p>Each corner is rounded using an arc of a circle.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [borderWidth=0]
* @hide
* @type Number
* <p>Border width of the view.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [opacity=1.0 (opaque)]
* @hide
* @type Number
* <p>Opacity of this view, from 0.0 (transparent) to 1.0 (opaque).</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property rect
* @hide
* @type Dimension
* @readonly
* <p>The bounding box of the view relative to its parent, in system units.</p>
* @description <p>The view's bounding box is defined by its size and position. </p>
<p>The view's size is <code>rect.width</code> x <code>rect.height</code>. The view's top-left position relative to
its parent is (<code>rect.x</code> , <code>rect.y</code>). </p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property size
* @hide
* @type Dimension
* @readonly
* <p>The size of the view in system units. </p>
* @description <p>Although property returns a {@link Dimension} dictionary, only the <code>width</code> and <code>height</code>
properties are valid. The position properties--<code>x</code> and <code>y</code>--are always 0.</p>
<p>To find the position <em>and</em> size of the view, use the {@link Titanium.UI.View#property-rect rect}
property instead.</p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [touchEnabled=true]
* @type Boolean
* <p>Determines whether view should receive touch events.</p>
* @description <p>If false, will forward the events to peers.</p>
* @platform mobileweb 1.8
*/
/**
* @property [visible=true]
* @hide
* @type Boolean
* <p>Determines whether the view is visible.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property zIndex
* @hide
* @type Number
* <p>Z-index stack order position, relative to other sibling views.</p>
* @description <p>A view does not have a default z-index value, meaning that it is undefined by default.
When this property is explicitly set, regardless of its value, it causes the view to be
positioned in front of any sibling that has an undefined z-index.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property children
* @hide
* @type Titanium.UI.View[]
* @readonly
* <p>Array of this view's child views.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundColor=Transparent]
* @type String
* <p>Sets the color of the tab when it is inactive.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
* @platform android 3.0.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property top
* @hide
* @type Number/String
* <p>The view's top position.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property left
* @hide
* @type Number/String
* <p>View's left position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property bottom
* @hide
* @type Number/String
* <p>View's bottom position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the parent
view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or a
dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property center
* @hide
* @type Point
* <p>View's center position, in the parent view's coordinates.</p>
* @description <p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property right
* @hide
* @type Number/String
* <p>View's right position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property width
* @hide
* @type Number/String
* <p>View's width, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values: </p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</li>
</ul>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p>
<p>This is an input property for specifying the view's width dimension. To determine
the view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property height
* @hide
* @type Number/String
* <p>View height, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values:</p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li><p>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</p>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p></li>
</ul>
<p>This is an input property for specifying the view's height dimension. To determine the
view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [layout=Composite layout]
* @hide
* @type String
* <p>Specifies how the view positions its children.
One of: 'composite', 'vertical', or 'horizontal'.</p>
* @description <p>There are three layout options:</p>
<ul>
<li><p><code>composite</code> (or <code>absolute</code>). Default layout. A child view is positioned based on its
positioning properties or "pins" (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code> and <code>center</code>).
If no positioning properties are specified, the child is centered. </p>
<p>The child is always sized based on its <code>width</code> and <code>height</code> properties, if these are
specified. If the child's height or width is <em>not</em> specified explicitly, it may be
calculated implicitly from the positioning properties. For example, if both <code>left</code> and
<code>center.x</code> are specified, they can be used to calculate the width of the child control. </p>
<p>Because the size and position properties can conflict, there is a specific precedence
order for the layout properties. For vertical positioning, the precedence
order is: <code>height</code>, <code>top</code>, <code>center.y</code>, <code>bottom</code>.</p>
<p>The following table summarizes the various combinations of properties that can
be used for vertical positioning, in order from highest precedence to lowest.
(For example, if <code>height</code>, <code>center.y</code> and <code>bottom</code> are all specified, the
<code>height</code> and <code>center.y</code> values take precedence.)</p>
<table cellpadding="6px" border="1" rules="all">
<tr>
<th>Scenario</th><th>Behavior</th>
</tr>
<tr>
<td>`height` & `top` specified</td><td>Child positioned `top` unit from
parent's top, using specified `height`;
any `center.y` and `bottom` values are ignored.</td>
</tr>
<tr>
<td>`height` & `center.y` specified</td><td>Child positioned with center at
`center.y`, using specified `height`; any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`height` & `bottom` specified</td><td>Child positioned `bottom` units from
parent's bottom, using specified `height`.</td>
</tr>
<tr>
<td>`top` & `center.y` specified</td><td>Child positioned with top edge `top` units from
parent's top and center at `center.y`. Height is determined implicitly;
any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`top` & `bottom` specified</td><td>Child positioned with top edge `top` units from
parent's top and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly. </td>
</tr>
<tr>
<td>Only `top` specified</td><td>Child positioned `top` units from parent's
top, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`center.y` and `bottom` specified</td><td>Child positioned with center at
`center.y` and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly.</td>
</tr>
<tr>
<td>Only `center.y` specified</td><td>Child positioned with center at
`center.y`, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>Only `bottom` specified</td><td>Child positioned with bottom edge `bottom`
units from parent's bottom, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`height`, `top`, `center.y`, and `bottom` unspecified</td><td>Child
centered vertically in the parent and uses the default height calculation
for the child view type.</td>
</tr>
</table>
<p>Horizontal positioning works like vertical positioning, except that the
precedence is <code>width</code>, <code>left</code>, <code>center.x</code>, <code>right</code>. </p>
<p>For complete details on composite layout rules, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>
in the Titanium Mobile Guides. </p>
<ul><li><code>vertical</code>. Children are laid out vertically from top to bottom. The first child
is laid out <code>top</code> units from its parent's bounding box. Each subsequent child is
laid out below the previous child. The space between children is equal to the
upper child's <code>bottom</code> value plus the lower child's <code>top</code> value. </li></ul>
<p>Each child is positioned horizontally as in the composite layout mode. </p>
<ul><li><code>horizontal</code>. Horizontal layouts have different behavior depending on whether wrapping
is enabled. Wrapping is enabled by default (the <code>horizontalWrap</code> property is <code>true</code>).</li></ul>
<p>With wrapping behavior, the children are laid out horizontally from left to right,
<em>in rows</em>. If a child requires more horizontal space than exists in the current row,
it is wrapped to a new row. The height of each row is equal to the maximum height of
the children in that row.</p>
<p>Wrapping behavior is available on iOS, Android and Mobile Web (Release 2.1.0 and later).
When the <code>horizontalWrap</code> property is set to true, the first row is placed at the top of the
parent view, and successive rows are placed below the first row. Each child is
positioned vertically <em>within its row</em> somewhat like composite layout mode.
In particular: </p>
<ul><li>If neither <code>top</code> or <code>bottom</code> is specified, the child is centered in the
row.</li>
<li>If either <code>top</code> or <code>bottom</code> is specified, the child is aligned to either
the top or bottom of the row, with the specified amount of padding.</li>
<li>If <em>both</em> <code>top</code> and <code>bottom</code> is specified for a given child, the properties
are both treated as padding.</li></ul>
<p>If the <code>horizontalWrap</code> property is false, the behavior is more equivalent to a vertical layout.
Children are laid or horizontally from left to right in a single row. The <code>left</code> and
<code>right</code> properties are used as padding between the children, and the <code>top</code> and <code>bottom</code>
properties are used to position the children vertically.</p>
<p>On Mobile Web <em>prior to</em> Release 2.1.0, the horizontal layout does not wrap by default,
and does not support the <code>horizontalWrap</code> property. On Android and iOS <em>prior to</em> Release
2.1.0, the horizontal layout always wraps and the <code>horizontalWrap</code> property is not supported.</p></li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property activeIcon
* @type String
* <p>Icon URL for this tab when active.</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @description <p>iOS 5.0 and later only.</p>
<p>If unspecified, iOS uses a tint color to indicate the active tab. See
{@link Titanium.UI.Tab#property-icon icon} for more information.</p>
<p>If the icon provided is larger than [30 pixels (60 pixels in the retina variant)]
(<a href="https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html">https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html</a>),
this image will be scaled to fit.</p>
<p>On iOS prior to 5.0, the default tint color is always used and this property
remains unset.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property badge
* @type String
* <p>Badge value for this tab. <code>null</code> indicates no badge.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property badgeColor
* @type String
* <p>If this item displays a badge, this color will be used for the badge's background.
If set to null, the default background color will be used instead.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property icon
* @type String
* <p>Icon URL for this tab.</p>
* @description <h4>iOS Tab Icons</h4>
<p>On iOS, tab icons are usually white with a transparent background. The system uses
a transparent tint color to indicate whether the tab is active or inactive. In the
inactive state, the tint color is based on the tab bar's color
{@link Titanium.UI.TabGroup#property-tabsBackgroundColor tabsBackgroundColor}, which defaults
to black. In the active state, the tint color is usually blue. Prior to Titanium
3.1, there was no way to override the default active icon tint.</p>
<p>Titanium 3.1 introduced some new ways to customize tab icons, which are supported
in iOS 5.0 and above:</p>
<ul>
<li><p>You can specify the active tab's tint color as
{@link Titanium.UI.TabGroup#property-activeTabIconTint activeTabIconTint}.</p></li>
<li><p>You can set separate icon images for the active and inactive states. If
{@link Titanium.UI.Tab#property-activeIcon activeIcon} is set, then <code>icon</code> is used in the
inactive state, and <code>activeIcon</code> is used in the active state. <strong>No default tint
is applied to either icon.</strong></p>
<p>If the icon provided is larger than [30 pixels (60 pixels in the retina variant)]
(<a href="https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html">https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html</a>),
this image will be scaled to fit if used with activeIcon, and cropped at the bottom
otherwise.</p></li>
</ul>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [iconInsets=All insets are zero.]
* @type TabIconInsets
* <p>The icon inset or outset for each edge.</p>
* @description <p>Use this property for example to center an icon without providing a title. To do that, set the
insets to <code>{top:6}</code> and/or <code>{left:6}</code>. The <code>right</code> and <code>bottom</code> are calculated internally to prevent the
icon from mutating.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property [iconIsMask=true]
* @type Boolean
* <p>Defines if the icon property of the tab must be used as a mask. This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>When this property is true, the color data of the image specified as the icon is ignored and the image is used as an alpha mask.
When this is false, the color data of the image is preserved.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property [activeIconIsMask=true]
* @type Boolean
* <p>Defines if the active icon property of the tab must be used as a mask. This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This is the equivalent of the {@link Titanium.UI.Tab#property-iconIsMask iconIsMask} property, but for the active icon. When this is true, the active icon is
tinted with the color specified in {@link Titanium.UI.TabGroup#property-tabsTintColor tabsTintColor}. When this is false the image is rendered as is, though the
title of the tab is still tinted. </p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property active
* @type Boolean
* <p><code>true</code> if this tab is active, <code>false</code> if it is not. </p>
* @description <p>The tab can be activated by setting the property, but since this property is
platform-specific, using {@link Titanium.UI.TabGroup#method-setActiveTab TabGroup.setActiveTab}
is recommended instead.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property activeTitleColor
* @type String
* <p>Defines the color of the title of tab when it's active.</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @description <p>The color of the title of the tab when it's active. If not defined, it will use the default tint color.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
* @platform windowsphone 4.1.0
*/
/**
* @property title
* @type String
* <p>Title for this tab.</p>
*/
/**
* @property titleColor
* @type String
* <p>Defines the color of the title of tab when it's inactive.</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @description <p>The color of the title of the tab when it's inactive. If not defined, it will use the default tint color.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
* @platform windowsphone 4.1.0
*/
/**
* @property titleid
* @type String
* <p>Key identifying a string from the locale file to use for the tab title. Only one of <code>title</code> or <code>titleid</code> should be specified.</p>
*/
/**
* @property window
* @type Titanium.UI.Window
* @creationOnly
* <p>Root-level tab window. All tabs must have at least one root-level tab window.</p>
*/
/**
* @class TabIconInsets
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Tab.yml
* <p>Dictionary to specify edge insets for {@link Titanium.UI.Tab#property-iconInsets}.</p>
*/
/**
* @property top
* @type Number
* <p>Top inset.</p>
*/
/**
* @property left
* @type Number
* <p>Left inset.</p>
*/
/**
* @class Titanium.UI.TabGroup
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TabGroup.yml
* <p>A tabbed group of windows.</p>
* @description <p>A tab group can contain one or more {@link Titanium.UI.Tab Tab} objects, each of which has an
associated tab control that is used to bring it into focus.</p>
<p>Use the {@link Titanium.UI#method-createTabGroup} method or <strong><code><TabGroup></code></strong> Alloy element to create a tab group
that, in turn, contains one or more <code><Tab></code> elements.</p>
<p>You can add tabs to the group using {@link Titanium.UI.TabGroup#method-addTab addTab}, and programmatically
switch to a specific tab using {@link Titanium.UI.TabGroup#method-setActiveTab setActiveTab}.</p>
<h4>Platform Implementation Notes</h4>
<p>When using a tab group, note the following differences between platforms: </p>
<ul>
<li><p>The tab group controls are positioned at the top of the display on Android and at the bottom
on iOS.</p></li>
<li><p>On Android, only one tab group may exist at one time. A tab group may be closed to allow a new
one to be opened later, but the root of the application must be a heavyweight window to prevent
it exiting. Tabs cannot be removed from the tab group once added, and tabs cannot be reordered.</p></li>
<li><p>On iOS, more than one tab group may exist, and may be opened and closed as required.
Each tab can contain a stack of windows, and the user can switch between them by tapping the
tab's associated control. Tabs can be removed, and the user may (optionally) be allowed to
reorder tabs.</p></li>
<li><p>On iOS and Mobile Web, it is also possible to add tabs by updating the
{@link Titanium.UI.TabGroup#property-tabs tabs} property, and to switch active tabs by setting the
{@link Titanium.UI.Tab#property-active active} property on one of the tabs to <code>true</code>. Since these mechanisms
are platform-specific, it is recommended that you use <code>addTab</code> and <code>setActiveTab</code> instead.</p></li>
<li><p>If you use the iOS/Mobile Web-specific mechanisms, it is possible to add multiple active tabs
to a tab group. In this case, the result of which tab is initially selected is undefined.</p></li>
</ul>
<h4>Further Reading</h4>
<p>If using tab groups on iOS, see
<a href="https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/Bars.html#//apple_ref/doc/uid/TP40006556-CH12-SW52">iOS UI Element Usage Guidelines</a>.</p>
* <h3>Examples</h3>
<h4>Alloy XML Markup</h4>
<p>Default Titanium project as an Alloy view.</p>
<pre><code> <Alloy>
<TabGroup backgroundColor="white" >
<Tab id="tab1" title="Tab 1" icon="KS_nav_views.png">
<Window id="win1" title="Tab 1">
<Label id="label1" color="#999">I am Window 1</Label>
</Window>
</Tab>
<Tab id="tab2" title="Tab 2" icon="KS_nav_views.png">
<Window id="win2" title="Tab 2">
<Label id="label2" color="#999">I am Window 2</Label>
</Window>
</Tab>
<!-- Use the Require tag to include external Ti.UI.Tab views -->
</TabGroup>
</Alloy>
</code></pre><h4>Classic Titanium Example</h4>
<p>Simple two-tabbed app.</p>
<pre><code>var win1 = Ti.UI.createWindow({
backgroundColor: 'blue',
title: 'Blue'
});
win1.add(Ti.UI.createLabel({text: 'I am a blue window.'}));
var win2 = Ti.UI.createWindow({
backgroundColor: 'red',
title: 'Red'
});
win2.add(Ti.UI.createLabel({text: 'I am a red window.'}));
var tab1 = Ti.UI.createTab({
window: win1,
title: 'Blue'
}),
tab2 = Ti.UI.createTab({
window: win2,
title: 'Red'
}),
tabGroup = Ti.UI.createTabGroup({
tabs: [tab1, tab2]
});
tabGroup.open();
</code></pre>
*/
/**
* @event focus
* <p>Fired when this tab group gains focus. On Android, fired when a tab in this tab group
gains focus.</p>
* @description <p>On Android, this event also fires when the activity enters the foreground
(after the activity enters the resume state).</p>
* @param {Number} index
<p>Index of the current active tab.</p>
* @param {Number} previousIndex
<p>Index of the previous active tab.</p>
* @param {Titanium.UI.Tab} tab
<p>Active tab.</p>
* @param {Titanium.UI.Tab} previousTab
<p>Previous active tab.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event androidback
* <p>Fired when the back button is pressed by the user.</p>
* @description <p>This event is fired when the current tab group's activity detects
a back button press by the user to navigate back.</p>
<p>By default this event would trigger the current activity to be finished
and removed from the task stack. Subscribing to this event with a listener
will prevent the default behavior. To finish the activity from your listener
just call the <code>close</code> method of the tab group.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event androidcamera
* <p>Fired when the Camera button is released.</p>
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event androidfocus
* <p>Fired when the Camera button is half-pressed then released.</p>
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event androidsearch
* <p>Fired when the Search button is released.</p>
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event androidvoldown
* <p>Fired when the volume down button is released.</p>
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event androidvolup
* <p>Fired when the volume up button is released.</p>
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event blur
* <p>Fired when this tab group loses focus. On Android, fired when a tab in this tab group
loses focus.</p>
* @description <p>On Android, this event also fires before putting the activity in the background
(before the activity enters the pause state).</p>
* @param {Number} index
<p>Index of the current active tab. On iOS, a value of <code>undefined</code> indicates that the
<strong>More</strong> tab was the active tab.</p>
* @param {Number} previousIndex
<p>Index of the previous active tab. On iOS, a value of <code>undefined</code> indicates that the
<strong>More</strong> tab was the previous tab.</p>
* @param {Titanium.UI.Tab} tab
<p>Active tab.</p>
* @param {Titanium.UI.Tab} previousTab
<p>Previous active tab. On iOS, a value of <code>undefined</code> indicates that the <strong>More</strong> tab was
the previous tab.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event close
* <p>Fired when the tab group is closed.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event open
* <p>Fired when the tab group is opened.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event selected
* <p>Fired when a tab is selected.</p>
* @deprecated 5.2.0 Use <Titanium.UI.Tab.focus> instead.
* @param {Number} index
<p>Index of the current active tab.</p>
* @param {Number} previousIndex
<p>Index of the previous active tab.</p>
* @param {Titanium.UI.Tab} tab
<p>Active tab.</p>
* @param {Titanium.UI.Tab} previousTab
<p>Previous active tab.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @event unselected
* <p>Fired when a tab is unselected.</p>
* @deprecated 5.2.0 Use <Titanium.UI.Tab.blur> instead.
* @param {Number} index
<p>Index of the current active tab. On iOS, a value of <code>undefined</code> indicates that the
<strong>More</strong> tab was the active tab.</p>
* @param {Number} previousIndex
<p>Index of the previous active tab. On iOS, a value of <code>undefined</code> indicates that the
<strong>More</strong> tab was the previous tab.</p>
* @param {Titanium.UI.Tab} tab
<p>Active tab.</p>
* @param {Titanium.UI.Tab} previousTab
<p>Previous active tab. On iOS, a value of <code>undefined</code> indicates that the <strong>More</strong> tab was
the previous tab.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method remove
* @hide
* <p>Removes a child view from this view's hierarchy.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method add
* @hide
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>The child view is added as the last child in this view's hierarchy. </p>
<p>Although all views inherit from {@link Titanium.UI.View}, not all views are capable of
containing other views. In particular:</p>
<ul>
<li>Some views are not designed to be containers at all.</li>
<li>Some views are special-purpose containers that can only contain certain other
views.</li>
<li>Some views are top-level containers that cannot (or should not) be added to other views.</li>
</ul>
<h4>Non-Container Views</h4>
<p>The following views are not intended to act as containers that can hold other
views:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator ActivityIndicator}</li>
<li>{@link Titanium.UI.Button Button}</li>
<li>{@link Titanium.UI.ImageView ImageView}</li>
<li>{@link Titanium.UI.Label Label}</li>
<li>{@link Titanium.UI.ProgressBar ProgressBar}</li>
<li>{@link Titanium.UI.SearchBar SearchBar}</li>
<li>{@link Titanium.UI.Slider Slider}</li>
<li>{@link Titanium.UI.Switch Switch}</li>
<li>{@link Titanium.UI.TableView TableView}</li>
<li>{@link Titanium.UI.TextArea TextArea}</li>
<li>{@link Titanium.UI.TextField TextField}</li>
<li>{@link Titanium.UI.WebView WebView}</li>
</ul>
<p>Adding children to the these views <em>may</em> be supported on some platforms,
but is not guaranteed to work across platforms. Where it is supported, it may not
work as expected.</p>
<p>For maximum portability, these views should be treated as if they do not support children. <br>
Instead of adding children to these views, applications can positon other views as
siblings. For example, instead of adding a button as a child of a <code>WebView</code>, you can add
the button to the web view's parent such that it appears on top of the web view. </p>
<h4>Special-Purpose Containers</h4>
<p>A few view objects act as special-purpose containers--that is, they only manage
certain types of children, and many of them support a special means of adding
these children, instead of the general <code>add</code> method. These containers include:</p>
<ul>
<li><p>{@link Titanium.UI.ButtonBar ButtonBar} and {@link Titanium.UI.iOS.TabbedBar TabbedBar} are designed
to hold their own internally-created buttons, assigned by adding strings to the "labels" array.
Views added using the <code>add</code> method are displayed on top of these buttons.</p></li>
<li><p>{@link Titanium.UI.Picker Picker}. Can only hold <code>PickerRows</code> and <code>PickerColumns</code>, which
are added using the <code>add</code> method. Adding other types of views to a <code>Picker</code> is not
supported.</p></li>
<li><p>{@link Titanium.UI.TableView TableView} is a specialized container for
<code>TableViewSection</code> and <code>TableViewRow</code> objects. These objects must be
added using the properties and methods that <code>TableView</code> provides
for adding and removing sectons and rows.</p>
<p>On some platforms, it is possible to add arbitrary child views to a table view
using the <code>add</code> method. However, this is not guaranteed to work on all platforms,
and in general, should be avoided.</p></li>
<li><p>{@link Titanium.UI.TableViewSection TableViewSection} is a specialized container
for <code>TableViewRow</code> objects, which <em>are</em> added using the <code>add</code> method. The <code>add</code> method
on <code>TableViewSection</code> can only be used to add <code>TableViewRow</code> objects.</p></li>
<li><p>{@link Titanium.UI.iOS.Toolbar Toolbar} is designed to hold buttons and certain
other controls, added to its <code>items</code> array. Views added using the <code>add</code> method are
displayed on top of the controls in the <code>items</code> array.</p></li>
<li><p>The <code>Tab</code>, <code>TabGroup</code>, <code>NavigationGroup</code>, <code>NavigationWindow</code> and <code>SplitWindow</code> objects are
special containers that manage windows. These are discussed in the
"Top-Level Containers" section.</p></li>
</ul>
<h4>Top-Level Containers</h4>
<p>There are certain top-level containers that are not intended to be added
as the children of other views. These top-level containers include
{@link Titanium.UI.Window}, {@link Titanium.UI.iPad.SplitWindow}, {@link Titanium.UI.iOS.NavigationWindow},
and {@link Titanium.UI.TabGroup}. Other types of views must be added
to a top-level container in order to be displayed on screen.</p>
<p>The special containers {@link Titanium.UI.MobileWeb.NavigationGroup},
{@link Titanium.UI.iOS.NavigationWindow}, {@link Titanium.UI.iPad.SplitWindow},
{@link Titanium.UI.Tab}, and {@link Titanium.UI.TabGroup} manage windows.
These managed windows may be referred to as <em>children</em> of the
container, but they are not added using the <code>add</code> method.</p>
<p>Note that although a <code>NavigationGroup</code> manages windows, it is not itself a
top-level container. It must be added to a <code>Window</code> in order to be displayed.</p>
<p><code>Tab</code> is another kind of special container: it is not itself a top-level container,
but can only be used within a <code>TabGroup</code>. You cannot <code>add</code> a <code>Tab</code> to an arbitrary
container.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
*/
/**
* @method disableTabNavigation
* <p>Disable (or re-enable) tab navigation. If tab navigation is disabled, the tabs are hidden and
the last selected tab window is shown.</p>
* @param {Boolean} disable
<p>True to disable tab navigation, false to re-enable the tabs.</p>
* @platform android 3.6.0
*/
/**
* @method addTab
* <p>Adds a tab to the tab group.</p>
* @param {Titanium.UI.Tab} tab
<p>Tab to add.</p>
*/
/**
* @method close
* <p>Closes the tab group and removes it from the UI.</p>
*/
/**
* @method open
* <p>Opens the tab group and makes it visible.</p>
*/
/**
* @method removeTab
* <p>Removes a tab from the tab group.</p>
* @param {Titanium.UI.Tab} tab
<p>Tab to remove.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getActiveTab
* <p>Gets the currently-active tab.</p>
* @returns {Titanium.UI.Tab}
*/
/**
* @method setActiveTab
* <p>Selects the currently active tab in a tab group.</p>
* @param {Number/Titanium.UI.Tab} indexOrObject
<p>Index or object of the tab to switch to.</p>
*/
/**
* @method getTabs
* <p>Gets all tabs that are managed by the tab group.</p>
* @returns {Titanium.UI.Tab[]}
*/
/**
* @method getAccessibilityHidden
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-accessibilityHidden} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHidden
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-accessibilityHidden} property.</p>
* @param {Boolean} accessibilityHidden
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityHint
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-accessibilityHint} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHint
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-accessibilityHint} property.</p>
* @param {String} accessibilityHint
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityLabel
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-accessibilityLabel} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityLabel
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-accessibilityLabel} property.</p>
* @param {String} accessibilityLabel
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityValue
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-accessibilityValue} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityValue
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-accessibilityValue} property.</p>
* @param {String} accessibilityValue
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getAnchorPoint
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-anchorPoint} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setAnchorPoint
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-anchorPoint} property.</p>
* @param {Point} anchorPoint
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getAnimatedCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-animatedCenter} property.</p>
* @returns {Point}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundRepeat
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-backgroundRepeat} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundRepeat
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-backgroundRepeat} property.</p>
* @param {Boolean} backgroundRepeat
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundLeftCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-backgroundLeftCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundLeftCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-backgroundLeftCap} property.</p>
* @param {Number} backgroundLeftCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundTopCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-backgroundTopCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundTopCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-backgroundTopCap} property.</p>
* @param {Number} backgroundTopCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBorderColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-borderColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setBorderColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-borderColor} property.</p>
* @param {String} borderColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getFocusable
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-focusable} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setFocusable
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-focusable} property.</p>
* @param {Boolean} focusable
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getSoftKeyboardOnFocus
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-softKeyboardOnFocus} property.</p>
* @returns {Number}
* @platform android 0.9
*/
/**
* @method setSoftKeyboardOnFocus
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-softKeyboardOnFocus} property.</p>
* @param {Number} softKeyboardOnFocus
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getTransform
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-transform} property.</p>
* @returns {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setTransform
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-transform} property.</p>
* @param {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix} transform
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getHorizontalWrap
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-horizontalWrap} property.</p>
* @returns {Boolean}
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method setHorizontalWrap
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-horizontalWrap} property.</p>
* @param {Boolean} horizontalWrap
<p>New value for the property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method getBackgroundDisabledColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-backgroundDisabledColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-backgroundDisabledColor} property.</p>
* @param {String} backgroundDisabledColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundDisabledImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-backgroundDisabledImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundDisabledImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-backgroundDisabledImage} property.</p>
* @param {String} backgroundDisabledImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-backgroundFocusedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-backgroundFocusedColor} property.</p>
* @param {String} backgroundFocusedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundFocusedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-backgroundFocusedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundFocusedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-backgroundFocusedImage} property.</p>
* @param {String} backgroundFocusedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundGradient
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-backgroundGradient} property.</p>
* @returns {Gradient}
*/
/**
* @method setBackgroundGradient
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-backgroundGradient} property.</p>
* @param {Gradient} backgroundGradient
<p>New value for the property.</p>
*/
/**
* @method getBackgroundImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-backgroundImage} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
*/
/**
* @method getBackgroundSelectedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-backgroundSelectedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-backgroundSelectedColor} property.</p>
* @param {String} backgroundSelectedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-backgroundSelectedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-backgroundSelectedImage} property.</p>
* @param {String} backgroundSelectedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBorderRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-borderRadius} property.</p>
* @returns {Number}
*/
/**
* @method setBorderRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-borderRadius} property.</p>
* @param {Number} borderRadius
<p>New value for the property.</p>
*/
/**
* @method getBorderWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-borderWidth} property.</p>
* @returns {Number}
*/
/**
* @method setBorderWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-borderWidth} property.</p>
* @param {Number} borderWidth
<p>New value for the property.</p>
*/
/**
* @method getOpacity
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-opacity} property.</p>
* @returns {Number}
*/
/**
* @method setOpacity
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-opacity} property.</p>
* @param {Number} opacity
<p>New value for the property.</p>
*/
/**
* @method getZIndex
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-zIndex} property.</p>
* @returns {Number}
*/
/**
* @method setZIndex
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
*/
/**
* @method getChildren
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-children} property.</p>
* @returns {Titanium.UI.View[]}
*/
/**
* @method getBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-backgroundColor} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
*/
/**
* @method getTop
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-top} property.</p>
* @returns {Number/String}
*/
/**
* @method setTop
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-top} property.</p>
* @param {Number/String} top
<p>New value for the property.</p>
*/
/**
* @method getLeft
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-left} property.</p>
* @returns {Number/String}
*/
/**
* @method setLeft
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-left} property.</p>
* @param {Number/String} left
<p>New value for the property.</p>
*/
/**
* @method getBottom
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-bottom} property.</p>
* @returns {Number/String}
*/
/**
* @method setBottom
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-bottom} property.</p>
* @param {Number/String} bottom
<p>New value for the property.</p>
*/
/**
* @method getRight
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-right} property.</p>
* @returns {Number/String}
*/
/**
* @method setRight
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-right} property.</p>
* @param {Number/String} right
<p>New value for the property.</p>
*/
/**
* @method getWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-width} property.</p>
* @returns {Number/String}
*/
/**
* @method setWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-width} property.</p>
* @param {Number/String} width
<p>New value for the property.</p>
*/
/**
* @method getHeight
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-height} property.</p>
* @returns {Number/String}
*/
/**
* @method setHeight
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-height} property.</p>
* @param {Number/String} height
<p>New value for the property.</p>
*/
/**
* @method getLayout
* @hide
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-layout} property.</p>
* @returns {String}
*/
/**
* @method setLayout
* @hide
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-layout} property.</p>
* @param {String} layout
<p>New value for the property.</p>
*/
/**
* @method getActivity
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-activity} property.</p>
* @returns {Titanium.Android.Activity}
* @platform android 3.0.0
*/
/**
* @method getAllowUserCustomization
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-allowUserCustomization} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setAllowUserCustomization
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-allowUserCustomization} property.</p>
* @param {Boolean} allowUserCustomization
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getTranslucent
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-translucent} property.</p>
* @returns {Boolean}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setTranslucent
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-translucent} property.</p>
* @param {Boolean} translucent
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getTitleAttributes
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-titleAttributes} property.</p>
* @returns {titleAttributesParams}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setTitleAttributes
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-titleAttributes} property.</p>
* @param {titleAttributesParams} titleAttributes
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getNavTintColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-navTintColor} property.</p>
* @returns {String}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setNavTintColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-navTintColor} property.</p>
* @param {String} navTintColor
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getEditButtonTitle
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-editButtonTitle} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setEditButtonTitle
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-editButtonTitle} property.</p>
* @param {String} editButtonTitle
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getExitOnClose
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-exitOnClose} property.</p>
* @returns {Boolean}
* @platform android 0.9
*/
/**
* @method setExitOnClose
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-exitOnClose} property.</p>
* @param {Boolean} exitOnClose
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getSwipeable
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-swipeable} property.</p>
* @returns {Boolean}
* @platform android 3.6.0
*/
/**
* @method setSwipeable
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-swipeable} property.</p>
* @param {Boolean} swipeable
<p>New value for the property.</p>
* @platform android 3.6.0
*/
/**
* @method getSmoothScrollOnTabClick
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-smoothScrollOnTabClick} property.</p>
* @returns {Boolean}
* @platform android 3.6.0
*/
/**
* @method setSmoothScrollOnTabClick
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-smoothScrollOnTabClick} property.</p>
* @param {Boolean} smoothScrollOnTabClick
<p>New value for the property.</p>
* @platform android 3.6.0
*/
/**
* @method getWindowSoftInputMode
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-windowSoftInputMode} property.</p>
* @returns {Number}
* @platform android 0.9
*/
/**
* @method setWindowSoftInputMode
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-windowSoftInputMode} property.</p>
* @param {Number} windowSoftInputMode
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getTabsTintColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabsTintColor} property.</p>
* @returns {String}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setTabsTintColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabsTintColor} property.</p>
* @param {String} tabsTintColor
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getUnselectedItemTintColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-unselectedItemTintColor} property.</p>
* @returns {String}
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @method setUnselectedItemTintColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-unselectedItemTintColor} property.</p>
* @param {String} unselectedItemTintColor
<p>New value for the property.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @method getShadowImage
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-shadowImage} property.</p>
* @returns {String}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method setShadowImage
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-shadowImage} property.</p>
* @param {String} shadowImage
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getActiveTabIconTint
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-activeTabIconTint} property.</p>
* @returns {String}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method setActiveTabIconTint
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-activeTabIconTint} property.</p>
* @param {String} activeTabIconTint
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method getTabDividerColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabDividerColor} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
*/
/**
* @method setTabDividerColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabDividerColor} property.</p>
* @param {String} tabDividerColor
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
*/
/**
* @method getTabDividerWidth
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabDividerWidth} property.</p>
* @returns {Number/String}
* @platform mobileweb 2.0.0
*/
/**
* @method setTabDividerWidth
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabDividerWidth} property.</p>
* @param {Number/String} tabDividerWidth
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
*/
/**
* @method getTabHeight
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabHeight} property.</p>
* @returns {Number/String}
* @platform mobileweb 2.0.0
*/
/**
* @method setTabHeight
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabHeight} property.</p>
* @param {Number/String} tabHeight
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
*/
/**
* @method getTabsAtBottom
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabsAtBottom} property.</p>
* @returns {Boolean}
* @platform mobileweb 2.0.0
*/
/**
* @method setTabsAtBottom
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabsAtBottom} property.</p>
* @param {Boolean} tabsAtBottom
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
*/
/**
* @method getActiveTab
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-activeTab} property.</p>
* @returns {Titanium.UI.Tab}
*/
/**
* @method setActiveTab
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-activeTab} property.</p>
* @param {Titanium.UI.Tab} activeTab
<p>New value for the property.</p>
*/
/**
* @method getBarColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-barColor} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setBarColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-barColor} property.</p>
* @param {String} barColor
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getTabs
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabs} property.</p>
* @returns {Titanium.UI.Tab[]}
*/
/**
* @method setTabs
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabs} property.</p>
* @param {Array<Titanium.UI.Tab>} tabs
<p>New value for the property.</p>
*/
/**
* @method getTabsBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundColor} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setTabsBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundColor} property.</p>
* @param {String} tabsBackgroundColor
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-title} property.</p>
* @returns {String}
* @platform android 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
* @platform android 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @method getTabsBackgroundImage
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundImage} property.</p>
* @returns {String}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setTabsBackgroundImage
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundImage} property.</p>
* @param {String} tabsBackgroundImage
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getTabsBackgroundDisabledColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundDisabledColor} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setTabsBackgroundDisabledColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundDisabledColor} property.</p>
* @param {String} tabsBackgroundDisabledColor
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getTabsBackgroundDisabledImage
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundDisabledImage} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setTabsBackgroundDisabledImage
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundDisabledImage} property.</p>
* @param {String} tabsBackgroundDisabledImage
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getTabsBackgroundFocusedColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundFocusedColor} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setTabsBackgroundFocusedColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundFocusedColor} property.</p>
* @param {String} tabsBackgroundFocusedColor
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getTabsBackgroundFocusedImage
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundFocusedImage} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setTabsBackgroundFocusedImage
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundFocusedImage} property.</p>
* @param {String} tabsBackgroundFocusedImage
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getTabsBackgroundSelectedColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundSelectedColor} property.</p>
* @returns {String}
* @platform android 3.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setTabsBackgroundSelectedColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundSelectedColor} property.</p>
* @param {String} tabsBackgroundSelectedColor
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getTabsBackgroundSelectedImage
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundSelectedImage} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setTabsBackgroundSelectedImage
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-tabsBackgroundSelectedImage} property.</p>
* @param {String} tabsBackgroundSelectedImage
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getActiveTabBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundColor} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setActiveTabBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundColor} property.</p>
* @param {String} activeTabBackgroundColor
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getActiveTabBackgroundImage
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundImage} property.</p>
* @returns {String}
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setActiveTabBackgroundImage
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundImage} property.</p>
* @param {String} activeTabBackgroundImage
<p>New value for the property.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getActiveTabBackgroundDisabledColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundDisabledColor} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setActiveTabBackgroundDisabledColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundDisabledColor} property.</p>
* @param {String} activeTabBackgroundDisabledColor
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getActiveTabBackgroundDisabledImage
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundDisabledImage} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setActiveTabBackgroundDisabledImage
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundDisabledImage} property.</p>
* @param {String} activeTabBackgroundDisabledImage
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getActiveTabBackgroundFocusedColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundFocusedColor} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setActiveTabBackgroundFocusedColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundFocusedColor} property.</p>
* @param {String} activeTabBackgroundFocusedColor
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getActiveTabBackgroundFocusedImage
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundFocusedImage} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setActiveTabBackgroundFocusedImage
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundFocusedImage} property.</p>
* @param {String} activeTabBackgroundFocusedImage
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getActiveTabBackgroundSelectedColor
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundSelectedColor} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setActiveTabBackgroundSelectedColor
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundSelectedColor} property.</p>
* @param {String} activeTabBackgroundSelectedColor
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getActiveTabBackgroundSelectedImage
* <p>Gets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundSelectedImage} property.</p>
* @returns {String}
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setActiveTabBackgroundSelectedImage
* <p>Sets the value of the {@link Titanium.UI.TabGroup#property-activeTabBackgroundSelectedImage} property.</p>
* @param {String} activeTabBackgroundSelectedImage
<p>New value for the property.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property [accessibilityHidden=false]
* @hide
* @type Boolean
* <p>Whether the view should be "hidden" from (i.e., ignored by) the accessibility service.</p>
* <p> <b>Requires:</b>
Android 4.0 and later
iOS 5.0 and later
</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityElementsHidden</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility
Protocol</a>.
The native property is only available in iOS 5.0 and later; if
<code>accessibilityHidden</code> is specified on earlier versions of iOS, it is ignored.</p>
<p>On Android, setting <code>accessibilityHidden</code> calls the native
<a href="http://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29">View.setImportantForAccessibility</a>
method. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and
later; if this property is specified on earlier versions of Android, it is ignored.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityHint=]
* @hide
* @type String
* <p>Briefly describes what performing an action (such as a click) on the view will do.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityHint</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityValue} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityLabel=Title or label of the control.]
* @hide
* @type String
* <p>A succint label identifying the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityLabel</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityValue} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityValue=State or value of the control.]
* @hide
* @type String
* <p>A string describing the value (if any) of the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityValue</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [anchorPoint=Center of this view.]
* @hide
* @type Point
* <p>Coordinate of the view about which to pivot an animation.</p>
* @description <p>Used on iOS only. For Android, use {@link Titanium.UI.Animation#property-anchorPoint}. </p>
<p>Anchor point is specified as a fraction of the view's size. For example, <code>{0, 0}</code> is at
the view's top-left corner, <code>{0.5, 0.5}</code> at its center and <code>{1, 1}</code> at its bottom-right
corner. </p>
<p>See the "Using an anchorPoint" example in {@link Titanium.UI.Animation} for a demonstration.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property animatedCenter
* @hide
* @type Point
* @readonly
* <p>Current position of the view during an animation.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundRepeat=false]
* @hide
* @type Boolean
* <p>Determines whether to tile a background across a view.</p>
* @description <p>Setting this to <code>true</code> makes the set <code>backgroundImage</code> repeat across the view as a series
of tiles. The tiling begins in the upper-left corner, where the upper-left corner of the
background image is rendered. The image is then tiled to fill the available space of the
view.</p>
<p>Note that setting this to <code>true</code> may incur performance penalties for large views or
background images, as the tiling must be redone whenever a view is resized.</p>
<p>On iOS, the following views do not currently support tiled backgrounds:</p>
<ul>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.TextField}</li>
<li>{@link Titanium.UI.Label}</li>
</ul>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundLeftCap=0]
* @hide
* @type Number
* <p>Size of the left end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundTopCap=0]
* @hide
* @type Number
* <p>Size of the top end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [borderColor=Same as the normal background color of this view (Android, Mobile Web), black (iOS).]
* @hide
* @type String
* <p>Border color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [focusable=false]
* @hide
* @type Boolean
* <p>Whether view should be focusable while navigating with the trackball.</p>
* @platform android 0.9
*/
/**
* @property [softKeyboardOnFocus={@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}]
* @hide
* @type Number
* <p>Determines keyboard behavior when this view is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_DEFAULT_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_HIDE_ON_FOCUS}
<li> {@link Titanium.UI.Android#property-SOFT_KEYBOARD_SHOW_ON_FOCUS}
</ul></p>
* @platform android 0.9
*/
/**
* @property [transform=Identity matrix]
* @hide
* @type Titanium.UI.2DMatrix/Titanium.UI.3DMatrix
* <p>Transformation matrix to apply to the view.</p>
* @description <p>Android and Mobile Web only support 2DMatrix transforms.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [horizontalWrap=true]
* @hide
* @type Boolean
* <p>Determines whether the layout has wrapping behavior.</p>
* @description <p>For more information, see the discussion of horizontal layout mode in the description of
the {@link Titanium.UI.View#property-layout layout} property.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @property [backgroundDisabledColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Disabled background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundDisabledImage=If `backgroundDisabledImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is disabled.
]
* @hide
* @type String
* <p>Disabled background image for the view, specified as a local file path or URL.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedColor=Same as the normal background color of this view.]
* @hide
* @type String
* <p>Focused background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>For normal views, the focused color is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundFocusedImage=If `backgroundFocusedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is focused.
]
* @hide
* @type String
* <p>Focused background image for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the focused background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundGradient=No gradient]
* @hide
* @type Gradient
* <p>A background gradient for the view.</p>
* @description <p>A gradient can be defined as either linear or radial. A linear gradient varies continuously
along a line between the <code>startPoint</code> and <code>endPoint</code>.</p>
<p>A radial gradient is interpolated between two circles, defined by <code>startPoint</code> and
<code>startRadius</code> and <code>endPoint</code> and <code>endRadius</code> respectively.</p>
<p>The start and end points and radius values can be defined in device units, in the view's
coordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center
point of the view can be specified as:</p>
<pre><code>{ x: 30, y: 30 }
</code></pre>
<p>Or:
{ x: '50%', y: '50%' }</p>
<p>When specifying multiple colors, you can specify an <em>offset</em> value for each color, defining
how far into the gradient it takes effect. For example, the following color array specifies
a gradient that goes from red to blue back to red: </p>
<pre><code>colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]
</code></pre>
<p>Mobile Web has two limitations: backfillStart and backfillEnd are ignored and the system
behaves as if they are true, and endPoint is not supported for radial gradients. </p>
<p>Android currently only supports linear gradients. It also ignores backfillStart and backfillEnd
treating them as if they are true.</p>
* <h3>Examples</h3>
<h4>Linear and Radial Gradients</h4>
<p>The following code excerpt creates two views, one with a linear gradient and one with
a radial gradient.</p>
<pre><code>var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var radialGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'radial',
startPoint: { x: 50, y: 50 },
endPoint: { x: 50, y: 50 },
colors: [ 'red', 'blue'],
startRadius: '90%',
endRadius: 0,
backfillStart: true
}
});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],
}
});
win1.add(radialGradient);
win1.add(linearGradient);
win1.open();
</code></pre>
*/
/**
* @property [backgroundImage=Default behavior when `backgroundImage` is unspecified depends on the type of view and
the platform. For generic views, no image is used. For most controls (buttons, text
fields, and so on), platform-specific default images are used.
]
* @hide
* @type String
* <p>Background image for the view, specified as a local file path or URL.</p>
*/
/**
* @property [backgroundSelectedColor=Background color of this view.]
* @hide
* @type String
* <p>Selected background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p><code>focusable</code> must be true for normal views.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedImage=If `backgroundSelectedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is selected.
]
* @hide
* @type String
* <p>Selected background image url for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the selected background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [borderRadius=0]
* @hide
* @type Number
* <p>Radius for the rounded corners of the view's border.</p>
* @description <p>Each corner is rounded using an arc of a circle.</p>
*/
/**
* @property [borderWidth=0]
* @hide
* @type Number
* <p>Border width of the view.</p>
*/
/**
* @property [opacity=1.0 (opaque)]
* @hide
* @type Number
* <p>Opacity of this view, from 0.0 (transparent) to 1.0 (opaque).</p>
*/
/**
* @property zIndex
* @hide
* @type Number
* <p>Z-index stack order position, relative to other sibling views.</p>
* @description <p>A view does not have a default z-index value, meaning that it is undefined by default.
When this property is explicitly set, regardless of its value, it causes the view to be
positioned in front of any sibling that has an undefined z-index.</p>
*/
/**
* @property children
* @hide
* @type Titanium.UI.View[]
* @readonly
* <p>Array of this view's child views.</p>
*/
/**
* @property [backgroundColor=Transparent]
* @hide
* @type String
* <p>Background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property top
* @hide
* @type Number/String
* <p>The view's top position.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property left
* @hide
* @type Number/String
* <p>View's left position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property bottom
* @hide
* @type Number/String
* <p>View's bottom position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the parent
view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or a
dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property right
* @hide
* @type Number/String
* <p>View's right position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property width
* @hide
* @type Number/String
* <p>View's width, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values: </p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</li>
</ul>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p>
<p>This is an input property for specifying the view's width dimension. To determine
the view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
*/
/**
* @property height
* @hide
* @type Number/String
* <p>View height, in platform-specific units.</p>
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values:</p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li><p>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</p>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p></li>
</ul>
<p>This is an input property for specifying the view's height dimension. To determine the
view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
*/
/**
* @property [layout=Composite layout]
* @hide
* @type String
* <p>Specifies how the view positions its children.
One of: 'composite', 'vertical', or 'horizontal'.</p>
* @description <p>There are three layout options:</p>
<ul>
<li><p><code>composite</code> (or <code>absolute</code>). Default layout. A child view is positioned based on its
positioning properties or "pins" (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code> and <code>center</code>).
If no positioning properties are specified, the child is centered. </p>
<p>The child is always sized based on its <code>width</code> and <code>height</code> properties, if these are
specified. If the child's height or width is <em>not</em> specified explicitly, it may be
calculated implicitly from the positioning properties. For example, if both <code>left</code> and
<code>center.x</code> are specified, they can be used to calculate the width of the child control. </p>
<p>Because the size and position properties can conflict, there is a specific precedence
order for the layout properties. For vertical positioning, the precedence
order is: <code>height</code>, <code>top</code>, <code>center.y</code>, <code>bottom</code>.</p>
<p>The following table summarizes the various combinations of properties that can
be used for vertical positioning, in order from highest precedence to lowest.
(For example, if <code>height</code>, <code>center.y</code> and <code>bottom</code> are all specified, the
<code>height</code> and <code>center.y</code> values take precedence.)</p>
<table cellpadding="6px" border="1" rules="all">
<tr>
<th>Scenario</th><th>Behavior</th>
</tr>
<tr>
<td>`height` & `top` specified</td><td>Child positioned `top` unit from
parent's top, using specified `height`;
any `center.y` and `bottom` values are ignored.</td>
</tr>
<tr>
<td>`height` & `center.y` specified</td><td>Child positioned with center at
`center.y`, using specified `height`; any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`height` & `bottom` specified</td><td>Child positioned `bottom` units from
parent's bottom, using specified `height`.</td>
</tr>
<tr>
<td>`top` & `center.y` specified</td><td>Child positioned with top edge `top` units from
parent's top and center at `center.y`. Height is determined implicitly;
any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`top` & `bottom` specified</td><td>Child positioned with top edge `top` units from
parent's top and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly. </td>
</tr>
<tr>
<td>Only `top` specified</td><td>Child positioned `top` units from parent's
top, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`center.y` and `bottom` specified</td><td>Child positioned with center at
`center.y` and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly.</td>
</tr>
<tr>
<td>Only `center.y` specified</td><td>Child positioned with center at
`center.y`, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>Only `bottom` specified</td><td>Child positioned with bottom edge `bottom`
units from parent's bottom, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`height`, `top`, `center.y`, and `bottom` unspecified</td><td>Child
centered vertically in the parent and uses the default height calculation
for the child view type.</td>
</tr>
</table>
<p>Horizontal positioning works like vertical positioning, except that the
precedence is <code>width</code>, <code>left</code>, <code>center.x</code>, <code>right</code>. </p>
<p>For complete details on composite layout rules, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>
in the Titanium Mobile Guides. </p>
<ul><li><code>vertical</code>. Children are laid out vertically from top to bottom. The first child
is laid out <code>top</code> units from its parent's bounding box. Each subsequent child is
laid out below the previous child. The space between children is equal to the
upper child's <code>bottom</code> value plus the lower child's <code>top</code> value. </li></ul>
<p>Each child is positioned horizontally as in the composite layout mode. </p>
<ul><li><code>horizontal</code>. Horizontal layouts have different behavior depending on whether wrapping
is enabled. Wrapping is enabled by default (the <code>horizontalWrap</code> property is <code>true</code>).</li></ul>
<p>With wrapping behavior, the children are laid out horizontally from left to right,
<em>in rows</em>. If a child requires more horizontal space than exists in the current row,
it is wrapped to a new row. The height of each row is equal to the maximum height of
the children in that row.</p>
<p>Wrapping behavior is available on iOS, Android and Mobile Web (Release 2.1.0 and later).
When the <code>horizontalWrap</code> property is set to true, the first row is placed at the top of the
parent view, and successive rows are placed below the first row. Each child is
positioned vertically <em>within its row</em> somewhat like composite layout mode.
In particular: </p>
<ul><li>If neither <code>top</code> or <code>bottom</code> is specified, the child is centered in the
row.</li>
<li>If either <code>top</code> or <code>bottom</code> is specified, the child is aligned to either
the top or bottom of the row, with the specified amount of padding.</li>
<li>If <em>both</em> <code>top</code> and <code>bottom</code> is specified for a given child, the properties
are both treated as padding.</li></ul>
<p>If the <code>horizontalWrap</code> property is false, the behavior is more equivalent to a vertical layout.
Children are laid or horizontally from left to right in a single row. The <code>left</code> and
<code>right</code> properties are used as padding between the children, and the <code>top</code> and <code>bottom</code>
properties are used to position the children vertically.</p>
<p>On Mobile Web <em>prior to</em> Release 2.1.0, the horizontal layout does not wrap by default,
and does not support the <code>horizontalWrap</code> property. On Android and iOS <em>prior to</em> Release
2.1.0, the horizontal layout always wraps and the <code>horizontalWrap</code> property is not supported.</p></li>
</ul>
*/
/**
* @property activity
* @type Titanium.Android.Activity
* @readonly
* <p>Reference to the Android Activity object associated with this tab group.</p>
* @description <p>An Activity object is not created until the tab group opens.
Before the tab group opens, <code>activity</code> refers to an empty JavaScript object.
You can set properties on this object but cannot invoke any Activity methods on it.
Once the tab group opens, the actual Activity object is created,
using any properties set on the JavaScript object. At this point, you can call methods
on the activity and access any properties that are set when the activity is created.</p>
<p>Prior to Release 3.4.0, you can only set properties on the activity after the tab group
opens.</p>
* @platform android 3.0.0
*/
/**
* @property [allowUserCustomization=true]
* @type Boolean
* <p>Allow the user to reorder tabs in the tab group using the <strong>Edit</strong> button on the <strong>More</strong>
tab.</p>
* @description <p>Set to <code>false</code> to prevent tab reordering.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [translucent=true on iOS7 and above, false otherwise.]
* @type Boolean
* <p>Boolean value indicating if the nav bar (typically for the <strong>More</strong> tab), is translucent.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property titleAttributes
* @type titleAttributesParams
* <p>Title text attributes of the window to be applied on the <strong>More</strong> tab.</p>
* @description <p>Use this property to specify the color, font and shadow attributes of the title.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [navTintColor=]
* @type String
* <p>The tintColor to apply to the navigation bar (typically for the <strong>More</strong> tab). This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of NavigationBar on iOS.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property editButtonTitle
* @type String
* <p>Title for the edit button on the <strong>More</strong> tab.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [exitOnClose=True if tab group is opened on top of the root activity. False otherwise.]
* @type Boolean
* <p>Boolean value indicating if the application should exit when closing the tab group, whether via Android
back button or the {@link Titanium.UI.TabGroup#method-close close} method.</p>
* @description <p>Starting in 3.4.2 you can set this property at any time. In earlier releases you can only set this as a createTabGroup({...}) option.</p>
* @platform android 0.9
*/
/**
* @property [swipeable=true]
* @type Boolean
* <p>Boolean value indicating if tab navigation can be done by swipes, in addition to tab clicks.</p>
* @description <p>On Android, the tabs may be selected by swipes, in addition to clicks. This property may be set at
tab group creation, or any time later as long as the tab navigation is not disabled.</p>
* @platform android 3.6.0
*/
/**
* @property [smoothScrollOnTabClick=true]
* @type Boolean
* <p>Boolean value indicating if changing pages by tab clicks is animated.</p>
* @description <p>If true, when clicking the tab the page transition is animated, false otherwise.</p>
* @platform android 3.6.0
*/
/**
* @property windowSoftInputMode
* @type Number
* @creationOnly
* <p>Determines how the tab group is treated when a soft input method (such as a virtual keyboard)
is displayed.</p>
* @description <p>For more information see the official Android API Reference,
<a href="http://developer.android.com/reference/android/view/Window.html#setSoftInputMode%28int%29">Window.setSoftInputMode</a>.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_PAN}
<li> {@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_RESIZE}
<li> {@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_UNSPECIFIED}
</ul></p>
* @platform android 0.9
*/
/**
* @property [tabsTintColor=]
* @type String
* <p>The tintColor to apply to the tabs. This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of UITabBar on iOS. This effects the
title and icons rendered in the active tab. When not specified the active icons are tinted with a bright
blue on iOS7.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property unselectedItemTintColor
* @type String
* <p>Unselected items in this tab group will be tinted with this color. Setting this value to null
indicates that the tab group should use its default value instead.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property shadowImage
* @type String
* <p>Image of the shadow placed between the tab bar and the content area.</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>On iOS, requires iOS 6.0 or later; ignored on earlier versions. TabsBackgroundImage
must also be set in order for this to take effect.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property activeTabIconTint
* @type String
* <p>Color applied to active tabs icons, as a color name or hex triplet, where the tab's activeIcon was not defined.</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.
On iOS, requires iOS 5.0 or later; ignored on earlier versions.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property tabDividerColor
* @type String
* <p>Color of the divider between tabs, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform mobileweb 2.0.0
*/
/**
* @property tabDividerWidth
* @type Number/String
* <p>Width of the divider between tabs.</p>
* @description <p>This width is relative to the tabgroup's parent. Can be either a float value or
a dimension string (for example, <code>'50%'</code> or <code>75dp</code>).</p>
* @platform mobileweb 2.0.0
*/
/**
* @property tabHeight
* @type Number/String
* <p>Height of the tabs.</p>
* @description <p>This height is relative to the tabgroup's parent. Can be either a float value or
a dimension string (for example, <code>'50%'</code> or <code>'75dp'</code>).</p>
* @platform mobileweb 2.0.0
*/
/**
* @property [tabsAtBottom=true]
* @type Boolean
* <p>Determines whether the tabs should be positioned at the top rather than the bottom of the
screen.</p>
* @description <p>Set to <code>false</code> to position tabs at the top of the screen.</p>
* @platform mobileweb 2.0.0
*/
/**
* @property activeTab
* @type Titanium.UI.Tab
* <p>Active tab.</p>
*/
/**
* @property barColor
* @type String
* <p>Default navigation bar color (typically for the <strong>More</strong> tab), as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
<p>A value of <code>transparent</code> results in a semi-opaque black bar style.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property tabs
* @type Titanium.UI.Tab[]
* <p>Tabs managed by the tab group.</p>
*/
/**
* @property tabsBackgroundColor
* @type String
* <p>Default background color for inactive tabs, as a color name or hex triplet.</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
<p>A tab's {@link Titanium.UI.Tab#property-backgroundColor backgroundColor} property takes precedence if set.</p>
<p>On iOS 5.0 or later, this property applies to all states and tabs, not just inactive
tabs. Furthermore, the inactive tab icons without activeIcon will be tinted this color;
property is ignored on earlier versions of iOS.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property title
* @type String
* <p>Title for this tabGroup.</p>
* @platform android 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @property tabsBackgroundImage
* @type String
* <p>Default background image for tabs.</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @description <p>On Mobile Web, a tab's {@link Titanium.UI.Tab#property-backgroundImage backgroundImage} property takes precedence if set.</p>
<p>On iOS, requires iOS 5.0 or later; ignored on earlier versions.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property tabsBackgroundDisabledColor
* @type String
* <p>Default background disabled color for tabs, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>A tab's {@link Titanium.UI.Tab#property-backgroundDisabledColor backgroundDisabledColor} property takes
precedence if set.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property tabsBackgroundDisabledImage
* @type String
* <p>Default background disabled image for tabs.</p>
* @description <p>A tab's {@link Titanium.UI.Tab#property-backgroundDisabledImage backgroundDisabledImage} property takes
precedence if set.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property tabsBackgroundFocusedColor
* @type String
* <p>Default background focused color for tabs, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>A tab's {@link Titanium.UI.Tab#property-backgroundFocusedColor backgroundFocusedColor} property takes
precedence if set.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property tabsBackgroundFocusedImage
* @type String
* <p>Default background focused image for tabs.</p>
* @description <p>A tab's {@link Titanium.UI.Tab#property-backgroundFocusedImage backgroundFocusedImage} property takes
precedence if set.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property tabsBackgroundSelectedColor
* @type String
* <p>Default background selected color for tabs, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
<p>A tab's {@link Titanium.UI.Tab#property-backgroundSelectedColor backgroundSelectedColor} property takes
precedence if set.</p>
* @platform android 3.0.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property tabsBackgroundSelectedImage
* @type String
* <p>Default background selected image for tabs.</p>
* @description <p>A tab's {@link Titanium.UI.Tab#property-backgroundSelectedImage backgroundSelectedImage} property takes
precedence if set.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property activeTabBackgroundColor
* @type String
* <p>Default background color for the active tab, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
<p>A tab's {@link Titanium.UI.Tab#property-backgroundColor backgroundColor} property takes precedence if set.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property activeTabBackgroundImage
* @type String
* <p>Default background image for the active tab.</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @description <p>On Mobile Web, a tab's {@link Titanium.UI.Tab#property-backgroundImage backgroundImage} property takes precedence if set.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property activeTabBackgroundDisabledColor
* @type String
* <p>Default background disabled color for the active tab, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>A tab's {@link Titanium.UI.Tab#property-backgroundDisabledColor backgroundDisabledColor} property takes
precedence if set.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property activeTabBackgroundDisabledImage
* @type String
* <p>Default background disabled image for the active tab.</p>
* @description <p>A tab's {@link Titanium.UI.Tab#property-backgroundDisabledImage backgroundDisabledImage} property takes
precedence if set.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property activeTabBackgroundFocusedColor
* @type String
* <p>Default background focused color for the active tab, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>A tab's {@link Titanium.UI.Tab#property-backgroundFocusedColor backgroundFocusedColor} property takes
precedence if set.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property activeTabBackgroundFocusedImage
* @type String
* <p>Default background focused image for the active tab.</p>
* @description <p>A tab's {@link Titanium.UI.Tab#property-backgroundFocusedImage backgroundFocusedImage} property takes
precedence if set.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property activeTabBackgroundSelectedColor
* @type String
* <p>Default background selected color for the active tab, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>A tab's {@link Titanium.UI.Tab#property-backgroundSelectedColor backgroundSelectedColor} property takes
precedence if set.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property activeTabBackgroundSelectedImage
* @type String
* <p>Default background selected image for the active tab.</p>
* @description <p>A tab's {@link Titanium.UI.Tab#property-backgroundSelectedImage backgroundSelectedImage} property takes
precedence if set.</p>
* @platform mobileweb 2.0.0
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.UI.TabbedBar
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TabbedBar.yml
* <p>A button bar that maintains a selected state.</p>
* @deprecated 1.8.0 Use <Titanium.UI.iOS.TabbedBar> instead.
* @description <p>A tabbed bar is a button bar that
maintains a state (visually distinguished as a pressed or selected look).
It is closely related to the <code>ButtonBar</code> control. See the description of
{@link Titanium.UI.ButtonBar ButtonBar} for information on styling tabbed bars and buttons
bars.</p>
<p>Use the {@link Titanium.UI#method-createTabbedBar} method to create a Tabbed Bar.</p>
* <h3>Examples</h3>
<h4>Simple Tabbed Bar with 3 items</h4>
<pre><code>var bb1 = Ti.UI.createTabbedBar({
labels: ['One', 'Two', 'Three'],
backgroundColor: '#336699',
style: Ti.UI.iOS.SystemButtonStyle.BAR,
width: 200,
height: 25,
top: 50
});
win.add(bb1);</code></pre>
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event click
* <p>Fired when a button is clicked.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} index
<p>Index of the clicked button.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getIndex
* <p>Gets the value of the {@link Titanium.UI.TabbedBar#property-index} property.</p>
* @returns {Number}
*/
/**
* @method setIndex
* <p>Sets the value of the {@link Titanium.UI.TabbedBar#property-index} property.</p>
* @param {Number} index
<p>New value for the property.</p>
*/
/**
* @method getLabels
* <p>Gets the value of the {@link Titanium.UI.TabbedBar#property-labels} property.</p>
* @returns {String[]/BarItemType[]}
*/
/**
* @method setLabels
* <p>Sets the value of the {@link Titanium.UI.TabbedBar#property-labels} property.</p>
* @param {Array<String>/Array<BarItemType>} labels
<p>New value for the property.</p>
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.UI.TabbedBar#property-style} property.</p>
* @returns {Number}
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.UI.TabbedBar#property-style} property.</p>
* @param {Number} style
<p>New value for the property.</p>
*/
/**
* @property index
* @type Number
* <p>Index of the currently selected button.</p>
*/
/**
* @property labels
* @type String[]/BarItemType[]
* <p>Array of labels for the tabbed bar.</p>
* @description <p>The labels can be specified either using an array of strings, in which case
each string defines the title for a button, or using an array of simple
dictionary objects, {@link BarItemType}, which can specify title, image, width and
enabled state for each button.</p>
*/
/**
* @property [style=Titanium.UI.iOS.SystemButtonStyle.PLAIN]
* @type Number
* <p>Style of the tabbed bar.</p>
* @description <p>Specify one of the constants defined in
{@link Titanium.UI.iOS.SystemButtonStyle Titanium.UI.iOS.SystemButtonStyle},
either <code>PLAIN</code>, <code>BORDERED</code>, or <code>BAR</code>.</p>
<p>The <code>BAR</code> style specifies a more compact style and allows the bar's background
color or gradient to show through.</p>
*/
/**
* @class Titanium.UI.TableView
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TableView.yml
* <p>A table view is used to present information, organized in sections and rows, in a
vertically-scrolling view.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/tableview/tableview_android.png" height="200" style="border: 1px solid black;" /></td>
<td><img src="images/tableview/tableview_ios.png" height="200" style="border: 1px solid black;" /></td>
<td><img src="images/tableview/tableview_mobileweb.png" height="200" style="border: 1px solid black;" /></td>
<td><img src="images/tableview/tableview_wp.png" height="200" style="border: 1px solid black;" /></td>
</tr>
<tr><th>Android</th><th>iOS</th><th>Mobile Web</th><th>Windows Phone</th></tr>
</table>
<p>A <code>TableView</code> object is a container for {@link Titanium.UI.TableViewSection TableViewSection}
objects that are, in turn, containers for {@link Titanium.UI.TableViewRow TableViewRow} objects. </p>
<p>Use the {@link Titanium.UI#method-createTableView} method or <strong><code><TableView></code></strong> Alloy element to create a <code>TableView</code>.</p>
<p>Also see the <a href="http://docs.appcelerator.com/platform/latest/#!/guide/TableViews">TableViews guide</a>.</p>
<h4>Creating Tables</h4>
<p>There are few approaches to creating and using <code>TableView</code> object.</p>
<p>The simplest approach is to pass dictionaries of <code>TableViewRow</code> properties, such as
{@link Titanium.UI.TableViewRow#property-backgroundColor backgroundColor},
{@link Titanium.UI.TableViewRow#property-color color}, and {@link Titanium.UI.TableViewRow#property-title title}, to the
{@link Titanium.UI#method-createTableView createTableView} method, which causes the rows to be implictly
created, added to a single {@link Titanium.UI.TableViewSection TableViewSection}, and then added to
the <code>TableView</code>. Refer to the "Simple Table View with Basic Rows" example.</p>
<p>For more control over the layout of each row, however, {@link Titanium.UI.TableViewRow TableViewRow}
objects can be created explicitly using the {@link Titanium.UI#method-createTableViewRow} method. Child views,
such as {@link Titanium.UI.Label labels}, {@link Titanium.UI.ImageView images}, and
{@link Titanium.UI.Button buttons}, may be added to each row. When one or more
{@link Titanium.UI.TableViewRow rows} are added to the table view,
a single {@link Titanium.UI.TableViewSection TableViewSection} is automatically created to hold the
rows. See the "Table View with Composite Layout" example.</p>
<p>Lastly, sets of rows may be explicitly created and added to a their own
{@link Titanium.UI.TableViewSection TableViewSection} objects, which are then added to a <code>TableView</code>,
to enable the rows to be organized. Headers and footers titles or views must be configured
in order for the sections to be visible.</p>
<h4>Tables and Scroll Views</h4>
<p>As a table view inherently scrolls, it creates a very poor user experience when one contains
other scrolling views, such as a {@link Titanium.UI.ScrollableView ScrollableView} or
{@link Titanium.UI.TextArea TextArea}. Thus, this layout is strongly discouraged. </p>
<h4>TextFields in Tables with SOFT_INPUT_ADJUST_PAN (Android)</h4>
<p>When a {@link Titanium.UI.TextField TextField} is placed in a row near the bottom of a <code>TableView</code>,
in a window that is configured with
{@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_PAN SOFT_INPUT_ADJUST_PAN}, it is expected for the
text field to automatically move to a visible position after it is focused and the software
keyboard displayed. However, due to a known problem caused by native Android's ListView behavior,
the keyboard is likely to completely obscure the text field. </p>
<p>To mitigate this, a <code>ScrollView</code> may be used instead of a table view, as demonstrated in the
{@link Titanium.UI.ScrollView ScrollView}, "Scroll View as a Table View", example. </p>
<h4>Known Issues</h4>
<p>There are known issues with the <code>sections</code> property and associated methods added in
Release 3.0:</p>
<ul>
<li><p>On iOS, the first two arguments to the <code>updateSection</code> method are reversed.
(<a href="https://jira.appcelerator.org/browse/TIMOB-12625">TIMOB-12625</a>). This issue has been
addressed in Release 3.3.0 of the Titanium SDK</p></li>
<li><p>On Mobile Web, click events fail to fire after calling the <code>updateSection</code> method.
(<a href="https://jira.appcelerator.org/browse/TIMOB-12630">TIMOB-12630</a>)</p></li>
</ul>
<h4>Row Editing and Moving Modes (iOS only)</h4>
<p>On iOS, table views have an <code>editing</code> and a <code>moving</code> mode that may be activated to using their
respective {@link Titanium.UI.TableView#property-editing editing} and {@link Titanium.UI.TableView#property-moving moving}
properties. These allow rows to be deleted or re-ordered by the user, depending on each row's
{@link Titanium.UI.TableViewRow#property-editable editable} and {@link Titanium.UI.TableViewRow#property-moveable moveable}
property that are either explicitly set or inherited from the table.</p>
<p>There are two UI controls available for deleting table view rows, depending on the combination
of editing and moving modes enabled:</p>
<ul>
<li>"red icon delete" - a circular red icon is displayed on the left-hand side of a row, which
reveals a delete button on the right-hand side of that row when clicked.</li>
<li>"swipe delete" - without either of the table editing or moving modes enabled, a left or right
swipe gesture on a row reveals a delete button on the right-hand side of the row.</li>
</ul>
<p>Note that because the operating system handles the functionality of the swipe delete, the OS will
capture swipe events and not bubble the event to Titanium listeners. As such, if you rely on
swipe events, you must not set editing to true on such rows, and simulate the functionality you
need.</p>
<p>When <code>editable</code> and <code>moveable</code> properties are set on the table view, they are known as <code>inherited</code>,
whereas when set on a row, they are known as <code>explicit</code>. As their resulting behavior may not
follow their literal meaning, depending on the combination of <code>editing</code> and <code>moving</code> modes that
are enabled, a detailed description of the behavior follows.</p>
<p>With <code>editing:false</code> and <code>moving:true</code>:</p>
<ul>
<li>For red icon delete and swipe delete, inherited and explicit <code>editable</code> properties may be set.</li>
<li>Inherited <code>moveable</code> property is always <code>true</code>. Explicit <code>moveable</code> property may be set.</li>
</ul>
<p>With <code>editing:true</code> and <code>moving:false</code>:</p>
<ul>
<li>For red icon delete and swipe delete, inherited <code>editable</code> property is always <code>true</code>. Explicit
<code>editable</code> property may be set.</li>
<li>Inherited and explicit <code>moveable</code> properties may be set.</li>
</ul>
<p>With <code>editing:false</code> and <code>moving: false</code>:</p>
<ul>
<li>For red icon delete, inherited and explicit <code>editable</code> properties always <code>false</code>. For
swipe delete, inherited and explicit <code>editable</code> properties may be set.</li>
<li>Inherited <code>moveable</code> property is always <code>false</code>.</li>
</ul>
<p>With <code>editing:true</code> and <code>moving:true</code>:</p>
<ul>
<li>For red icon delete and swipe delete, inherited and explicit <code>editable</code> properties may be set.</li>
<li>Inherited <code>moveable</code> property is always <code>true</code>. Explicit <code>moveable</code> property may be set.</li>
</ul>
* <h3>Examples</h3>
<h4>Simple Table View</h4>
<p>Create a basic table view.</p>
<pre><code>Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow();
var tableData = [ {title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'} ];
var table = Ti.UI.createTableView({
data: tableData
});
win.add(table);
win.open();
</code></pre><h4>Table View Sections</h4>
<p>Create a table with three sections, each with two rows. Add two sections to the table
before and one after it is rendered. This sample only works on Release 3.0 and later.</p>
<pre><code>Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow();
var sectionFruit = Ti.UI.createTableViewSection({ headerTitle: 'Fruit' });
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Apples' }));
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Bananas' }));
var sectionVeg = Ti.UI.createTableViewSection({ headerTitle: 'Vegetables' });
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Carrots' }));
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Potatoes' }));
var table = Ti.UI.createTableView({
data: [sectionFruit, sectionVeg]
});
win.add(table);
win.open();
var sectionFish = Ti.UI.createTableViewSection({ headerTitle: 'Fish' });
sectionFish.add(Ti.UI.createTableViewRow({ title: 'Cod' }));
sectionFish.add(Ti.UI.createTableViewRow({ title: 'Haddock' }));
// Prior to Release 3.0, you can only add and remove sections by setting the data property
// table.data = [ sectionFish, sectionFruit, sectionVeg ];
// Due to a known issue, TIMOB-12616, the section access methods and sections
// property should not be used on iOS with Release 3.0.x.
table.insertSectionBefore(0, sectionFish);
</code></pre><h4>Table View with Composite Layout</h4>
<p>Create a table of rows that contain a custom child-view layout.</p>
<pre><code>Ti.UI.setBackgroundColor('#000');
var win = Ti.UI.createWindow({
backgroundColor: 'black',
exitOnClose: true,
fullscreen: false,
title: 'TableView Demo'
});
// generate random number, used to make each row appear distinct for this example
function randomInt(max){
return Math.floor(Math.random() * max) + 1;
}
var IMG_BASE = 'https://github.com/appcelerator/titanium_mobile/raw/master/demos/KitchenSink/Resources/images/';
var defaultFontSize = Ti.Platform.name === 'android' ? 16 : 14;
var tableData = [];
for (var i=1; i<=20; i++){
var row = Ti.UI.createTableViewRow({
className:'forumEvent', // used to improve table performance
selectedBackgroundColor:'white',
rowIndex:i, // custom property, useful for determining the row during events
height:110
});
var imageAvatar = Ti.UI.createImageView({
image: IMG_BASE + 'custom_tableview/user.png',
left:10, top:5,
width:50, height:50
});
row.add(imageAvatar);
var labelUserName = Ti.UI.createLabel({
color:'#576996',
font:{fontFamily:'Arial', fontSize:defaultFontSize+6, fontWeight:'bold'},
text:'Fred Smith ' + i,
left:70, top: 6,
width:200, height: 30
});
row.add(labelUserName);
var labelDetails = Ti.UI.createLabel({
color:'#222',
font:{fontFamily:'Arial', fontSize:defaultFontSize+2, fontWeight:'normal'},
text:'Replied to post with id ' + randomInt(1000) + '.',
left:70, top:44,
width:360
});
row.add(labelDetails);
var imageCalendar = Ti.UI.createImageView({
image:IMG_BASE + 'custom_tableview/eventsButton.png',
left:70, bottom: 2,
width:32, height: 32
});
row.add(imageCalendar);
var labelDate = Ti.UI.createLabel({
color:'#999',
font:{fontFamily:'Arial', fontSize:defaultFontSize, fontWeight:'normal'},
text:'on ' + randomInt(30) + ' Nov 2012',
left:105, bottom:10,
width:200, height:20
});
row.add(labelDate);
tableData.push(row);
}
var tableView = Ti.UI.createTableView({
backgroundColor:'white',
data:tableData
});
win.add(tableView);
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous table view sections example as an Alloy view.</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white">
<TableView id="table">
<TableViewSection id="sectionFruit" headerTitle="Fruit">
<TableViewRow title="Apple"/>
<TableViewRow title="Bananas"/>
</TableViewSection>
<TableViewSection id="sectionVeg" headerTitle="Vegetables">
<TableViewRow title="Carrots"/>
<TableViewRow title="Potatoes"/>
</TableViewSection>
<TableViewSection id="sectionFish" headerTitle="Fish">
<TableViewRow title="Cod"/>
<TableViewRow title="Haddock"/>
</TableViewSection>
</TableView>
</Window>
</Alloy>
</code></pre>
*/
/**
* @event pinch
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event swipe
* <p>Fired when the device detects a swipe gesture (left or right) against the view.</p>
* @param {String} direction
<p>Direction of the swipe, either <code>left</code> or <code>right</code>.</p>
* @param {Number} index
<p>Row index.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Table view row object.</p>
* @param {Dictionary<Titanium.UI.TableViewRow>} rowData
<p>Properties of the row.</p>
<p>When the row is created implicitly using a JavaScript dictionary object,
use this property rather than <code>row</code> to access any custom row properties.</p>
<p>Here's an example of creating a row implicitly, which is not the recommended way.</p>
<pre><code>var data = [{title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff', special:'special 1'},];
var table = Ti.UI.createTableView({data: data});
</code></pre>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 1.8.2
*/
/**
* @event twofingertap
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchmove
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event touchstart
* <p>Fired as soon as the device detects a touch gesture against this view.</p>
* @description <p>On Android and iOS, be aware that a row or table touch event and a table
{@link Titanium.UI.TableView#event-scroll scroll} event cannot occur concurrently. If a table begins
to scroll during a touch event, the appropriate row or table <code>touchcancel</code> event fire
before the <code>scroll</code> event begins.</p>
<p>On Mobile Web, a scroll may occur in the middle of a touch, in which case a <code>touchend</code>
will fire immediately following the scroll.</p>
* @param {Number} index
<p>Row index.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Table view row object.</p>
* @param {Dictionary<Titanium.UI.TableViewRow>} rowData
<p>Properties of the row.</p>
<p>When the row is created implicitly using a JavaScript dictionary object,
use this property rather than <code>row</code> to access any custom row properties.</p>
<p>Here's an example of creating a row implicitly, which is not the recommended way.</p>
<pre><code>var data = [{title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff', special:'special 1'},];
var table = Ti.UI.createTableView({data: data});
</code></pre>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchcancel
* <p>Fired when a touch gesture is interrupted by the device.</p>
* @description <p>Generated in various circumstances, including an incoming call to allow the UI to clean
up state.</p>
<p>On Android and iOS, be aware that a row or table touch event and a table
{@link Titanium.UI.TableView#event-scroll scroll} event cannot occur concurrently. If a table begins
to scroll during a touch event, the appropriate row or table <code>touchcancel</code> event fire
before the <code>scroll</code> event begins.</p>
<p>On Mobile Web, a scroll may occur in the middle of a touch, in which case a <code>touchend</code>
will fire immediately following the scroll.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchend
* <p>Fired when a touch gesture is complete.</p>
* @description <p>On Android and iOS, be aware that a row or table touch event and a table
{@link Titanium.UI.TableView#event-scroll scroll} event cannot occur concurrently. If a table begins
to scroll during a touch event, the appropriate row or table <code>touchcancel</code> event fire
before the <code>scroll</code> event begins.</p>
<p>On Mobile Web, a scroll may occur in the middle of a touch, in which case a <code>touchend</code>
will fire immediately following the scroll.</p>
* @param {Number} index
<p>Row index.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Table view row object.</p>
* @param {Dictionary<Titanium.UI.TableViewRow>} rowData
<p>Properties of the row.</p>
<p>When the row is created implicitly using a JavaScript dictionary object,
use this property rather than <code>row</code> to access any custom row properties.</p>
<p>Here's an example of creating a row implicitly, which is not the recommended way.</p>
<pre><code>var data = [{title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff', special:'special 1'},];
var table = Ti.UI.createTableView({data: data});
</code></pre>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event click
* <p>Fired when a table row is clicked by the user.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Boolean} detail
<p>Indicates whether the detail button was clicked. Only <code>true</code> if <code>row.hasDetail</code> is
<code>true</code> and the detail button was clicked.</p>
* @param {Number} index
<p>Row index.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Table view row object.</p>
* @param {Dictionary<Titanium.UI.TableViewRow>} rowData
<p>Properties of the row.</p>
<p>When the row is created implicitly using a JavaScript dictionary object,
use this property rather than <code>row</code> to access any custom row properties.</p>
<p>Here's an example of creating a row implicitly, which is not the recommended way.</p>
<pre><code>var data = [{title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff', special:'special 1'},];
var table = Ti.UI.createTableView({data: data});
</code></pre>
* @param {Boolean} searchMode
<p>Indicates whether the table is in search mode.</p>
* @param {Titanium.UI.TableViewSection} section
<p>Table view section object, if the clicked row is contained in a section.</p>
* @param {Number} (mobileweb iphone ipad) x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} (mobileweb iphone ipad) y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event dblclick
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event singletap
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} index
<p>Row index.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Table view row object.</p>
* @param {Dictionary<Titanium.UI.TableViewRow>} rowData
<p>Properties of the row.</p>
<p>When the row is created implicitly using a JavaScript dictionary object,
use this property rather than <code>row</code> to access any custom row properties.</p>
<p>Here's an example of creating a row implicitly, which is not the recommended way.</p>
<pre><code>var data = [{title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff', special:'special 1'},];
var table = Ti.UI.createTableView({data: data});
</code></pre>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event doubletap
* <p>Fired when the device detects a double tap against this view.</p>
* @param {Number} index
<p>Row index.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Table view row object.</p>
* @param {Dictionary<Titanium.UI.TableViewRow>} rowData
<p>Properties of the row.</p>
<p>When the row is created implicitly using a JavaScript dictionary object,
use this property rather than <code>row</code> to access any custom row properties.</p>
<p>Here's an example of creating a row implicitly, which is not the recommended way.</p>
<pre><code>var data = [{title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff', special:'special 1'},];
var table = Ti.UI.createTableView({data: data});
</code></pre>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event longpress
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} index
<p>Row index.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Table view row object.</p>
* @param {Dictionary<Titanium.UI.TableViewRow>} rowData
<p>Properties of the row.</p>
<p>When the row is created implicitly using a JavaScript dictionary object,
use this property rather than <code>row</code> to access any custom row properties.</p>
<p>Here's an example of creating a row implicitly, which is not the recommended way.</p>
<pre><code>var data = [{title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff', special:'special 1'},];
var table = Ti.UI.createTableView({data: data});
</code></pre>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @event focus
* @hide
* <p>Fired when the view element gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event delete
* <p>Fired when a table row is deleted by the user.</p>
* @param {Boolean} detail
<p>Indicates whether the delete button was clicked. Always <code>false</code> for this event.</p>
* @param {Number} index
<p>Row index.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Table view row object.</p>
* @param {Dictionary<Titanium.UI.TableViewRow>} rowData
<p>Properties of the row. Use this property rather than <code>row</code> to access any custom row
properties.</p>
* @param {Boolean} searchMode
<p>Indicates whether the table is in search mode. Always <code>false</code> for this event.</p>
* @param {Titanium.UI.TableViewSection} section
<p>Table view section object, if the deleted row is contained in a section.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event indexclick
* <p>Fired when the index bar is clicked by the user.</p>
* @description <p>If the tabe view contains the {@link Titanium.UI.TableView#property-index index} array of indices the index bar will appear on the side.
This event will fire when this bar is clicked </p>
* @param {String} title
<p>The title of the index clicked.</p>
* @param {Number} index
<p>The index number clicked.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @event move
* <p>Fired when a table row is moved by the user.</p>
* @param {Boolean} detail
<p>Boolean to indicate if the right area was clicked. Always <code>false</code> for this event.</p>
* @param {Number} index
<p>Row index.</p>
* @param {Boolean} searchMode
<p>Boolean to indicate if the table is in search mode. Always <code>false</code> for this event.</p>
* @param {Titanium.UI.TableViewSection} section
<p>Table view section object, if the deleted row is contained in a section.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Table view row object.</p>
* @param {Dictionary<Titanium.UI.TableViewRow>} rowData
<p>Properties of the row. Use this property rather than <code>row</code> to access any custom row
properties.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @event scroll
* <p>Fired when the table view is scrolled.</p>
* @param {Point} (iphone ipad mobileweb) contentOffset
<p>Dictionary with <code>x</code> and <code>y</code> properties containing the content offset.</p>
* @param {Dictionary} (iphone ipad mobileweb) contentSize
<p>Dictionary with <code>width</code> and <code>height</code> properties containing the size of the content
(regardless of the display size in the case of scrolling).</p>
* @param {Number} (android mobileweb) firstVisibleItem
<p>Row index of the topmost visible row in the view.</p>
* @param {Dictionary} size
<p>Dictionary with <code>width</code> and <code>height</code> properties containing the size of the visible
table view</p>
* @param {Number} (android mobileweb) totalItemCount
<p>Total number of rows in the view.</p>
* @param {Number} (android mobileweb) visibleItemCount
<p>Number of rows currently visible in the view.</p>
* @param {Number} (mobileweb) x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} (mobileweb) y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event scrollEnd
* <p>Fired when the table view stops scrolling.</p>
* @deprecated 3.0.0 Use <Titanium.UI.TableView.scrollend> instead.
* @param {Dictionary} (iphone ipad mobileweb) contentSize
<p>Dictionary with <code>width</code> and <code>height</code> properties containing the size of the content
(regardless of the display size in the case of scrolling).</p>
* @param {Point} (iphone ipad mobileweb) contentOffset
<p>Dictionary with <code>x</code> and <code>y</code> properties containing the content offset.</p>
* @param {Dictionary} size
<p>Dictionary with <code>width</code> and <code>height</code> properties containing the size of the visible
table view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event scrollend
* <p>Fired when the table view stops scrolling.</p>
* @param {Dictionary} (iphone ipad mobileweb) contentSize
<p>Dictionary with <code>width</code> and <code>height</code> properties containing the size of the content
(regardless of the display size in the case of scrolling).</p>
* @param {Point} (iphone ipad mobileweb) contentOffset
<p>Dictionary with <code>x</code> and <code>y</code> properties containing the content offset.</p>
* @param {Dictionary} size
<p>Dictionary with <code>width</code> and <code>height</code> properties containing the size of the visible
table view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
*/
/**
* @event dragStart
* <p>Fired when the scrollable region starts being dragged.</p>
* @deprecated 3.0.0 Use <Titanium.UI.TableView.dragstart> instead.
* @description <p>A dragging gesture is when a touch remains in contact with the display to physically drag
the view, as opposed to it being the result of scrolling momentum.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event dragEnd
* <p>Fired when the scrollable region stops being dragged.</p>
* @deprecated 3.0.0 Use <Titanium.UI.TableView.dragend> instead.
* @description <p>A dragging gesture is when a touch remains in contact with the display to physically drag
the view, as opposed to it being the result of scrolling momentum.</p>
* @param {Boolean} decelerate
<p>Indicates whether scrolling will continue but decelerate, now that the drag gesture has
been released by the touch. If <code>false</code>, scrolling will stop immediately.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event dragstart
* <p>Fired when the scrollable region starts being dragged.</p>
* @description <p>A dragging gesture is when a touch remains in contact with the display to physically drag
the view, as opposed to it being the result of scrolling momentum.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
*/
/**
* @event dragend
* <p>Fired when the scrollable region stops being dragged.</p>
* @description <p>A dragging gesture is when a touch remains in contact with the display to physically drag
the view, as opposed to it being the result of scrolling momentum.</p>
* @param {Boolean} decelerate
<p>Indicates whether scrolling will continue but decelerate, now that the drag gesture has
been released by the touch. If <code>false</code>, scrolling will stop immediately.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
*/
/**
* @method setContentInsets
* <p>Sets this tableview's content insets.</p>
* @description <p>A table view is essentially a scroll view that contains a set of static row views that
represents the content. Thus, the <code>setContentInsets</code> method facilitates a margin, or inset,
distance between the content and the container scroll view.</p>
<p>Typically used with the {@link Titanium.UI.TableView#property-headerPullView headerPullView} property.</p>
* @param {TableViewEdgeInsets} edgeInsets
<p>Dictionary to describe the insets.</p>
* @param {TableViewContentInsetOption} animated (optional)
<p>Determines whether, and how, the content inset change should be animated.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method setContentOffset
* <p>Sets the value of the content offset of the table view without animation by default.</p>
* @param {Dictionary} contentOffset
<p>Dictionary with the properties <code>x</code>, <code>y</code>, and <code>animated</code>. The <code>x</code> and <code>y</code> coordinates
reposition the top-left point of the scrollable region of the table view.
The <code>animated</code> property is optional and set to <code>false</code> by default. </p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
* @method setHeaderPullView
* <p>Sets the value of the [Titanium.UI.TableView.headerPullView] property.</p>
* @param {Titanium.UI.View} view
<p>View to display.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method setData
* <p>Sets the data in the table.</p>
* @description <p>Each row can be passed as a {@link Titanium.UI.TableViewRow TableViewRow} object, or as
dictionary specifying the properties for a table row, in which case this <code>TableView</code> will
create <code>TableViewRow</code> objects as needed. </p>
<p><code>setData</code> can also be used to add {@link Titanium.UI.TableViewSection TableViewSection}s to a
table view.</p>
* @param {Array<Titanium.UI.TableViewRow>/Array<Dictionary<Titanium.UI.TableViewRow>>/Array<Titanium.UI.TableViewSection>} data
<p>Rows or sections to add to this table.</p>
* @param {TableViewAnimationProperties} animation
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method appendRow
* <p>Appends a single row or an array of rows to the end of the table.</p>
* @description <p>Each row can be passed as a {@link Titanium.UI.TableViewRow TableViewRow} object, or as
dictionary specifying the properties for a table row, in which case this <code>TableView</code> will
create <code>TableViewRow</code> objects as needed. </p>
<p>On iOS, the row(s) can be inserted with animation by specifying a <code>properties</code> parameter.</p>
* @param {Titanium.UI.TableViewRow/Dictionary<Titanium.UI.TableViewRow>/Array<Titanium.UI.TableViewRow>/Array<Dictionary<Titanium.UI.TableViewRow>>} row
<p>Row or rows to add to the table.</p>
* @param {TableViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method appendSection
* <p>Appends a single section or an array of sections to the end of the table.</p>
* @description <p>Each section can be passed as a {@link Titanium.UI.TableViewSection TableViewSection} object, or as
dictionary specifying the properties for a table section, in which case this <code>TableView</code> will
create <code>TableViewSection</code> objects as needed. </p>
<p>On iOS, the section(s) can be inserted with animation by specifying a <code>properties</code> parameter.</p>
<p>Due to a known issue, TIMOB-12616, this method should not be used for adding sections on iOS.</p>
* @param {Titanium.UI.TableViewSection/Dictionary<Titanium.UI.TableViewSection>/Array<Titanium.UI.TableViewSection>/Array<Dictionary<Titanium.UI.TableViewSection>>} section
<p>Section or section to add to the table.</p>
* @param {TableViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method deleteRow
* <p>Deletes an existing row.</p>
* @description <p>On iOS, the row can be deleted with animation by specifying a <code>properties</code> parameter.
Starting in SDK 3.1.0, the row can be specified using {@link Titanium.UI.TableViewRow} on Android and iOS.</p>
* @param {Number/Titanium.UI.TableViewRow} row
<p>Index of the row to delete, or the row object to delete.</p>
* @param {TableViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method deleteSection
* <p>Deletes an existing section.</p>
* @description <p>On iOS, the section can be deleted with animation by specifying a <code>properties</code> parameter.</p>
* @param {Number} section
<p>Index of the section to delete.</p>
* @param {TableViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method insertRowAfter
* <p>Inserts a row after another row.</p>
* @description <p>Each row can be passed as a {@link Titanium.UI.TableViewRow TableViewRow} object, or as
dictionary specifying the properties for a table row, in which case this <code>TableView</code> will
create <code>TableViewRow</code> objects as needed. </p>
<p>On iOS, the row(s) may be inserted with animation by setting the <code>animation</code> parameter.</p>
* @param {Number} index
<p>Index of the row to insert after.</p>
* @param {Titanium.UI.TableViewRow/Dictionary<Titanium.UI.TableViewRow>} row
<p>Row to insert.</p>
* @param {TableViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method insertSectionAfter
* <p>Inserts a section after another section.</p>
* @description <p>Each section can be passed as a {@link Titanium.UI.TableViewSection TableViewSection} object, or as
dictionary specifying the properties for a table section, in which case this <code>TableView</code> will
create <code>TableViewSection</code> objects as needed. </p>
<p>On iOS, the section(s) may be inserted with animation by setting the <code>animation</code> parameter.</p>
<p>Due to a known issue, TIMOB-12616, this method should not be used for adding sections on iOS.</p>
* @param {Number} index
<p>Index of the section to insert after.</p>
* @param {Titanium.UI.TableViewSection/Dictionary<Titanium.UI.TableViewSection>} section
<p>section to insert.</p>
* @param {TableViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method insertRowBefore
* <p>Inserts a row before another row.</p>
* @description <p>Each row can be passed as a {@link Titanium.UI.TableViewRow TableViewRow} object, or as
dictionary specifying the properties for a table row, in which case this <code>TableView</code> will
create <code>TableViewRow</code> objects as needed. </p>
<p>On iOS, the row(s) may be inserted with animation by setting the <code>animation</code> parameter.</p>
* @param {Number} index
<p>Index of the row to insert before.</p>
* @param {Titanium.UI.TableViewRow/Dictionary<Titanium.UI.TableViewRow>} row
<p>Row to insert.</p>
* @param {TableViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method insertSectionBefore
* <p>Inserts a section before another section.</p>
* @description <p>Each section can be passed as a {@link Titanium.UI.TableViewSection TableViewSection} object, or as
dictionary specifying the properties for a table section, in which case this <code>TableViewSection</code> will
create <code>TableViewSection</code> objects as needed. </p>
<p>On iOS, the section(s) may be inserted with animation by setting the <code>animation</code> parameter.</p>
<p>Due to a known issue, TIMOB-12616, this method should not be used for adding sections on iOS.</p>
* @param {Number} index
<p>Index of the section to insert before.</p>
* @param {Titanium.UI.TableViewSection/Dictionary<Titanium.UI.TableViewSection>} section
<p>section to insert.</p>
* @param {TableViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method scrollToIndex
* <p>Scrolls the table view to ensure that the specified row is on screen.</p>
* @description <p>On iOS, specify a {@link TableViewAnimationProperties} object to control the position that
the selected row is scrolled to, and whether scrolling is animated.</p>
* @param {Number} index
<p>Row index to scroll to.</p>
* @param {TableViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method scrollToTop
* <p>Scrolls the table to a specific top position where 0 is the topmost y position in the
table view.</p>
* @description <p>The behavior of this method is platform-specific.</p>
<p>On Android, the <code>top</code> value is interpreted as a row index that should be scrolled
to the top of the screen. The table will not scroll the last row of data higher than
the bottom of the screen. If there is less than one screenful of data below the
specified row, the table doesn't scroll the specified row all the way to the top.
If the table has less than one screenful of data total, it does not scroll at all.</p>
<p>On iOS, the <code>top</code> value is interpreted as a pixel offset between the top of the top
row of data and the top of the table view. So a <code>top</code> value of 0 scrolls the list to
the top. A positive value scrolls it down, and a negative value scrolls the list up
above the first item.</p>
<p>On Mobile Web, the <code>top</code> value is interpreted as a pixel offset between the top of the top
row of data and the top of the table view. So a <code>top</code> value of 0 scrolls the list to
the top. A positive value scrolls it down. Values outside the scrollable range are clipped
so that negative numbers scroll the list to the top, and large positive values scroll the
list to the bottom.</p>
<p>On iOS, specify a {@link TableViewAnimationProperties} object with <code>animated</code> set to <code>false</code> to
disable the scrolling animation.</p>
* @param {Number} top
<p>Y position for the top of the table view.</p>
* @param {TableViewAnimationProperties} animation (optional)
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method selectRow
* <p>Programmatically selects a row. In Android, it sets the currently selected item. If in touch mode,
the item will not be selected but it will still be positioned appropriately. If the specified
selection position is less than 0, then the item at position 0 will be selected.</p>
* @param {Number} row
<p>Row index to select.</p>
* @platform android 3.0.0
* @platform iphone 1.8.2
* @platform ipad 1.8.2
* @platform windowsphone 4.1.0
*/
/**
* @method deselectRow
* <p>Programmatically deselects a row.</p>
* @param {Number} row
<p>Row index to deselect.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method updateRow
* <p>Updates an existing row, optionally with animation.</p>
* @param {Number} index
<p>Index of the row to update.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Row data to update.</p>
* @param {TableViewAnimationProperties} animation
<p>Animation properties. (iOS only.)</p>
*/
/**
* @method updateSection
* <p>Updates an existing section, optionally with animation.</p>
* @description <p>Known issues:</p>
<ul>
<li>On iOS and Mobile Web, event listeners do not fire correctly after table view sections are
updated using the <code>updateSection</code> methods.
(<a href="https://jira.appcelerator.org/browse/TIMOB-12616">TIMOB-12616</a>,
<a href="https://jira.appcelerator.org/browse/TIMOB-12630">TIMOB-12630</a>)</li>
</ul>
* @param {Number} index
<p>Index of the section to update.</p>
* @param {Titanium.UI.TableViewSection} section
<p>section data to update.</p>
* @param {TableViewAnimationProperties} animation
<p>Animation properties. (iOS only.)</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.TableView#property-backgroundSelectedColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.TableView#property-backgroundSelectedColor} property.</p>
* @param {String} backgroundSelectedColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundSelectedImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.TableView#property-backgroundSelectedImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundSelectedImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.TableView#property-backgroundSelectedImage} property.</p>
* @param {String} backgroundSelectedImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.TableView#property-backgroundColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.TableView#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getEditable
* <p>Gets the value of the {@link Titanium.UI.TableView#property-editable} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setEditable
* <p>Sets the value of the {@link Titanium.UI.TableView#property-editable} property.</p>
* @param {Boolean} editable
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getEditing
* <p>Gets the value of the {@link Titanium.UI.TableView#property-editing} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setEditing
* <p>Sets the value of the {@link Titanium.UI.TableView#property-editing} property.</p>
* @param {Boolean} editing
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getFilterAttribute
* <p>Gets the value of the {@link Titanium.UI.TableView#property-filterAttribute} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setFilterAttribute
* <p>Sets the value of the {@link Titanium.UI.TableView#property-filterAttribute} property.</p>
* @param {String} filterAttribute
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getFilterAnchored
* <p>Gets the value of the {@link Titanium.UI.TableView#property-filterAnchored} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setFilterAnchored
* <p>Sets the value of the {@link Titanium.UI.TableView#property-filterAnchored} property.</p>
* @param {Boolean} filterAnchored
<p>New value for the property.</p>
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getFilterCaseInsensitive
* <p>Gets the value of the {@link Titanium.UI.TableView#property-filterCaseInsensitive} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setFilterCaseInsensitive
* <p>Sets the value of the {@link Titanium.UI.TableView#property-filterCaseInsensitive} property.</p>
* @param {Boolean} filterCaseInsensitive
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
* @method getFooterDividersEnabled
* <p>Gets the value of the {@link Titanium.UI.TableView#property-footerDividersEnabled} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
*/
* @method setFooterDividersEnabled
* <p>Sets the value of the {@link Titanium.UI.TableView#property-footerDividersEnabled} property.</p>
* @param {Boolean} footerDividersEnabled
<p>New value for the property.</p>
* @platform android 3.3.0
*/
/**
* @method getMaxClassname
* <p>Gets the value of the {@link Titanium.UI.TableView#property-maxClassname} property.</p>
* @returns {Number}
* @platform android 5.2.0
*/
/**
* @method setMaxClassname
* <p>Sets the value of the {@link Titanium.UI.TableView#property-maxClassname} property.</p>
* @param {Number} maxClassname
<p>New value for the property.</p>
* @platform android 5.2.0
*/
* @method getHeaderPullView
* <p>Gets the value of the {@link Titanium.UI.TableView#property-headerPullView} property.</p>
* @returns {Titanium.UI.View}
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
* @method setHeaderPullView
* <p>Sets the value of the {@link Titanium.UI.TableView#property-headerPullView} property.</p>
* @param {Titanium.UI.View} headerPullView
<p>New value for the property.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method getRefreshControl
* <p>Gets the value of the {@link Titanium.UI.TableView#property-refreshControl} property.</p>
* @returns {Titanium.UI.RefreshControl}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setRefreshControl
* <p>Sets the value of the {@link Titanium.UI.TableView#property-refreshControl} property.</p>
* @param {Titanium.UI.RefreshControl} refreshControl
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getHideSearchOnSelection
* <p>Gets the value of the {@link Titanium.UI.TableView#property-hideSearchOnSelection} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setHideSearchOnSelection
* <p>Sets the value of the {@link Titanium.UI.TableView#property-hideSearchOnSelection} property.</p>
* @param {Boolean} hideSearchOnSelection
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
* @method getHeaderDividersEnabled
* <p>Gets the value of the {@link Titanium.UI.TableView#property-headerDividersEnabled} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
*/
* @method setHeaderDividersEnabled
* <p>Sets the value of the {@link Titanium.UI.TableView#property-headerDividersEnabled} property.</p>
* @param {Boolean} headerDividersEnabled
<p>New value for the property.</p>
* @platform android 3.3.0
*/
/**
* @method getIndex
* <p>Gets the value of the {@link Titanium.UI.TableView#property-index} property.</p>
* @returns {TableViewIndexEntry[]}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setIndex
* <p>Sets the value of the {@link Titanium.UI.TableView#property-index} property.</p>
* @param {Array<TableViewIndexEntry>} index
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getMaxRowHeight
* <p>Gets the value of the {@link Titanium.UI.TableView#property-maxRowHeight} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setMaxRowHeight
* <p>Sets the value of the {@link Titanium.UI.TableView#property-maxRowHeight} property.</p>
* @param {Number} maxRowHeight
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getMinRowHeight
* <p>Gets the value of the {@link Titanium.UI.TableView#property-minRowHeight} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setMinRowHeight
* <p>Sets the value of the {@link Titanium.UI.TableView#property-minRowHeight} property.</p>
* @param {Number} minRowHeight
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getMoveable
* <p>Gets the value of the {@link Titanium.UI.TableView#property-moveable} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setMoveable
* <p>Sets the value of the {@link Titanium.UI.TableView#property-moveable} property.</p>
* @param {Boolean} moveable
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getMoving
* <p>Gets the value of the {@link Titanium.UI.TableView#property-moving} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setMoving
* <p>Sets the value of the {@link Titanium.UI.TableView#property-moving} property.</p>
* @param {Boolean} moving
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getOverScrollMode
* <p>Gets the value of the {@link Titanium.UI.TableView#property-overScrollMode} property.</p>
* @returns {Number}
* @platform android 3.1.0
*/
/**
* @method setOverScrollMode
* <p>Sets the value of the {@link Titanium.UI.TableView#property-overScrollMode} property.</p>
* @param {Number} overScrollMode
<p>New value for the property.</p>
* @platform android 3.1.0
*/
/**
* @method getRowHeight
* <p>Gets the value of the {@link Titanium.UI.TableView#property-rowHeight} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setRowHeight
* <p>Sets the value of the {@link Titanium.UI.TableView#property-rowHeight} property.</p>
* @param {Number} rowHeight
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getScrollable
* <p>Gets the value of the {@link Titanium.UI.TableView#property-scrollable} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setScrollable
* <p>Sets the value of the {@link Titanium.UI.TableView#property-scrollable} property.</p>
* @param {Boolean} scrollable
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getScrollIndicatorStyle
* <p>Gets the value of the {@link Titanium.UI.TableView#property-scrollIndicatorStyle} property.</p>
* @returns {Number}
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method setScrollIndicatorStyle
* <p>Sets the value of the {@link Titanium.UI.TableView#property-scrollIndicatorStyle} property.</p>
* @param {Number} scrollIndicatorStyle
<p>New value for the property.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @method getScrollsToTop
* <p>Gets the value of the {@link Titanium.UI.TableView#property-scrollsToTop} property.</p>
* @returns {Boolean}
* @platform iphone 2.1.2
* @platform ipad 2.1.2
*/
/**
* @method setScrollsToTop
* <p>Sets the value of the {@link Titanium.UI.TableView#property-scrollsToTop} property.</p>
* @param {Boolean} scrollsToTop
<p>New value for the property.</p>
* @platform iphone 2.1.2
* @platform ipad 2.1.2
*/
/**
* @method getSearchAsChild
* <p>Gets the value of the {@link Titanium.UI.TableView#property-searchAsChild} property.</p>
* @returns {Boolean}
* @platform android 3.0.2
*/
/**
* @method setSearchAsChild
* <p>Sets the value of the {@link Titanium.UI.TableView#property-searchAsChild} property.</p>
* @param {Boolean} searchAsChild
<p>New value for the property.</p>
* @platform android 3.0.2
*/
/**
* @method getSearchHidden
* <p>Gets the value of the {@link Titanium.UI.TableView#property-searchHidden} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setSearchHidden
* <p>Sets the value of the {@link Titanium.UI.TableView#property-searchHidden} property.</p>
* @param {Boolean} searchHidden
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getSeparatorInsets
* <p>Gets the value of the {@link Titanium.UI.TableView#property-separatorInsets} property.</p>
* @deprecated 5.2.0 Use <Titanium.UI.TableView.tableSeparatorInsets> instead.
* @returns {Dictionary}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setSeparatorInsets
* <p>Sets the value of the {@link Titanium.UI.TableView#property-separatorInsets} property.</p>
* @deprecated 5.2.0 Use <Titanium.UI.TableView.tableSeparatorInsets> instead.
* @param {Dictionary} separatorInsets
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getTableSeparatorInsets
* <p>Gets the value of the {@link Titanium.UI.TableView#property-tableSeparatorInsets} property.</p>
* @returns {Dictionary}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setTableSeparatorInsets
* <p>Sets the value of the {@link Titanium.UI.TableView#property-tableSeparatorInsets} property.</p>
* @param {Dictionary} tableSeparatorInsets
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getRowSeparatorInsets
* <p>Gets the value of the {@link Titanium.UI.TableView#property-rowSeparatorInsets} property.</p>
* @returns {Dictionary}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setRowSeparatorInsets
* <p>Sets the value of the {@link Titanium.UI.TableView#property-rowSeparatorInsets} property.</p>
* @param {Dictionary} rowSeparatorInsets
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getSeparatorStyle
* <p>Gets the value of the {@link Titanium.UI.TableView#property-separatorStyle} property.</p>
* @returns {Number}
* @platform android 5.2.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setSeparatorStyle
* <p>Sets the value of the {@link Titanium.UI.TableView#property-separatorStyle} property.</p>
* @param {Number} separatorStyle
<p>New value for the property.</p>
* @platform android 5.2.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getShowVerticalScrollIndicator
* <p>Gets the value of the {@link Titanium.UI.TableView#property-showVerticalScrollIndicator} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setShowVerticalScrollIndicator
* <p>Sets the value of the {@link Titanium.UI.TableView#property-showVerticalScrollIndicator} property.</p>
* @param {Boolean} showVerticalScrollIndicator
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.UI.TableView#property-style} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.UI.TableView#property-style} property.</p>
* @param {Number} style
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getData
* <p>Gets the value of the {@link Titanium.UI.TableView#property-data} property.</p>
* @returns {Titanium.UI.TableViewRow[]/Titanium.UI.TableViewSection[]}
*/
/**
* @method setData
* <p>Sets the value of the {@link Titanium.UI.TableView#property-data} property.</p>
* @param {Array<Titanium.UI.TableViewRow>/Array<Titanium.UI.TableViewSection>} data
<p>New value for the property.</p>
*/
/**
* @method getAllowsSelection
* <p>Gets the value of the {@link Titanium.UI.TableView#property-allowsSelection} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setAllowsSelection
* <p>Sets the value of the {@link Titanium.UI.TableView#property-allowsSelection} property.</p>
* @param {Boolean} allowsSelection
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getAllowsSelectionDuringEditing
* <p>Gets the value of the {@link Titanium.UI.TableView#property-allowsSelectionDuringEditing} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setAllowsSelectionDuringEditing
* <p>Sets the value of the {@link Titanium.UI.TableView#property-allowsSelectionDuringEditing} property.</p>
* @param {Boolean} allowsSelectionDuringEditing
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
* @method getFooterTitle
* <p>Gets the value of the {@link Titanium.UI.TableView#property-footerTitle} property.</p>
* @returns {String}
*/
* @method setFooterTitle
* <p>Sets the value of the {@link Titanium.UI.TableView#property-footerTitle} property.</p>
* @param {String} footerTitle
<p>New value for the property.</p>
*/
* @method getFooterView
* <p>Gets the value of the {@link Titanium.UI.TableView#property-footerView} property.</p>
* @returns {Titanium.UI.View}
*/
* @method setFooterView
* <p>Sets the value of the {@link Titanium.UI.TableView#property-footerView} property.</p>
* @param {Titanium.UI.View} footerView
<p>New value for the property.</p>
*/
* @method getHeaderTitle
* <p>Gets the value of the {@link Titanium.UI.TableView#property-headerTitle} property.</p>
* @returns {String}
*/
* @method setHeaderTitle
* <p>Sets the value of the {@link Titanium.UI.TableView#property-headerTitle} property.</p>
* @param {String} headerTitle
<p>New value for the property.</p>
*/
* @method getHeaderView
* <p>Gets the value of the {@link Titanium.UI.TableView#property-headerView} property.</p>
* @returns {Titanium.UI.View}
*/
* @method setHeaderView
* <p>Sets the value of the {@link Titanium.UI.TableView#property-headerView} property.</p>
* @param {Titanium.UI.View} headerView
<p>New value for the property.</p>
*/
/**
* @method getSearch
* <p>Gets the value of the {@link Titanium.UI.TableView#property-search} property.</p>
* @returns {Titanium.UI.SearchBar/Titanium.UI.Android.SearchView}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setSearch
* <p>Sets the value of the {@link Titanium.UI.TableView#property-search} property.</p>
* @param {Titanium.UI.SearchBar/Titanium.UI.Android.SearchView} search
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getSectionCount
* <p>Gets the value of the {@link Titanium.UI.TableView#property-sectionCount} property.</p>
* @returns {Number}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getSections
* <p>Gets the value of the {@link Titanium.UI.TableView#property-sections} property.</p>
* @returns {Titanium.UI.TableViewSection[]}
* @platform android 3.1.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setSections
* <p>Sets the value of the {@link Titanium.UI.TableView#property-sections} property.</p>
* @param {Array<Titanium.UI.TableViewSection>} sections
<p>New value for the property.</p>
* @platform android 3.1.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getSeparatorColor
* <p>Gets the value of the {@link Titanium.UI.TableView#property-separatorColor} property.</p>
* @returns {String}
*/
/**
* @method setSeparatorColor
* <p>Sets the value of the {@link Titanium.UI.TableView#property-separatorColor} property.</p>
* @param {String} separatorColor
<p>New value for the property.</p>
*/
/**
* @property [backgroundSelectedColor=Background color of this view.]
* @hide
* @type String
* <p>Selected background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p><code>focusable</code> must be true for normal views.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundSelectedImage=If `backgroundSelectedImage` is undefined, and the normal background image
`backgroundImage` is set, the normal image is used when this view is selected.
]
* @hide
* @type String
* <p>Selected background image url for the view, specified as a local file path or URL.</p>
* @description <p>For normal views, the selected background is only used if <code>focusable</code> is <code>true</code>.</p>
* @platform android 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [backgroundColor=transparent on non-iOS platforms, white on the iOS platform]
* @type String
* <p>Background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>Prior to iOS 6, it was possible to explicitly specify a color value of
{@link Titanium.UI.iOS#property-COLOR_GROUP_TABLEVIEW_BACKGROUND} or 'stripped' (sic) to select the iOS group
tableview background texture. On iPhone and iPod Touch, this produces a pinstriped texture; on iPad,
it is transparent.</p>
<p>In iOS 6, there is no way to explicitly specify the group tableview background texture. The color
values {@link Titanium.UI.iOS#property-COLOR_GROUP_TABLEVIEW_BACKGROUND} or 'stripped' are interpreted as black.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [editable=Depends on `editing` and `moving` mode]
* @type Boolean
* <p>Determines the rows' default editable behavior, which allows them to be deleted by the user
when the table is in <code>editing</code> or <code>moving</code> mode.</p>
* @description <p>This property determines the default behavior of child rows, but may be overridden by
a row's {@link Titanium.UI.TableViewRow#property-editable editable} property.</p>
<p>See the {@link Titanium.UI.TableView} description section for a full explanation of the TableView's
<code>editing</code> and <code>moving</code> modes.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [editing=false]
* @type Boolean
* <p>Determines whether row editing mode is active.</p>
* @description <p>The <code>editing</code> mode allows rows to be deleted or re-ordered, depending on their
{@link Titanium.UI.TableViewRow#property-editable editable} and {@link Titanium.UI.TableViewRow#property-moveable moveable}
settings.</p>
<p>See the {@link Titanium.UI.TableView} description section for a full explanation of the TableView's
<code>editing</code> and <code>moving</code> modes.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property filterAttribute
* @type String
* <p>Filter attribute to be used when searching.</p>
* @description <p>On the Android platform, this property can only be set to Titanium-defined properties of the
TableViewRow object, such as <code>title</code>. To search text stored in a different attribute, set the <code>title</code>
property of the TableViewRow object to the property to be searched. For example:</p>
<pre><code>var label = Ti.UI.createLabel({text: 'Foobar'}),
var row = Ti.UI.createTableViewRow(title: label.text);
row.add(label);
</code></pre>
<p>On the iOS platform, this property can be set to any property on the TableViewRow object,
including arbitrary properties set on the object, not only Titanium-defined properties.</p>
<p>Note that the filter is not anchored to the beginning of the string. So typing "ha"
in the text box will include rows titled 'Harold' and 'Harvard', but also 'Sharon'
and 'Jonathan'.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [filterAnchored=false]
* @type Boolean
* <p>Determines whether the search is limited to the start of the string</p>
* @description <p>Set to <code>true</code> to enable case anchored search.</p>
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [filterCaseInsensitive=true]
* @type Boolean
* <p>Determines whether the search is case insensitive.</p>
* @description <p>Set to <code>false</code> to enable case sensitive search.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
* @property [footerDividersEnabled=undefined but behaves as false]
* @type Boolean
* @creationOnly
* <p>When set to false, the ListView will not draw the divider before the footer view.</p>
* @platform android 3.3.0
*/
/**
* @property [maxClassname=32]
* @type Number
* @creationOnly
* <p>Max number of row class names.</p>
* @description <p>See {@link Titanium.UI.TableViewRow#property-className} for more details. This property will default to
32 when it is set to a number lesser than that.</p>
* @platform android 5.2.0
*/
* @property headerPullView
* @type Titanium.UI.View
* <p>View positioned above the first row that is only revealed when the user drags the table
contents down.</p>
* @description <p>A <code>headerPullView</code> is a UI control that is often used to provide a convenient way for the
user to refresh a table's data. Typically used with the
{@link Titanium.UI.TableView#method-setContentInsets setContentInsets} method.</p>
<p>To specify the wrapper color see {@link Titanium.UI.View#property-pullBackgroundColor}.</p>
<p>For an example, see the "Pull to refresh" section in the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/TableViews">TableViews guide</a>.</p>
<p>Alloy applications can use a <code><HeaderPullView></code> element inside a <code><TableView></code> element.</p>
<pre><code><Alloy>
<TableView>
<HeaderPullView platform="ios">
<View class="pull">
<Label color="#F2F4F4" bottom="25dp">Header pull view</Label>
</View>
</HeaderPullView>
</TableView>
</Alloy>
</code></pre>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property refreshControl
* @type Titanium.UI.RefreshControl
* <p>View positioned above the first row that is only revealed when the user drags the list view contents down.</p>
* @description <p>An alternate to the headerPullView property. See {@link Titanium.UI.RefreshControl} for usage and examples.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [hideSearchOnSelection=true]
* @type Boolean
* <p>Determines whether the search field should hide on completion.</p>
* @description <p>Set to <code>false</code> to prevent the search field from being hidden when an item in the search
results is clicked.</p>
<p>Many standard applications (such as Contacts) have a behavior equivalent to <code>false</code> for this
value, but the default is <code>true</code> for legacy reasons.</p>
<p>The Android platform behaves as though this value were <code>false</code>.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
* @property [headerDividersEnabled=undefined but behaves as false]
* @type Boolean
* @creationOnly
* <p>When set to false, the ListView will not draw the divider after the header view.</p>
* @platform android 3.3.0
*/
/**
* @property index
* @type TableViewIndexEntry[]
* <p>Array of objects (with <code>title</code> and <code>index</code> properties) to control the table view index.</p>
* @description <p>If an index array is specified, an index bar is displayed on the right-hand side of the
table view. Clicking on a title in the index bar scrolls the table view to the row
index associated with that title. If the index is -1 the table view will scroll to the top.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property maxRowHeight
* @type Number
* <p>Maximum row height for table view rows.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property minRowHeight
* @type Number
* <p>Minimum row height for table view rows.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [moveable=Depends on `editing` and `moving` mode]
* @type Boolean
* <p>Determines the rows' default moveable behavior, which allows them to be re-ordered by the
user when the table is in <code>editing</code> or <code>moving</code> mode.</p>
* @description <p>This property determines the default behavior of child rows, but may be overridden by a
row's {@link Titanium.UI.TableViewRow#property-moveable moveable} property.</p>
<p>See the {@link Titanium.UI.TableView} description section for a full explanation of the TableView's
<code>editing</code> and <code>moving</code> modes.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [moving=false]
* @type Boolean
* <p>Determines whether row moving mode is active.</p>
* @description <p>The <code>moving</code> mode allows rows to be deleted or re-ordered, depending on their
{@link Titanium.UI.TableViewRow#property-editable editable} and {@link Titanium.UI.TableViewRow#property-moveable moveable}
settings.</p>
<p>See the {@link Titanium.UI.TableView} description section for a full explanation of the TableView's
<code>editing</code> and <code>moving</code> modes.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [overScrollMode=Titanium.UI.Android.OVER_SCROLL_ALWAYS]
* @type Number
* <p>Determines the behavior when the user overscrolls the view.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-OVER_SCROLL_ALWAYS}
<li> {@link Titanium.UI.Android#property-OVER_SCROLL_IF_CONTENT_SCROLLS}
<li> {@link Titanium.UI.Android#property-OVER_SCROLL_NEVER}
</ul></p>
* @platform android 3.1.0
*/
/**
* @property rowHeight
* @type Number
* <p>Default row height for table view rows.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [scrollable=true]
* @type Boolean
* <p>If <code>true</code>, the tableview can be scrolled.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [scrollIndicatorStyle={@link Titanium.UI.iPhone.ScrollIndicatorStyle#property-DEFAULT}]
* @type Number
* <p>Style of the scrollbar.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iPhone.ScrollIndicatorStyle#property-BLACK}
<li> {@link Titanium.UI.iPhone.ScrollIndicatorStyle#property-DEFAULT}
<li> {@link Titanium.UI.iPhone.ScrollIndicatorStyle#property-WHITE}
</ul></p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property [scrollsToTop=true]
* @type Boolean
* <p>Controls whether the scroll-to-top gesture is effective.</p>
* @description <p>The scroll-to-top gesture is a tap on the status bar; The default value of this property is true.
This gesture works when you have a single visible table view.
If there are multiple table views, web views, text areas, and/or scroll views visible,
you will need to disable (set to false) on the above views you DON'T want this
behaviour on. The remaining view will then respond to scroll-to-top gesture. </p>
* @platform iphone 2.1.2
* @platform ipad 2.1.2
*/
/**
* @property [searchAsChild=true]
* @type Boolean
* <p>Determines whether the {@link Titanium.UI.SearchBar SearchBar} or {@link Titanium.UI.Android.SearchView SearchView} appears as part of the TableView.</p>
* @description <p>Set to false if the search view will be displayed in the action bar.</p>
* @platform android 3.0.2
*/
/**
* @property [searchHidden=false (search field visible)]
* @type Boolean
* <p>Determines whether the search field is visible.</p>
* @description <p>Set to <code>true</code> to hide the search field.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property separatorInsets
* @type Dictionary
* <p>The insets for table view separators (applies to all cells). This property is applicable on iOS 7 and greater.</p>
* @deprecated 5.2.0 Use <Titanium.UI.TableView.tableSeparatorInsets> instead.
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>In iOS 7 and later, cell separators do not extend all the way to the edge of the table view.
This property sets the default inset for all cells in the table. Set this to a dictionary
with two keys, <code>left</code> specifying inset from left edge and <code>right</code> specifying the inset from the right edge. </p>
<p>For example:</p>
<pre><code>tableView1.setSeparatorInsets({
left:10,
right:10
});
</code></pre>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property tableSeparatorInsets
* @type Dictionary
* <p>The insets for the table view header and footer. This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>In iOS 7 and later, cell separators do not extend all the way to the edge of the table view.Set this to a
dictionary with two keys, <code>left</code> specifying inset from left edge and <code>right</code> specifying the inset from the
right edge. If the rowSeparatorInsets is not set, the tableSeparatorInsets will also set the cell insets.</p>
<p>For example:</p>
<pre><code>tableView1.setTableSeparatorInsets({
left:10,
right:10
});
</code></pre>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property rowSeparatorInsets
* @type Dictionary
* <p>The insets for table view cells (applies to all cells). This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>In iOS 7 and later, cell separators do not extend all the way to the edge of the table view.Set this to a
dictionary with two keys, <code>left</code> specifying inset from left edge and <code>right</code> specifying the inset from the
right edge. This property is only available upon creation of the cells.</p>
<p>For example:</p>
<pre><code>tableView1.setRowSeparatorInsets({
left:10,
right:10
});
</code></pre>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property separatorStyle
* @type Number
* <p>Separator style constant.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TABLE_VIEW_SEPARATOR_STYLE_NONE}
<li> {@link Titanium.UI#property-TABLE_VIEW_SEPARATOR_STYLE_SINGLE_LINE}
</ul></p>
* @platform android 5.2.0
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [showVerticalScrollIndicator=true]
* @type Boolean
* <p>Determines whether this table view displays a vertical scroll indicator.</p>
* @description <p>Set to <code>false</code> to hide the vertical scroll indicator.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property style
* @type Number
* <p>Style of the table view, specified using one of the constants from
{@link Titanium.UI.iPhone.TableViewStyle}.</p>
* @description <p>Style should always be set before setting the <code>data</code> on table view.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iPhone.TableViewStyle#property-GROUPED}
<li> {@link Titanium.UI.iPhone.TableViewStyle#property-PLAIN}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property data
* @type Titanium.UI.TableViewRow[]/Titanium.UI.TableViewSection[]
* <p>Rows of the table view.</p>
*/
/**
* @property [allowsSelection=true]
* @type Boolean
* <p>Determines whether this table's rows can be selected.</p>
* @description <p>Set to <code>false</code> to prevent rows from being selected.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property [allowsSelectionDuringEditing=false]
* @type Boolean
* <p>Determines whether this table's rows can be selected while editing the table.</p>
* @description <p>Set to <code>true</code> to allow rows to be selected.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
* @property footerTitle
* @type String
* <p>Table view footer title.</p>
*/
* @property footerView
* @type Titanium.UI.View
* <p>Table view footer as a view that will be rendered instead of a label.</p>
* @description <p>In Alloy you can use a <code><FooterView></code> element nested in a <code><TableView></code> element:</p>
<pre><code><Alloy>
<TableView>
<FooterView>
<View backgroundColor="#a00" height="50dp"/>
</FooterView>
<TableViewRow><Label>Row 1</Label></TableViewRow>
<TableViewRow><Label>Row 2</Label></TableViewRow>
</TableView>
</Alloy>
</code></pre>
*/
* @property headerTitle
* @type String
* <p>Table view header title.</p>
*/
* @property headerView
* @type Titanium.UI.View
* <p>Table view header as a view that will be rendered instead of a label.</p>
* @description <p>In Alloy you can use a <code><HeaderView></code> element nested in a <code><TableView></code> element:</p>
<pre><code><Alloy>
<TableView>
<HeaderView>
<View backgroundColor="#a00" height="50dp"/>
</HeaderView>
<TableViewRow><Label>Row 1</Label></TableViewRow>
<TableViewRow><Label>Row 2</Label></TableViewRow>
</TableView>
</Alloy>
</code></pre>
*/
/**
* @property search
* @type Titanium.UI.SearchBar/Titanium.UI.Android.SearchView
* <p>Search field to use for the table view.</p>
* @description <p>In an Alloy application, you can use a <code><SearchView></code> or <code><SearchBar></code> element inside a <code><TableView></code> element.</p>
<pre><code><Alloy>
<TableView>
<!-- search, shorthand with Ti.UI.SearchBar -->
<SearchBar platform="ios"/>
<!-- search, shorthand with Ti.UI.Android.SearchView -->
<SearchView ns="Ti.UI.Android" platform="android"/>
</TableView>
</Alloy>
</code></pre>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property sectionCount
* @type Number
* @readonly
* <p>Number of sections in this table view.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property sections
* @type Titanium.UI.TableViewSection[]
* <p>Sections of this table.</p>
* @description <p>In Release 3.0, this property is read-only on Android.</p>
<p>Due to a known issue, TIMOB-12616, the <code>sections</code> property should not be used
for adding sections on iOS.</p>
* @platform android 3.1.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform mobileweb 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property [separatorColor=platform-specific default color]
* @type String
* <p>Separator line color between rows, as a color name or hex triplet.</p>
* @description <p>To make the line invisible, set this property to <code>transparent</code>, or the same value as the
{@link Titanium.UI.TableView#property-backgroundColor backgroundColor} property. </p>
<p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @class TableViewAnimationProperties
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TableView.yml
* <p>A simple object for specifying the animation properties to use when inserting or deleting rows, or scrolling the table.</p>
* @description <p>These properties are only used on iOS. Not all properties apply to all methods.</p>
<p><code>animationStyle</code> does not apply to the <code>scrollToTop</code> or <code>scrollToIndex</code> methods.</p>
<p><code>positon</code> only applies to the <code>scrollToIndex</code> method.</p>
*/
/**
* @property [animated=true]
* @type Boolean
* <p>Whether this table change should be animated. Ignored if any <code>animationStyle</code> value is specified.</p>
*/
/**
* @property [animationStyle=If `animated` is `true` but no `animationStyle` is specified, the style defaults to
[FADE](Titanium.UI.iPhone.RowAnimationStyle.FADE).
]
* @type Number
* <p>Type of animation to use for row insertions and deletions.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iPhone.RowAnimationStyle#property-BOTTOM}
<li> {@link Titanium.UI.iPhone.RowAnimationStyle#property-FADE}
<li> {@link Titanium.UI.iPhone.RowAnimationStyle#property-LEFT}
<li> {@link Titanium.UI.iPhone.RowAnimationStyle#property-NONE}
<li> {@link Titanium.UI.iPhone.RowAnimationStyle#property-RIGHT}
<li> {@link Titanium.UI.iPhone.RowAnimationStyle#property-TOP}
</ul></p>
*/
/**
* @property [position={@link Titanium.UI.iPhone.TableViewScrollPosition#property-NONE}]
* @type Number
* <p>Specifies what position to scroll the selected row to.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iPhone.TableViewScrollPosition#property-BOTTOM}
<li> {@link Titanium.UI.iPhone.TableViewScrollPosition#property-MIDDLE}
<li> {@link Titanium.UI.iPhone.TableViewScrollPosition#property-NONE}
<li> {@link Titanium.UI.iPhone.TableViewScrollPosition#property-TOP}
</ul></p>
*/
/**
* @class TableViewIndexEntry
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TableView.yml
* <p>A simple object that represents an index entry in a <code>TableView</code>.</p>
*/
/**
* @property title
* @type String
* <p>Title to display in the index bar for this item.</p>
*/
/**
* @property index
* @type Number
* <p>Row index associated with this item.</p>
*/
/**
* @class TableViewContentInsetOption
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TableView.yml
* <p>Optional parameter for {@link Titanium.UI.TableView#method-setContentInsets setContentInsets} method.</p>
* @description <p>On iOS, the optional parameters <code>animated</code> and <code>duration</code>to enable the animation and duration
for animation while the content insets are updated. For example</p>
<pre><code>setContentInset({top:50,bottom:100}, {animated:true, duration:3000})
</code></pre>
*/
/**
* @property [animated=false]
* @type Boolean
* <p>Determines whether the table view's content inset change is animated.</p>
*/
/**
* @property duration
* @type Number
* <p>The duration in <code>milleseconds</code> for animation while the content inset is being changed.</p>
*/
/**
* @class TableViewEdgeInsets
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TableView.yml
* <p>The parameter for {@link Titanium.UI.TableView#method-setContentInsets setContentInsets} method.</p>
* @description <p>On iOS, the parameter <code>edgeInsets</code> can be specified to set the distance(<code>top</code>, <code>bottom</code>,
<code>right</code>, <code>left</code>) that the content view is inset from the enclosing scroll view of the table.
For example</p>
<pre><code>setContentInset({top:50,bottom:10,right:10,left:10}, {animated:true})
</code></pre>
*/
/**
* @property top
* @type Number
* <p>Value specifying the top insets for the enclosing scroll view of the table.</p>
*/
/**
* @property left
* @type Number
* <p>Value specifying the left insets for the enclosing scroll view of the table.</p>
*/
/**
* @property right
* @type Number
* <p>Value specifying the right insets for the enclosing scroll view of the table.</p>
*/
/**
* @property bottom
* @type Number
* <p>Value specifying the bottom insets for the enclosing scroll view of the table.</p>
*/
/**
* @class Titanium.UI.TableViewRow
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TableViewRow.yml
* <p>A table view row is an individual item in a table, organized into table view sections.</p>
* @description <p>Use the {@link Titanium.UI#method-createTableViewRow} method or <strong><code><TableViewRow></code></strong> Alloy element to create
a table view row. </p>
<p>These may be explicitly added to {@link Titanium.UI.TableViewSection TableViewSection} objects, which are applied
to a {@link Titanium.UI.TableView TableView}. If a table section is not specified, one will be
automatically created. </p>
<p>A row's contents can be as simple as a single line of text, or comprised of a completely
customized layout of child views. </p>
<h4>Creating Table View Rows</h4>
<p>Rows may be created using the properties directly available on the <code>TableViewRow</code> object, to
achieve the following:</p>
<ul>
<li>Row title to display the text content in the row.</li>
<li>Background color and background image.</li>
<li>Images on the left and right sides of the row.</li>
<li>System decorations, such as checkboxes.</li>
</ul>
<p>Alternatively, custom layouts of multiple lines of text, different fonts, and additional
images or controls can be created by adding child views to the row. In this case, the row's
<code>title</code> property should not be set.</p>
<p>As events automatically bubble/propogate to parent views, a listener may be placed on the table
view to detect events fired from the rows. The benefit is that it is not necessary to
explicitly create a listener for every individual row.</p>
<p>See the {@link Titanium.UI.TableView TableView} description and examples section for more information
about creating table rows.</p>
<h4>Improved Table Performance (Android)</h4>
<p>If you are experiencing performance issues on Android when using custom rows, you can
try setting the {@link Titanium.UI.TableViewRow#property-className className} property. The class name serves as a
cue for reusing the underlying views used to display the rows.</p>
<p>A given <code>className</code> value indicates a row with a particular set of child views.
All rows that share a class name must have the same set of children -- for example, the class
name "myCustomRow" could identify a row containing two labels and an image view. </p>
<p>The properties of the child controls may be different. For example, each instance of
"myCustomRow" could have a different image and different text on the labels.</p>
<p>Note that <code>className</code> is no longer used on iOS, and was never used on Mobile Web; on
these platforms, <code>className</code> is ignored.</p>
<h4>Platform Implementation Notes</h4>
<p>The <code>top</code>, <code>left</code> and other positional parameters are not used for their usual purposes, because
the table view row is automatically positioned by its parent.</p>
<p>On Android, these properties are used to position the content (title) inside the row. For example,
setting <code>top</code> to 20 moves the title down from the top of the row. </p>
<p>On iOS, these values have no effect.</p>
<p>On Mobile Web, they are used to relatively position the row, treating the <code>TableView</code> as if it
were a horizontal layout.</p>
<p>Also, note that the selected text color, <code>selectedColor</code>, can only be set on iOS
and Mobile Web. On Android, the text color does not change when the row is selected.</p>
<h4>Row Swipe Gestures (Android and iOS)</h4>
<p>A common requirement is to enable the user to interact with table rows using swipe gestures.
As this event is not available for the <code>TableViewRow</code> object, it will not "bubble up" to the
<code>TableView</code>, where a {@link Titanium.UI.TableView#event-swipe} is recognized. </p>
<p>A typical solution is to use a standard view as a container, or wrapper, for all each row's child
views, because it recognizes {@link Titanium.UI.View#event-swipe} events and allows them to pass to the table.
Each child view should have touch events disabled, so that the container view provides a reliable
source for these events. Refer to the "Row Swipe Gestures" example for a demonstration.</p>
<p>For iOS, read the {@link Titanium.UI.TableView Row Editing and Moving Modes notes on TableView} regarding
the interactions between edit modes and swipes.</p>
* <h3>Examples</h3>
<h4>Simple Table View Row example</h4>
<p>Create a table view row containing a red square view.</p>
<pre><code>var row = Titanium.UI.createTableViewRow();
var view = Titanium.UI.createView({
backgroundColor:'red',
width: 20, height: 20
});
row.add(view);
</code></pre><h4>Row Swipe Gestures</h4>
<p>Create a table of rows. When a row is swiped, output its ID to the log. </p>
<pre><code>var tableData = [];
var win = Ti.UI.createWindow({ backgroundColor: 'white' });
var table = Ti.UI.createTableView({ objName: 'table' });
for (var i = 0; i <= 20; i++){
var row = Ti.UI.createTableViewRow({
className: 'row',
objName: 'row',
touchEnabled: true,
height: 100
});
var enabledWrapperView = Ti.UI.createView({
backgroundColor:'#008FD5',
objName: 'enabledWrapperView',
rowID: i,
width: Ti.UI.FILL, height: '100%'
});
var disabledWrapperView = Ti.UI.createView({
backgroundColor:'#A2E0FF',
objName: 'disabledWrapperView',
touchEnabled: false,
width: 300, height: '80%'
});
enabledWrapperView.add(disabledWrapperView);
var label = Ti.UI.createLabel({
backgroundColor:'#313F48',
color: 'white',
objName: 'label',
text: i,
touchEnabled: false,
left: 0,
width: 200
});
disabledWrapperView.add(label);
row.add(enabledWrapperView);
tableData.push(row);
}
table.setData(tableData);
table.addEventListener('swipe', function(e){
if (e.source && e.source.objName !== 'table'){
Ti.API.info('Row swiped: ' + e.source);
Ti.API.info('Row swiped: ' + e.source.objName);
Ti.API.info('Row ID : ' + e.source.rowID);
}
});
win.add(table);
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous simple table view row example as an Alloy view.</p>
<pre><code><Alloy>
<TableViewRow id="row">
<View id="view" backgroundColor="red" width="20" height="20"/>
</TableViewRow>
</Alloy>
</code></pre>
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event swipe
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left' or 'right'. Android also supports 'up' and 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform mobileweb 1.8
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch..</p>
* @description <p>On Android and iOS, be aware that a row or table touch event and a table
{@link Titanium.UI.TableView#event-scroll scroll} event cannot occur concurrently. If a table begins
to scroll during a touch event, the appropriate row or table <code>touchcancel</code> event fire
before the <code>scroll</code> event begins.</p>
<p>On Mobile Web, a scroll may occur in the middle of a touch, in which case a <code>touchend</code>
will fire immediately following the scroll.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.0.1
* @platform ipad 3.0.1
*/
/**
* @event touchstart
* <p>Fired as soon as the device detects a touch gesture against this view.</p>
* @description <p>On Android and iOS, be aware that a row or table touch event and a table
{@link Titanium.UI.TableView#event-scroll scroll} event cannot occur concurrently. If a table begins
to scroll during a touch event, the appropriate row or table <code>touchcancel</code> event fire
before the <code>scroll</code> event begins.</p>
<p>On Mobile Web, a scroll may occur in the middle of a touch, in which case a <code>touchend</code>
will fire immediately following the scroll.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchcancel
* <p>Fired when a touch gesture is interrupted by the device.</p>
* @description <p>Generated in various circumstances, including an incoming call to allow the UI to clean
up state. </p>
<p>On Android and iOS, be aware that a row or table touch event and a table
{@link Titanium.UI.TableView#event-scroll scroll} event cannot occur concurrently. If a table begins
to scroll during a touch event, the appropriate row or table <code>touchcancel</code> event fire
before the <code>scroll</code> event begins.</p>
<p>On Mobile Web, a scroll may occur in the middle of a touch, in which case a <code>touchend</code>
will fire immediately following the scroll.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event touchend
* <p>Fired when a touch gesture is complete.</p>
* @description <p>On Android and iOS, be aware that a row or table touch event and a table
{@link Titanium.UI.TableView#event-scroll scroll} event cannot occur concurrently. If a table begins
to scroll during a touch event, the appropriate row or table <code>touchcancel</code> event fire
before the <code>scroll</code> event begins.</p>
<p>On Mobile Web, a scroll may occur in the middle of a touch, in which case a <code>touchend</code>
will fire immediately following the scroll.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event click
* <p>Fired when a table row is clicked by the user.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Boolean} detail
<p>Indicates whether the detail button was clicked. Only <code>true</code> if <code>row.hasDetail</code> is
<code>true</code> and the detail button was clicked.</p>
* @param {Number} index
<p>Row index.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Table view row object.</p>
* @param {Dictionary<Titanium.UI.TableViewRow>} rowData
<p>Dictionary containing the properties set on the row.</p>
* @param {Boolean} searchMode
<p>Boolean to indicate if the table is in search mode.</p>
* @param {Titanium.UI.TableViewSection} section
<p>Table view section object, if the clicked row is contained in a section.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event focus
* @hide
* <p>Fired when the view element gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method animate
* @hide
* <p>Animates this view.</p>
* @description <p>The {@link Titanium.UI.Animation Animation} object or dictionary passed to this method defines
the end state for the animation, the duration of the animation, and other properties.</p>
<p>Note that if you use <code>animate</code> to move a view, the view's actual <em>position</em> is changed, but
its layout properties, such as <code>top</code>, <code>left</code>, <code>center</code> and so on are not changed--these
reflect the original values set by the user, not the actual position of the view.</p>
<p>The {@link Titanium.UI.View#property-rect rect} property can be used to determine the actual size and
position of the view. Note that on Mobile Web, the <code>rect</code> property is not updated after
animation. This is a known issue <a href="https://jira.appcelerator.org/browse/TIMOB-8930">TIMOB-8930</a>.</p>
* @param {Titanium.UI.Animation/Dictionary<Titanium.UI.Animation>} animation
<p>Either a dictionary of animation properties or an
{@link Titanium.UI.Animation Animation} object.</p>
* @param {Callback<Object>} callback
<p>Function to be invoked upon completion of the animation.</p>
*/
/**
* @method getAccessibilityLabel
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-accessibilityLabel} property.</p>
* @returns {String}
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityLabel
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-accessibilityLabel} property.</p>
* @param {String} accessibilityLabel
<p>New value for the property.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getOpacity
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-opacity} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform mobileweb 1.8
*/
/**
* @method setOpacity
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-opacity} property.</p>
* @param {Number} opacity
<p>New value for the property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
*/
/**
* @method getClassName
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-className} property.</p>
* @returns {String}
* @platform android 0.9
*/
/**
* @method setClassName
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-className} property.</p>
* @param {String} className
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getDeleteButtonTitle
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-deleteButtonTitle} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setDeleteButtonTitle
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-deleteButtonTitle} property.</p>
* @param {String} deleteButtonTitle
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getEditable
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-editable} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setEditable
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-editable} property.</p>
* @param {Boolean} editable
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
* @method getFooter
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-footer} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
* @method setFooter
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-footer} property.</p>
* @param {String} footer
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getHasDetail
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-hasDetail} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setHasDetail
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-hasDetail} property.</p>
* @param {Boolean} hasDetail
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
* @method getHeader
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-header} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
* @method setHeader
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-header} property.</p>
* @param {String} header
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getIndentionLevel
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-indentionLevel} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setIndentionLevel
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-indentionLevel} property.</p>
* @param {Number} indentionLevel
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getLeftImage
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-leftImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setLeftImage
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-leftImage} property.</p>
* @param {String} leftImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getMoveable
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-moveable} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setMoveable
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-moveable} property.</p>
* @param {Boolean} moveable
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getRightImage
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-rightImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setRightImage
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-rightImage} property.</p>
* @param {String} rightImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getSelectedBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-selectedBackgroundColor} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setSelectedBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-selectedBackgroundColor} property.</p>
* @param {String} selectedBackgroundColor
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getSelectedBackgroundImage
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-selectedBackgroundImage} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setSelectedBackgroundImage
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-selectedBackgroundImage} property.</p>
* @param {String} selectedBackgroundImage
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getSelectedColor
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-selectedColor} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setSelectedColor
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-selectedColor} property.</p>
* @param {String} selectedColor
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getSelectionStyle
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-selectionStyle} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setSelectionStyle
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-selectionStyle} property.</p>
* @param {Number} selectionStyle
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getColor
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-color} property.</p>
* @returns {String}
*/
/**
* @method setColor
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-color} property.</p>
* @param {String} color
<p>New value for the property.</p>
*/
/**
* @method getFont
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-font} property.</p>
* @returns {Font}
*/
/**
* @method setFont
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-font} property.</p>
* @param {Font} font
<p>New value for the property.</p>
*/
/**
* @method getHasCheck
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-hasCheck} property.</p>
* @returns {Boolean}
*/
/**
* @method setHasCheck
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-hasCheck} property.</p>
* @param {Boolean} hasCheck
<p>New value for the property.</p>
*/
/**
* @method getHasChild
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-hasChild} property.</p>
* @returns {Boolean}
*/
/**
* @method setHasChild
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-hasChild} property.</p>
* @param {Boolean} hasChild
<p>New value for the property.</p>
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.TableViewRow#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.TableViewRow#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @property [accessibilityLabel=Title or label of the control.]
* @type String
* <p>A succint label associated with the table row for the device's accessibility service.</p>
* @description <p>See {@link Titanium.UI.View#property-accessibilityLabel} description.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [opacity=1.0 (opaque)]
* @type Number
* <p>Opacity of this view, from 0.0 (transparent) to 1.0 (opaque).</p>
* @description <p>To set the opacity of a row on iOS, specify an aRGB value with the
{@link Titanium.UI.TableViewRow#property-backgroundColor} property.</p>
* @platform android 0.9
* @platform mobileweb 1.8
*/
/**
* @property className
* @type String
* <p>Class name for the row.</p>
* @description <p>A class name represents a unique row layout. </p>
<p>A table view row must have a unique class name if the row layout is unique. However,
use the same name for rows that have the same structural layout (even if the content is
different) to provide maximum rendering performance.</p>
<p>For example, if some rows include images and some rows do not, you would have two class
names, one for image rows and one for plain rows.</p>
<p>This property exists on iOS and Mobile Web, but is ignored.</p>
* @platform android 0.9
*/
/**
* @property deleteButtonTitle
* @type String
* <p>Text to display on the delete button when editable is enabled</p>
* @description <p>When {@link Titanium.UI.TableViewRow#property-editable editable} is enabled on the TableViewRow, use this property to change the title of the delete button.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property editable
* @type Boolean
* <p>Determines the rows' editable behavior, which allows them to be deleted by the user when the
table is in <code>editing</code> or <code>moving</code> mode.</p>
* @description <p>If this property is not explicitly set, it will return <code>undefined</code> and the row's editable
behavior will be determined by its parent table's {@link Titanium.UI.TableView#property-editable editable}
property.</p>
<p>See the {@link Titanium.UI.TableView} description section for a full explanation of the TableView's
row <code>editing</code> and <code>moving</code> modes.</p>
<p>If you want to change the title of the delete button, use the [deleteButtonTitle](Titanium.UI.TableViewRow.deleteButtonTitle] property</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
* @property footer
* @type String
* <p>The footer title of the row.</p>
* @description <p>The <code>footer</code> property is used to assign a footer title to a row. It has the same effect as setting
the <code>footerTitle</code> property of a {@link Titanium.UI.TableViewSection}.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [hasDetail=false]
* @type Boolean
* <p>Determines whether a system-provided detail disclosure button is displayed on the right-hand
side of the row.</p>
* @description <p>The <code>hasDetail</code> flag is used to indicate to the user that more details are
available on the row. </p>
<p>Specifically on iOS the detail disclosure button indicates that clicking on the row results
in a detail view of that item. </p>
<p>The <code>detail</code> property in the click event is set to <code>true</code> if the click occurred on
the detail button itself, <code>false</code> if the click occurs anywhere else in the row.</p>
<p>For rows that have <code>hasDetail</code> set to false, the <code>detail</code> flag is always <code>false</code>.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
* @property header
* @type String
* <p>The header title of the row.</p>
* @description <p>The <code>header</code> property is used to assign a header title to a row. It has the same effect as setting
the <code>headerTitle</code> property of a {@link Titanium.UI.TableViewSection}.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [indentionLevel=0]
* @type Number
* <p>Indention level for the row.</p>
* @description <p>Indentation values greater than 0 indent the row text.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property leftImage
* @type String
* <p>Image to render in the left image area of the row, specified as a local path or URL.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property moveable
* @type Boolean
* <p>Determines the rows' moveable behavior, which allows them to be re-ordered by the user when
the table is in <code>editing</code> or <code>moving</code> mode.</p>
* @description <p>If this property is not explicitly set, it will return <code>undefined</code> and the row's moveable
behavior will be determined by its parent table's {@link Titanium.UI.TableView#property-moveable moveable}
property.</p>
<p>See the {@link Titanium.UI.TableView} description section for a full explanation of the TableView's
row <code>editing</code> and <code>moving</code> modes.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property rightImage
* @type String
* <p>Image to render in the right image area of the row, specified as a local path or URL.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property selectedBackgroundColor
* @type String
* <p>Background color to render when the row is selected, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property selectedBackgroundImage
* @type String
* <p>Background image to render when the row is selected.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property selectedColor
* @type String
* <p>Color of the row text when the row is selected, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property selectionStyle
* @type Number
* <p>Selection style constant to control the selection color.</p>
* @description <p>Specify one of the constants from {@link Titanium.UI.iOS.TableViewCellSelectionStyle}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property color
* @type String
* <p>Default text color of the row when not selected, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
<p>On Android, <code>selectedColor</code> is not supported, so the text is always displayed in this color.</p>
*/
/**
* @property [font=System default font.]
* @type Font
* <p>Font to use for the row title.</p>
*/
/**
* @property [hasCheck=false]
* @type Boolean
* <p>Determines whether a system-provided checkmark is displayed on the right-hand side of
the row.</p>
*/
/**
* @property [hasChild=false]
* @type Boolean
* <p>Determines whether a system-provided arrow is displayed on the right-hand side of the row.</p>
* @description <p>The <code>hasChild</code> flag is used to indicate to the user that clicking on the row displays more
detailed information. </p>
<p>On iOS, this is specifically used when clicking on the row navigates to the next table view
in a heirarchy of table views.</p>
*/
/**
* @property title
* @type String
* <p>Text to display on the row.</p>
* @description <p>Do not specify if using views as children of the row.</p>
*/
/**
* @class Titanium.UI.TableViewSection
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TableViewSection.yml
* <p>A table view section is a container within a table used to organize table view rows.</p>
* @description <p>Use the {@link Titanium.UI#method-createTableViewSection} method or <strong><code><TableViewSection></code></strong> Alloy element to
create a <code>TableViewSection</code>.</p>
<p>Before the table is rendered, the <code>TableViewSection</code> {@link Titanium.UI.TableViewSection#method-add add}
method may be used to add {@link Titanium.UI.TableViewRow TableViewRow} objects to a section. After
it is rendered, one of the <code>TableView</code> {@link Titanium.UI.TableView#method-insertRowBefore insertRowBefore},
{@link Titanium.UI.TableView#method-insertRowAfter insertRowAfter}, or
{@link Titanium.UI.TableView#method-appendRow appendRow} methods must be used instead. </p>
<p>To remove a row from a section after the table is rendered, use the <code>TableView</code>
{@link Titanium.UI.TableView#method-deleteRow deleteRow} method. </p>
<p>In order for a section to be visible, either its <code>headerTitle</code> or <code>headerView</code> property must be
configured. </p>
<p>Starting in Release 3.0, you can directly manipulate the sections in a table using the
following <code>TableView</code> APIs:</p>
<ul>
<li>To set all sections in a table view at one time, use the <code>TableView</code>
{@link Titanium.UI.TableView#property-sections sections} property.</li>
<li>To add an individual section after a table view is rendered, use either the <code>TableView</code>
{@link Titanium.UI.TableView#method-insertSectionBefore insertSectionBefore}
or {@link Titanium.UI.TableView#method-insertSectionAfter insertSectionAfter} method.</li>
<li>To add one or more sections to the end of a table view after it is rendered, use the <code>TableView</code>
{@link Titanium.UI.TableView#method-appendSection appendSection} method.</li>
<li>To remove an individual section after a table view is rendered, use the <code>TableView</code>
{@link Titanium.UI.TableView#method-deleteSection deleteSection} method.</li>
</ul>
<p>Prior to Release 3.0, adding or removing sections individually is not supported. Instead, use the
<code>TableView</code> {@link Titanium.UI.TableView#property-data data} property to refresh the whole table with a
new section layout. </p>
<p>See the description and examples sections of {@link Titanium.UI.TableView TableView} for more details
about how to use <code>TableViewSection</code>.</p>
<p><strong>Note</strong>: On some platforms, <code>TableViewSection</code> may be implemented as a type of view
(that is, an object that inherits from {@link Titanium.UI.View View}). However, this is an
implementation detail. For portability, you should only use the documented APIs on
table view sections.</p>
*/
/**
* @method add
* <p>Adds a table view row to this section.</p>
* @description <p>Should be called before adding the section to a table. Calling <code>add</code> on a section
that's already been added to a table does not update the table.</p>
<p>To add a row to a section after it's been added to a table, call one of the
<code>TableView</code> methods, {@link Titanium.UI.TableView#method-insertRowBefore insertRowBefore},
{@link Titanium.UI.TableView#method-insertRowAfter insertRowAfter}, or
{@link Titanium.UI.TableView#method-appendRow appendRow}.</p>
<p>On Android, it is possible to update a section by adding or removing rows and then
resetting the table view's <code>data</code> property. However, this approach is not
portable and is not recommended.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Row to add.</p>
*/
/**
* @method remove
* <p>Removes a table view row from this section.</p>
* @description <p>Should be called before a section is added to a table. Calling <code>remove</code> on
a section that's already been added to a table may throw an exception.</p>
<p>To delete a row once the section is added to a table, use the <code>TableView</code>
{@link Titanium.UI.TableView#method-deleteRow deleteRow} method.</p>
<p>On Android, it is possible to update a section by adding or removing rows and then
resetting the table view's <code>data</code> property. However, this approach is not
portable and is not recommended.</p>
* @param {Titanium.UI.TableViewRow} row
<p>Row to remove.</p>
*/
/**
* @method rowAtIndex
* <p>Returns a row in this section.</p>
* @param {Number} index
<p>Section index of a row.</p>
* @returns {Titanium.UI.TableViewRow}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
* @method getFooterTitle
* <p>Gets the value of the {@link Titanium.UI.TableViewSection#property-footerTitle} property.</p>
* @returns {String}
*/
* @method setFooterTitle
* <p>Sets the value of the {@link Titanium.UI.TableViewSection#property-footerTitle} property.</p>
* @param {String} footerTitle
<p>New value for the property.</p>
*/
* @method getFooterView
* <p>Gets the value of the {@link Titanium.UI.TableViewSection#property-footerView} property.</p>
* @returns {Titanium.UI.View}
*/
* @method setFooterView
* <p>Sets the value of the {@link Titanium.UI.TableViewSection#property-footerView} property.</p>
* @param {Titanium.UI.View} footerView
<p>New value for the property.</p>
*/
* @method getHeaderTitle
* <p>Gets the value of the {@link Titanium.UI.TableViewSection#property-headerTitle} property.</p>
* @returns {String}
*/
* @method setHeaderTitle
* <p>Sets the value of the {@link Titanium.UI.TableViewSection#property-headerTitle} property.</p>
* @param {String} headerTitle
<p>New value for the property.</p>
*/
* @method getHeaderView
* <p>Gets the value of the {@link Titanium.UI.TableViewSection#property-headerView} property.</p>
* @returns {Titanium.UI.View}
*/
* @method setHeaderView
* <p>Sets the value of the {@link Titanium.UI.TableViewSection#property-headerView} property.</p>
* @param {Titanium.UI.View} headerView
<p>New value for the property.</p>
*/
/**
* @method getRowCount
* <p>Gets the value of the {@link Titanium.UI.TableViewSection#property-rowCount} property.</p>
* @returns {Number}
*/
/**
* @method getRows
* <p>Gets the value of the {@link Titanium.UI.TableViewSection#property-rows} property.</p>
* @returns {Titanium.UI.TableViewRow[]}
*/
* @property footerTitle
* @type String
* <p>Title of this section footer.</p>
* @description <p>Using this property and <code>footerView</code> together is not supported. Use one or the other. </p>
<p>On Android, must be set at creation.</p>
*/
* @property footerView
* @type Titanium.UI.View
* <p>View to use for this section footer.</p>
* @description <p>Using this property and <code>footerTitle</code> together is not supported. Use one or the other. </p>
<p>On Android, must be set at creation. </p>
*/
* @property headerTitle
* @type String
* <p>Title of this section header.</p>
* @description <p>Using this property and <code>headerView</code> together is not supported. Use one or the other. </p>
<p>On Android, must be set at creation.</p>
*/
* @property headerView
* @type Titanium.UI.View
* <p>View to use for this section header.</p>
* @description <p>Using this property and <code>headerTitle</code> together is not supported. Use one or the other. </p>
<p>On Android, must be set at creation. </p>
<p>In Alloy, you can use a <code><HeaderView></code> element inside a <code><TableViewSection></code> element:</p>
<pre><code><Alloy>
<TableView filterAttribute="title">
<SearchBar platform="android,ios"/>
<TableViewSection>
<HeaderView>
<View backgroundColor="#a00" height="50dp"/>
</HeaderView>
<FooterView>
<View backgroundColor="#0a0" height="50dp"/>
</FooterView>
<TableViewRow title="Row 1"/>
<TableViewRow title="Row 2"/>
<TableViewRow title="Row 3"/>
</TableViewSection>
</TableView>
</Alloy>
</code></pre>
*/
/**
* @property rowCount
* @type Number
* @readonly
* <p>Number of rows in this section.</p>
*/
/**
* @property rows
* @type Titanium.UI.TableViewRow[]
* @readonly
* <p>Rows in this section.</p>
*/
/**
* @class Titanium.UI.TextArea
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TextArea.yml
* <p>A multiline text field that supports editing and scrolling.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/textarea/textarea_android.png" height="50" /></td>
<td><img src="images/textarea/textarea_ios.png" height="50" /></td>
<td><img src="images/textarea/textarea_mobileweb.png" height="50" /></td>
<td><img src="images/textarea/textarea_wp.png" height="50" /></td>
</tr>
<tr><th>Android</th><th>iOS</th><th>Mobile Web</th><th>Windows Phone</th></tr>
</table>
<p>Use the {@link Titanium.UI#method-createTextArea} method or <strong><TextArea></strong> Alloy element to create a text area.</p>
* <h3>Examples</h3>
<h4>Basic Text Area with Customizations</h4>
<p>This example creates a highly customized text area.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var textArea = Ti.UI.createTextArea({
borderWidth: 2,
borderColor: '#bbb',
borderRadius: 5,
color: '#888',
font: {fontSize:20, fontWeight:'bold'},
keyboardType: Ti.UI.KEYBOARD_NUMBER_PAD,
returnKeyType: Ti.UI.RETURNKEY_GO,
textAlign: 'left',
value: 'I am a textarea',
top: 60,
width: 300, height : 70
});
win.add(textArea);
win.open();
</code></pre><h4>Text Area with Custom Keyboard Toolbar (iOS)</h4>
<p>On iOS, a configurable toolbar can be displayed above the virtual keyboard.
Toolbars can be used with both text areas and text fields. See {@link Titanium.UI.iOS.Toolbar}
for more information.</p>
<p>This code excerpt creates a text area with a toolbar:</p>
<p>Example using a custom keyboard toolbar:</p>
<pre><code>var send = Ti.UI.createButton({
style : Ti.UI.iOS.SystemButtonStyle.DONE,
title : 'Send'
});
var camera = Ti.UI.createButton({
systemButton : Ti.UI.iOS.SystemButton.CAMERA
});
var cancel = Ti.UI.createButton({
systemButton : Ti.UI.iOS.SystemButton.CANCEL
});
var flexSpace = Ti.UI.createButton({
systemButton : Ti.UI.iOS.SystemButton.FLEXIBLE_SPACE
});
var textarea = Ti.UI.createTextArea({
borderColor : '#000',
color : '#000',
keyboardToolbar : [cancel, flexSpace, camera, flexSpace, send],
keyboardToolbarColor : '#999',
keyboardToolbarHeight : 40,
value : 'Focus to see keyboard with toolbar',
top : 10,
width : 300, height : 120
});
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous basic text area with customizations example as an Alloy view.</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white">
<TextArea id="textArea"
borderWidth="2" borderColor="#bbb" borderRadius="5"
color="#888" textAlign="left" value="I am a textarea"
top="60" width="300" height="70" />
</Window>
</Alloy>
</code></pre>
*/
/**
* @event focus
* <p>Fired when this text area gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {String} value
<p>Value of this text area.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event blur
* <p>Fired when this text area loses focus.</p>
* @param {String} value
<p>Value of this text area.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event link
* <p>Fired when user interacts with a URL in the text area. See {@link Titanium.UI.TextArea#property-handleLinks handleLinks}.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>The URL is set using the {@link Titanium.UI#property-ATTRIBUTE_LINK ATTRIBUTE_LINK} property on the {@link Titanium.UI.TextArea#property-attributedString attributedString}.
This event is fired even in handleLinks is set to false. Only valid on iOS7 and above.</p>
* @param {String} url
<p>The URL that is associated with this event.</p>
* @param {Array} range
<p>An array of two numbers [location, length] describing the character range of the text associated with this URL.</p>
* @param {Boolean} bubbles
<p>This is false. This event does not bubble.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @event change
* <p>Fired when this text area value changes.</p>
* @param {String} value
<p>New value of this text area.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event return
* <p>Fired when the return key is pressed on the keyboard.</p>
* @param {String} value
<p>Value of this text area.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event selected
* <p>Fired when text in this text area is selected.</p>
* @param {textAreaSelectedParams} range
<p>Dictionary that describes the position and length of the selected text.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method remove
* <p>Removes a child view from this view's hierarchy.</p>
* @description <p>See also: {@link Titanium.UI.TextArea#method-add add}, {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method add
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>Adding children to a <code>TextArea</code> is not supported on all platforms.</p>
<p>If you need to display views on top of this object, consider using
another view as a container for both this object and the views you want
to appear on top of it.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method blur
* <p>Forces this text area to lose focus.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method hasText
* <p>Returns <code>true</code> if this text area contains text.</p>
* @returns {Boolean}True if this text area contains text.
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
*/
/**
* @method setSelection
* <p>Selects the text in range (start, end).</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @description <p>Selects the text in range (start, end). If start equals end, no text will be selected,
and the cursor will move to the start position. End is not inclusive, meaning setSelection(0,0)
will not select the first character, but will move the cursor to the position before the first character.</p>
<p>On iOS, soft keyboard would show when text is selected.</p>
* @param {Number} start
<p>Start index for selection. Value ranges from 0 to the text's length.</p>
* @param {Number} end
<p>End index for selection, not inclusive. Value ranges from 0 to the text's length.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method focus
* <p>Forces this text area to gain focus.</p>
*/
/**
* @method getAppearance
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-appearance} property.</p>
* @deprecated 5.2.0 Use <Titanium.UI.TextArea.keyboardAppearance> instead.
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setAppearance
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-appearance} property.</p>
* @deprecated 5.2.0 Use <Titanium.UI.TextArea.keyboardAppearance> instead.
* @param {Number} appearance
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getKeyboardAppearance
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-keyboardAppearance} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setKeyboardAppearance
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-keyboardAppearance} property.</p>
* @param {Number} keyboardAppearance
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getAttributedString
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-attributedString} property.</p>
* @returns {Titanium.UI.AttributedString}
* @platform android 3.6.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setAttributedString
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-attributedString} property.</p>
* @param {Titanium.UI.AttributedString} attributedString
<p>New value for the property.</p>
* @platform android 3.6.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getAutocapitalization
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-autocapitalization} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setAutocapitalization
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-autocapitalization} property.</p>
* @param {Number} autocapitalization
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getAutoLink
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-autoLink} property.</p>
* @returns {Number}
* @platform android 3.0.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setAutoLink
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-autoLink} property.</p>
* @param {Number} autoLink
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getClearOnEdit
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-clearOnEdit} property.</p>
* @returns {Boolean}
* @platform android 0.8
*/
/**
* @method setClearOnEdit
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-clearOnEdit} property.</p>
* @param {Boolean} clearOnEdit
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getEllipsize
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-ellipsize} property.</p>
* @returns {Boolean}
* @platform android 0.8
*/
/**
* @method setEllipsize
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-ellipsize} property.</p>
* @param {Boolean} ellipsize
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getEnableReturnKey
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-enableReturnKey} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setEnableReturnKey
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-enableReturnKey} property.</p>
* @param {Boolean} enableReturnKey
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getHintTextColor
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-hintTextColor} property.</p>
* @returns {String}
* @platform android 4.1.0
*/
/**
* @method setHintTextColor
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-hintTextColor} property.</p>
* @param {String} hintTextColor
<p>New value for the property.</p>
* @platform android 4.1.0
*/
/**
* @method getHandleLinks
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-handleLinks} property.</p>
* @returns {Boolean}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setHandleLinks
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-handleLinks} property.</p>
* @param {Boolean} handleLinks
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getKeyboardToolbar
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-keyboardToolbar} property.</p>
* @returns {Titanium.UI.View[]/Titanium.UI.iOS.Toolbar}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setKeyboardToolbar
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-keyboardToolbar} property.</p>
* @param {Array<Titanium.UI.View>/Titanium.UI.iOS.Toolbar} keyboardToolbar
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getKeyboardToolbarColor
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-keyboardToolbarColor} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setKeyboardToolbarColor
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-keyboardToolbarColor} property.</p>
* @param {String} keyboardToolbarColor
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getKeyboardToolbarHeight
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-keyboardToolbarHeight} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setKeyboardToolbarHeight
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-keyboardToolbarHeight} property.</p>
* @param {Number} keyboardToolbarHeight
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getPadding
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-padding} property.</p>
* @returns {TextAreaPadding}
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setPadding
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-padding} property.</p>
* @param {TextAreaPadding} padding
<p>New value for the property.</p>
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getPaddingLeft
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-paddingLeft} property.</p>
* @deprecated 6.0.0 Use <Titanium.UI.TextArea.padding> instead.
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setPaddingLeft
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-paddingLeft} property.</p>
* @deprecated 6.0.0 Use <Titanium.UI.TextArea.padding> instead.
* @param {Number} paddingLeft
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getPaddingRight
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-paddingRight} property.</p>
* @deprecated 6.0.0 Use <Titanium.UI.TextArea.padding> instead.
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setPaddingRight
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-paddingRight} property.</p>
* @deprecated 6.0.0 Use <Titanium.UI.TextArea.padding> instead.
* @param {Number} paddingRight
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getReturnKeyType
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-returnKeyType} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setReturnKeyType
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-returnKeyType} property.</p>
* @param {Number} returnKeyType
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getScrollsToTop
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-scrollsToTop} property.</p>
* @returns {Boolean}
* @platform iphone 2.1.2
* @platform ipad 2.1.2
*/
/**
* @method setScrollsToTop
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-scrollsToTop} property.</p>
* @param {Boolean} scrollsToTop
<p>New value for the property.</p>
* @platform iphone 2.1.2
* @platform ipad 2.1.2
*/
/**
* @method getShowUndoRedoActions
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-showUndoRedoActions} property.</p>
* @returns {Boolean}
* @platform ipad 5.0.0
*/
/**
* @method setShowUndoRedoActions
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-showUndoRedoActions} property.</p>
* @param {Boolean} showUndoRedoActions
<p>New value for the property.</p>
* @platform ipad 5.0.0
*/
/**
* @method getSuppressReturn
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-suppressReturn} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setSuppressReturn
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-suppressReturn} property.</p>
* @param {Boolean} suppressReturn
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getScrollable
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-scrollable} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setScrollable
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-scrollable} property.</p>
* @param {Boolean} scrollable
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getAutocorrect
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-autocorrect} property.</p>
* @returns {Boolean}
*/
/**
* @method setAutocorrect
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-autocorrect} property.</p>
* @param {Boolean} autocorrect
<p>New value for the property.</p>
*/
/**
* @method getColor
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-color} property.</p>
* @returns {String}
*/
/**
* @method setColor
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-color} property.</p>
* @param {String} color
<p>New value for the property.</p>
*/
/**
* @method getEditable
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-editable} property.</p>
* @returns {Boolean}
*/
/**
* @method setEditable
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-editable} property.</p>
* @param {Boolean} editable
<p>New value for the property.</p>
*/
/**
* @method getFont
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-font} property.</p>
* @returns {Font}
*/
/**
* @method setFont
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-font} property.</p>
* @param {Font} font
<p>New value for the property.</p>
*/
/**
* @method getHintText
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-hintText} property.</p>
* @returns {String}
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setHintText
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-hintText} property.</p>
* @param {String} hintText
<p>New value for the property.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getKeyboardType
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-keyboardType} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setKeyboardType
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-keyboardType} property.</p>
* @param {Number} keyboardType
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getMaxLength
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-maxLength} property.</p>
* @returns {Number}
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method setMaxLength
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-maxLength} property.</p>
* @param {Number} maxLength
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @method getSelection
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-selection} property.</p>
* @returns {textAreaSelectedParams}
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @method getTextAlign
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-textAlign} property.</p>
* @returns {String/Number}
*/
/**
* @method setTextAlign
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-textAlign} property.</p>
* @param {String/Number} textAlign
<p>New value for the property.</p>
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-value} property.</p>
* @returns {String}
*/
/**
* @method setValue
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-value} property.</p>
* @param {String} value
<p>New value for the property.</p>
*/
/**
* @method getVerticalAlign
* <p>Gets the value of the {@link Titanium.UI.TextArea#property-verticalAlign} property.</p>
* @returns {Number/String}
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setVerticalAlign
* <p>Sets the value of the {@link Titanium.UI.TextArea#property-verticalAlign} property.</p>
* @param {Number/String} verticalAlign
<p>New value for the property.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property [appearance={@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}]
* @type Number
* <p>Determines the appearance of the keyboard displayed when this text area is focused.</p>
* @deprecated 5.2.0 Use <Titanium.UI.TextArea.keyboardAppearance> instead.
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_ALERT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DARK}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_LIGHT}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [keyboardAppearance={@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}]
* @type Number
* <p>Determines the appearance of the keyboard displayed when this text area is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_ALERT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DARK}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_LIGHT}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property attributedString
* @type Titanium.UI.AttributedString
* <p>TextArea attributed string.</p>
* @description <p>The underlying attributed string drawn by the textArea. If set, avoid setting common attributes
in textArea, such as <code>value</code>, <code>color</code> and <code>font</code>, as unexpected behaviors may result. </p>
<p>Prior to Release 3.6.0, assign this property an object from the
{@link Titanium.UI.iOS.AttributedString} class.</p>
<p>Since Appcelerator CLI 4.1.0 (Alloy 1.7.0), for Alloy, you can use an <code><AttributedString></code>
element inside a <code><TextArea></code> element and set the text property as node text:</p>
<pre><code><Alloy>
<Window>
<TextArea>
<AttributedString>
Alloy is great!
</AttributedString>
</TextArea>
</Window>
</Alloy>
</code></pre>
<p>Then set attributes in the TSS file:</p>
<pre><code>"AttributedString" : {
attributes: [
{
type: Ti.UI.ATTRIBUTE_FOREGROUND_COLOR,
value: 'red',
range: [0, 5]
},
{
type: Ti.UI.ATTRIBUTE_UNDERLINES_STYLE,
value: Ti.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE,
range: [9, 5]
}
]
}
</code></pre>
* @platform android 3.6.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [autocapitalization={@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_NONE}]
* @type Number
* <p>Determines how text is capitalized during typing.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_ALL}
<li> {@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_NONE}
<li> {@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_SENTENCES}
<li> {@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_WORDS}
</ul></p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [autoLink={@link Titanium.UI#property-AUTOLINK_NONE}]
* @type Number
* <p>Automatically convert text to clickable links.</p>
* @description <p>iOS supports an additional autolink type, {@link Titanium.UI#property-AUTOLINK_CALENDAR AUTOLINK_CALENDAR}.</p>
<p>Multiple autolink values can be combined with a bitwise OR. For example:</p>
<pre><code>textArea.autoLink = Ti.UI.AUTOLINK_MAP_ADDRESSES|Ti.UI.AUTOLINK_PHONE_NUMBERS;
</code></pre>
<p>Prior to Release 3.0, this field used platform-specific constants. These are now
deprecated in favor of the <code>AUTOLINK</code> constants.</p>
<p>On Android, the <code>LINKIFY</code> legacy constants are defined in {@link Titanium.UI.Android}.</p>
<p>On iOS, the <code>AUTODETECT</code> legacy constants are defined in {@link Titanium.UI.iOS}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-AUTOLINK_MAP_ADDRESSES}
<li> {@link Titanium.UI#property-AUTOLINK_ALL}
<li> {@link Titanium.UI#property-AUTOLINK_CALENDAR}
<li> {@link Titanium.UI#property-AUTOLINK_URLS}
<li> {@link Titanium.UI#property-AUTOLINK_NONE}
<li> {@link Titanium.UI#property-AUTOLINK_PHONE_NUMBERS}
<li> {@link Titanium.UI#property-AUTOLINK_EMAIL_ADDRESSES}
</ul></p>
* @platform android 3.0.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [clearOnEdit=false]
* @type Boolean
* <p>Determines whether the value of this text area should be cleared when it is focused.</p>
* @platform android 0.8
*/
/**
* @property [ellipsize=false]
* @type Boolean
* <p>Determines whether an ellipsis (<code>...</code>) should be used to indicate truncated text.</p>
* @platform android 0.8
*/
/**
* @property [enableReturnKey=false]
* @type Boolean
* <p>Determines whether the return key is enabled automatically when there is text in this text
area.</p>
* @description <p>If <code>true</code>, the return key is <strong>disabled</strong> when this text area is empty, and
automatically enabled as soon as the user types any text in the area.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [hintTextColor=Default Android theme's hint text color.]
* @type String
* <p>Color of hint text that displays when field is empty.</p>
* @description <p>Hint text color in Android is determined by the theme of the application. By default, the
theme is <code>Theme.AppCompat</code> which is a Dark theme. When you create the background to be white,
the hint text color would also be white, hence not visible to the user. To change this, you can
edit the tiapp.xml file with another theme. Example as follows:</p>
<pre><code><android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<application android:theme="@style/Theme.AppCompat.Light"/>
</manifest>
</android>
</code></pre>
<p>Another way to change the hint text color is to use this property and specify a color.</p>
* @platform android 4.1.0
*/
/**
* @property [handleLinks=false]
* @type Boolean
* <p>Specifies if the text area should allow user interaction with the given URL in the given range of text.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>When the text is specified using an attributed string and the text has an attribute of type {@link Titanium.UI#property-ATTRIBUTE_LINK ATTRIBUTE_LINK},
this property controls if the system should handle that link automatically. Only valid on iOS 7 and above. </p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property keyboardToolbar
* @type Titanium.UI.View[]/Titanium.UI.iOS.Toolbar
* <p>Array of toolbar button objects or a {@link Titanium.UI.iOS.Toolbar toolbar} to be used when the
keyboard is displayed.</p>
* @description <p>As of Release 2.0, because iOS disallows a view (including toolbar buttons) to be in two places at
once, developers desiring textAreas or {@link Titanium.UI.TextField textFields} to share a toolbar
can instead use a single {@link Titanium.UI.iOS.Toolbar toolbar} instead of having arrays sharing
toolbar buttons.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property keyboardToolbarColor
* @type String
* <p>Color of the keyboard toolbar if keyboardToolbar is an array, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property keyboardToolbarHeight
* @type Number
* <p>Height of the keyboard toolbar if keyboardToolbar is an array.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property padding
* @type TextAreaPadding
* <p>Sets the left and right padding of this TextArea. The text will always be vertically centered.</p>
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property paddingLeft
* @type Number
* <p>Left padding of this text field.</p>
* @deprecated 6.0.0 Use <Titanium.UI.TextArea.padding> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property paddingRight
* @type Number
* <p>Right padding of this text field.</p>
* @deprecated 6.0.0 Use <Titanium.UI.TextArea.padding> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [returnKeyType={@link Titanium.UI#property-RETURNKEY_DEFAULT}]
* @type Number
* <p>Specifies the text to display on the keyboard <code>Return</code> key when this text area is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-RETURNKEY_CONTINUE}
<li> {@link Titanium.UI#property-RETURNKEY_DEFAULT}
<li> {@link Titanium.UI#property-RETURNKEY_DONE}
<li> {@link Titanium.UI#property-RETURNKEY_EMERGENCY_CALL}
<li> {@link Titanium.UI#property-RETURNKEY_GO}
<li> {@link Titanium.UI#property-RETURNKEY_GOOGLE}
<li> {@link Titanium.UI#property-RETURNKEY_JOIN}
<li> {@link Titanium.UI#property-RETURNKEY_NEXT}
<li> {@link Titanium.UI#property-RETURNKEY_ROUTE}
<li> {@link Titanium.UI#property-RETURNKEY_SEARCH}
<li> {@link Titanium.UI#property-RETURNKEY_SEND}
<li> {@link Titanium.UI#property-RETURNKEY_YAHOO}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [scrollsToTop=true]
* @type Boolean
* <p>Controls whether the scroll-to-top gesture is effective.</p>
* @description <p>The scroll-to-top gesture is a tap on the status bar; The default value of this property is true.
This gesture works when you have a single visible text area.
If there are multiple table views, web views, text areas, and/or scroll views visible,
you will need to disable (set to false) on the above views you DON'T want this
behaviour on. The remaining view will then respond to scroll-to-top gesture. </p>
* @platform iphone 2.1.2
* @platform ipad 2.1.2
*/
/**
* @property [showUndoRedoActions=true]
* @type Boolean
* <p>Determinates if the undo and redo buttons on the left side of the keyboard should be displayed or not. Only valid on iOS9 and above. This property can only be set upon creation.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @platform ipad 5.0.0
*/
/**
* @property suppressReturn
* @type Boolean
* <p>Determines if the return key should be suppressed during text entry.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [scrollable=true]
* @type Boolean
* <p>Determines whether this text area can be scrolled.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property autocorrect
* @type Boolean
* <p>Determines whether to automatically correct text entered into this text area.</p>
* @description <p>Set to <code>true</code> to enable automatic spelling correction. On iOS 9+, this can be used to disable QuickType suggestions.</p>
<p>If this property is not explicitly defined, it behaves as though it were set to <code>true</code>.</p>
<p>On Android and iOS, the returned default value is undefined, and on Mobile Web, the returned
default value is <code>false</code>, but all behave as if the value is <code>true</code>.</p>
*/
/**
* @property color
* @type String
* <p>Color of the text in this text area, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property [editable=true]
* @type Boolean
* <p>Determines whether this field can be edited.</p>
*/
/**
* @property font
* @type Font
* <p>Font to use for text.</p>
*/
/**
* @property [hintText=No hint text.]
* @type String
* <p>Hint text to display when the field is empty.</p>
* @description <p>Hint text is hidden when the user enters text into this text area.</p>
<p>Use the backslash and letter <code>n</code> line feed character combination, ie <code>\n</code>, to force a new
line. </p>
<p>Use unicode characters, such as those included in (but not limited to) the
<a href="http://en.wikibooks.org/w/index.php?title=Unicode/List_of_useful_symbols">Unicode List of Useful Symbols</a>
section of wikipedia, to insert special characters and symbols.</p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property [keyboardType={@link Titanium.UI#property-KEYBOARD_DEFAULT}]
* @type Number
* <p>Keyboard type to display when this text area is focused.</p>
* @description <p>When asking for a specific kind of user input, such as a phone number or email
address, you should always specify the appropriate keyboard type.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_ALERT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DARK}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_LIGHT}
<li> {@link Titanium.UI#property-KEYBOARD_ASCII}
<li> {@link Titanium.UI#property-KEYBOARD_DECIMAL_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_EMAIL}
<li> {@link Titanium.UI#property-KEYBOARD_NAMEPHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_NUMBERS_PUNCTUATION}
<li> {@link Titanium.UI#property-KEYBOARD_NUMBER_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_PHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_URL}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_DECIMAL_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_ASCII}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_EMAIL}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NAMEPHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBERS_PUNCTUATION}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBER_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_PHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_WEBSEARCH}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_TWITTER}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_URL}
</ul></p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property [maxLength=-1]
* @type Number
* <p>Maximum length of text field input.</p>
* @description <p>Any attempt to input text beyond this length (including pasting a string larger than <code>maxLength</code>) will not edit the field's contents. A value of -1 indicates unlimited length.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @platform windowsphone 4.1.0
*/
/**
* @property selection
* @type textAreaSelectedParams
* @readonly
* <p>Returns the currently selected text of the text area.</p>
* @description <p>This property is useful to track the current cursor position of the text area. On iOS this property
can be used in lieu of the {@link Titanium.UI.TextArea#event-selected selected} event.</p>
<p>This method will return null on android and undefined on iOS if the view has not yet been attached
to the window.</p>
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
* @platform windowsphone 4.1.0
*/
/**
* @property [textAlign={@link Titanium.UI#property-TEXT_ALIGNMENT_LEFT}]
* @type String/Number
* <p>Text alignment within this text area.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_CENTER}
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_LEFT}
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_RIGHT}
</ul></p>
*/
/**
* @property value
* @type String
* <p>Value of this text area, which may be set programmatically and modified by the user.</p>
* @description <p>Use the backslash and letter <code>n</code> line feed character combination, ie <code>\n</code>, to force a new
line. </p>
<p>Use unicode characters, such as those included in (but not limited to) the
<a href="http://en.wikibooks.org/w/index.php?title=Unicode/List_of_useful_symbols">Unicode List of Useful Symbols</a>
section of wikipedia, to insert special characters and symbols.</p>
*/
/**
* @property [verticalAlign={@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_TOP}]
* @type Number/String
* <p>Vertical alignment within this text area.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_BOTTOM}
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_CENTER}
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_TOP}
</ul></p>
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @class textAreaSelectedParams
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TextArea.yml
* <p>Dictionary object of parameters for the {@link Titanium.UI.TextArea#event-selected} event and {@link Titanium.UI.TextArea#property-selection} property that describes
position and length of the selected text.</p>
*/
/**
* @property location
* @type Number
* <p>Starting position of selected text.</p>
*/
/**
* @property length
* @type Number
* <p>Number of characters selected.</p>
*/
/**
* @class TextAreaPadding
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TextArea.yml
* <p>Dictionary object of parameters for the {@link Titanium.UI.TextArea#property-padding} that describes the padding</p>
*/
/**
* @property left
* @type Number
* <p>Left padding</p>
*/
/**
* @property right
* @type Number
* <p>Right padding</p>
*/
/**
* @class Titanium.UI.TextField
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TextField.yml
* <p>A single line text field.</p>
* @description <table id="platformComparison">
<tr>
<td><img src="images/textfield/textfield_android.png" height="25" /></td>
<td><img src="images/textfield/textfield_ios.png" height="25" /></td>
<td><img src="images/textfield/textfield_mobileweb.png" height="25" /></td>
<td><img src="images/textfield/textfield_wp.png" height="25" /></td>
</tr>
<tr><th>Android</th><th>iOS</th><th>Mobile Web</th><th>Windows Phone</th></tr>
</table>
<p>Use the {@link Titanium.UI#method-createTextField} method or <strong><code><TextField></code></strong> Alloy element to create a text field.</p>
* <h3>Examples</h3>
<h4>Basic Text Field with rounded border</h4>
<p>Create a simple text field with a round border style.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var textField = Ti.UI.createTextField({
borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
color: '#336699',
top: 10, left: 10,
width: 250, height: 60
});
win.add(textField);
win.open();
</code></pre><h4>Custom Keyboard Toolbar (iOS)</h4>
<p>On iOS, a configurable toolbar can be displayed above the virtual keyboard.
Toolbars can be used with both text areas and text fields. See {@link Titanium.UI.iOS.Toolbar}
for more information.</p>
<p>This code excerpt creates a text field with a toolbar:</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var send = Ti.UI.createButton({
title : 'Send',
style : Ti.UI.iOS.SystemButtonStyle.DONE,
});
var camera = Ti.UI.createButton({
systemButton : Ti.UI.iOS.SystemButton.CAMERA,
});
var cancel = Ti.UI.createButton({
systemButton : Ti.UI.iOS.SystemButton.CANCEL
});
var flexSpace = Ti.UI.createButton({
systemButton : Ti.UI.iOS.SystemButton.FLEXIBLE_SPACE
});
var textfield = Ti.UI.createTextField({
borderStyle : Ti.UI.INPUT_BORDERSTYLE_BEZEL,
hintText : 'Focus to see keyboard with toolbar',
keyboardToolbar : [cancel, flexSpace, camera, flexSpace, send],
keyboardToolbarColor : '#999',
keyboardToolbarHeight : 40,
top : 10,
width : 300, height : 35
});
win.add(textField);
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous basic text field with rounded border example as an Alloy view.</p>
<p>Define the <code>borderStyle</code> property in the TSS file.</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="white">
<TextField id="textField" borderStyle="Ti.UI.INPUT_BORDERSTYLE_ROUNDED" color="#336699" top="10" left="10" width="250" height="60" />
</Window>
</Alloy>
</code></pre><h4>Alloy Custom Keyboard Toolbar (iOS)</h4>
<p>Supported in Alloy 1.3.0 and later.</p>
<p>Previous custom keyboard toolbar example as an Alloy view. Use the <code><KeyboardToolbar></code> XML
element to set the <code>keyboardToolbar</code> property.</p>
<p>You can also declare the <code>leftButton</code> and <code>rightButton</code> properties in XML markup as the
<code><LeftButton></code> and <code><RightButton></code> XML elements.</p>
<pre><code><Alloy>
<Window fullscreen="true" backgroundColor="white">
<TextField
platform="ios"
borderStyle="Ti.UI.INPUT_BORDERSTYLE_BEZEL"
keyboardToolbarColor="#999" keyboardToolbarHeight="40"
top="10" height="35" width="300"
value="Focus to see keyboard with toolbar">
<!-- Sets the keyboardToolbar property -->
<KeyboardToolbar>
<Toolbar>
<Items>
<Button systemButton="CANCEL" />
<FlexSpace/>
<Button systemButton="CAMERA" />
<FlexSpace/>
<Button style="DONE">Send</Button>
</Items>
</Toolbar>
</KeyboardToolbar>
</TextField>
</Window>
</Alloy>
</code></pre>
*/
/**
* @event focus
* <p>Fired when the field gains focus.</p>
* @description <p>This event only fires when using the trackball to navigate.</p>
* @param {String} value
<p>Value of the field.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @event blur
* <p>Fired when the field loses focus.</p>
* @param {String} value
<p>Value of the field.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event change
* <p>Fired when the field value changes.</p>
* @param {String} value
<p>New value of the field.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event return
* <p>Fired when the return key is pressed on the keyboard.</p>
* @param {String} value
<p>Value of this text area.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method remove
* <p>Removes a child view from this view's hierarchy.</p>
* @description <p>See also: {@link Titanium.UI.TextField#method-add add}, {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method add
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>Adding children to a <code>TextField</code> is not supported on all platforms.</p>
<p>If you need to display views on top of this object, consider using
another view as a container for both this object and the views you want
to appear on top of it.</p>
<p>See also: {@link Titanium.UI.View#method-add}.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method blur
* <p>Forces the field to lose focus.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setSelection
* <p>Selects the text in range (start, end).</p>
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @description <p>Selects the text in range (start, end). If start equals end, no text will be selected,
and the cursor will move to the start position. End is not inclusive, meaning setSelection(0,0)
will not select the first character, but will move the cursor to the position before the first character.</p>
<p>On iOS, soft keyboard would show when text is selected.</p>
* @param {Number} start
<p>Start index for selection. Value ranges from 0 to the text's length.</p>
* @param {Number} end
<p>End index for selection, not inclusive. Value ranges from 0 to the text's length.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method focus
* <p>Forces the field to gain focus.</p>
*/
/**
* @method hasText
* <p>Returns <code>true</code> if this text field contains text.</p>
* @returns {Boolean}True if this text field contains text.
* @platform android 2.1.0
* @platform iphone 2.1.0
* @platform ipad 2.1.0
* @platform mobileweb 2.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method getAppearance
* <p>Gets the value of the {@link Titanium.UI.TextField#property-appearance} property.</p>
* @deprecated 5.2.0 Use <Titanium.UI.TextField.keyboardAppearance> instead.
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setAppearance
* <p>Sets the value of the {@link Titanium.UI.TextField#property-appearance} property.</p>
* @deprecated 5.2.0 Use <Titanium.UI.TextField.keyboardAppearance> instead.
* @param {Number} appearance
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getKeyboardAppearance
* <p>Gets the value of the {@link Titanium.UI.TextField#property-keyboardAppearance} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setKeyboardAppearance
* <p>Sets the value of the {@link Titanium.UI.TextField#property-keyboardAppearance} property.</p>
* @param {Number} keyboardAppearance
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getAttributedString
* <p>Gets the value of the {@link Titanium.UI.TextField#property-attributedString} property.</p>
* @returns {Titanium.UI.AttributedString}
* @platform android 3.6.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setAttributedString
* <p>Sets the value of the {@link Titanium.UI.TextField#property-attributedString} property.</p>
* @param {Titanium.UI.AttributedString} attributedString
<p>New value for the property.</p>
* @platform android 3.6.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getAttributedHintText
* <p>Gets the value of the {@link Titanium.UI.TextField#property-attributedHintText} property.</p>
* @returns {Titanium.UI.AttributedString}
* @platform android 3.6.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setAttributedHintText
* <p>Sets the value of the {@link Titanium.UI.TextField#property-attributedHintText} property.</p>
* @param {Titanium.UI.AttributedString} attributedHintText
<p>New value for the property.</p>
* @platform android 3.6.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getAutocapitalization
* <p>Gets the value of the {@link Titanium.UI.TextField#property-autocapitalization} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setAutocapitalization
* <p>Sets the value of the {@link Titanium.UI.TextField#property-autocapitalization} property.</p>
* @param {Number} autocapitalization
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getAutocorrect
* <p>Gets the value of the {@link Titanium.UI.TextField#property-autocorrect} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setAutocorrect
* <p>Sets the value of the {@link Titanium.UI.TextField#property-autocorrect} property.</p>
* @param {Boolean} autocorrect
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getAutoLink
* <p>Gets the value of the {@link Titanium.UI.TextField#property-autoLink} property.</p>
* @returns {Number}
* @platform android 3.0.0
*/
/**
* @method setAutoLink
* <p>Sets the value of the {@link Titanium.UI.TextField#property-autoLink} property.</p>
* @param {Number} autoLink
<p>New value for the property.</p>
* @platform android 3.0.0
*/
/**
* @method getBorderStyle
* <p>Gets the value of the {@link Titanium.UI.TextField#property-borderStyle} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setBorderStyle
* <p>Sets the value of the {@link Titanium.UI.TextField#property-borderStyle} property.</p>
* @param {Number} borderStyle
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getClearButtonMode
* <p>Gets the value of the {@link Titanium.UI.TextField#property-clearButtonMode} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setClearButtonMode
* <p>Sets the value of the {@link Titanium.UI.TextField#property-clearButtonMode} property.</p>
* @param {Number} clearButtonMode
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getClearOnEdit
* <p>Gets the value of the {@link Titanium.UI.TextField#property-clearOnEdit} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setClearOnEdit
* <p>Sets the value of the {@link Titanium.UI.TextField#property-clearOnEdit} property.</p>
* @param {Boolean} clearOnEdit
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getEllipsize
* <p>Gets the value of the {@link Titanium.UI.TextField#property-ellipsize} property.</p>
* @returns {Boolean}
* @platform android 0.8
*/
/**
* @method setEllipsize
* <p>Sets the value of the {@link Titanium.UI.TextField#property-ellipsize} property.</p>
* @param {Boolean} ellipsize
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getEnableReturnKey
* <p>Gets the value of the {@link Titanium.UI.TextField#property-enableReturnKey} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setEnableReturnKey
* <p>Sets the value of the {@link Titanium.UI.TextField#property-enableReturnKey} property.</p>
* @param {Boolean} enableReturnKey
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getHintTextColor
* <p>Gets the value of the {@link Titanium.UI.TextField#property-hintTextColor} property.</p>
* @returns {String}
* @platform android 4.1.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method setHintTextColor
* <p>Sets the value of the {@link Titanium.UI.TextField#property-hintTextColor} property.</p>
* @param {String} hintTextColor
<p>New value for the property.</p>
* @platform android 4.1.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method getInputType
* <p>Gets the value of the {@link Titanium.UI.TextField#property-inputType} property.</p>
* @returns {Number[]}
* @platform android 5.2.0
*/
/**
* @method setInputType
* <p>Sets the value of the {@link Titanium.UI.TextField#property-inputType} property.</p>
* @param {Array<Number>} inputType
<p>New value for the property.</p>
* @platform android 5.2.0
*/
/**
* @method getKeyboardToolbar
* <p>Gets the value of the {@link Titanium.UI.TextField#property-keyboardToolbar} property.</p>
* @returns {Titanium.UI.View[]/Titanium.UI.iOS.Toolbar}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setKeyboardToolbar
* <p>Sets the value of the {@link Titanium.UI.TextField#property-keyboardToolbar} property.</p>
* @param {Array<Titanium.UI.View>/Titanium.UI.iOS.Toolbar} keyboardToolbar
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getKeyboardToolbarColor
* <p>Gets the value of the {@link Titanium.UI.TextField#property-keyboardToolbarColor} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setKeyboardToolbarColor
* <p>Sets the value of the {@link Titanium.UI.TextField#property-keyboardToolbarColor} property.</p>
* @param {String} keyboardToolbarColor
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getKeyboardToolbarHeight
* <p>Gets the value of the {@link Titanium.UI.TextField#property-keyboardToolbarHeight} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setKeyboardToolbarHeight
* <p>Sets the value of the {@link Titanium.UI.TextField#property-keyboardToolbarHeight} property.</p>
* @param {Number} keyboardToolbarHeight
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getLeftButton
* <p>Gets the value of the {@link Titanium.UI.TextField#property-leftButton} property.</p>
* @returns {Object}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setLeftButton
* <p>Sets the value of the {@link Titanium.UI.TextField#property-leftButton} property.</p>
* @param {Object} leftButton
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getLeftButtonMode
* <p>Gets the value of the {@link Titanium.UI.TextField#property-leftButtonMode} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setLeftButtonMode
* <p>Sets the value of the {@link Titanium.UI.TextField#property-leftButtonMode} property.</p>
* @param {Number} leftButtonMode
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getLeftButtonPadding
* <p>Gets the value of the {@link Titanium.UI.TextField#property-leftButtonPadding} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setLeftButtonPadding
* <p>Sets the value of the {@link Titanium.UI.TextField#property-leftButtonPadding} property.</p>
* @param {Number} leftButtonPadding
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getMinimumFontSize
* <p>Gets the value of the {@link Titanium.UI.TextField#property-minimumFontSize} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setMinimumFontSize
* <p>Sets the value of the {@link Titanium.UI.TextField#property-minimumFontSize} property.</p>
* @param {Number} minimumFontSize
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getPadding
* <p>Gets the value of the {@link Titanium.UI.TextField#property-padding} property.</p>
* @returns {TextFieldPadding}
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setPadding
* <p>Sets the value of the {@link Titanium.UI.TextField#property-padding} property.</p>
* @param {TextFieldPadding} padding
<p>New value for the property.</p>
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getPaddingLeft
* <p>Gets the value of the {@link Titanium.UI.TextField#property-paddingLeft} property.</p>
* @deprecated 6.0.0 Use <Titanium.UI.TextField.padding> instead.
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setPaddingLeft
* <p>Sets the value of the {@link Titanium.UI.TextField#property-paddingLeft} property.</p>
* @deprecated 6.0.0 Use <Titanium.UI.TextField.padding> instead.
* @param {Number} paddingLeft
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getPaddingRight
* <p>Gets the value of the {@link Titanium.UI.TextField#property-paddingRight} property.</p>
* @deprecated 6.0.0 Use <Titanium.UI.TextField.padding> instead.
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setPaddingRight
* <p>Sets the value of the {@link Titanium.UI.TextField#property-paddingRight} property.</p>
* @deprecated 6.0.0 Use <Titanium.UI.TextField.padding> instead.
* @param {Number} paddingRight
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getReturnKeyType
* <p>Gets the value of the {@link Titanium.UI.TextField#property-returnKeyType} property.</p>
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setReturnKeyType
* <p>Sets the value of the {@link Titanium.UI.TextField#property-returnKeyType} property.</p>
* @param {Number} returnKeyType
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getRightButton
* <p>Gets the value of the {@link Titanium.UI.TextField#property-rightButton} property.</p>
* @returns {Object}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setRightButton
* <p>Sets the value of the {@link Titanium.UI.TextField#property-rightButton} property.</p>
* @param {Object} rightButton
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getRightButtonMode
* <p>Gets the value of the {@link Titanium.UI.TextField#property-rightButtonMode} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setRightButtonMode
* <p>Sets the value of the {@link Titanium.UI.TextField#property-rightButtonMode} property.</p>
* @param {Number} rightButtonMode
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getRightButtonPadding
* <p>Gets the value of the {@link Titanium.UI.TextField#property-rightButtonPadding} property.</p>
* @returns {Number}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setRightButtonPadding
* <p>Sets the value of the {@link Titanium.UI.TextField#property-rightButtonPadding} property.</p>
* @param {Number} rightButtonPadding
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getSuppressReturn
* <p>Gets the value of the {@link Titanium.UI.TextField#property-suppressReturn} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setSuppressReturn
* <p>Sets the value of the {@link Titanium.UI.TextField#property-suppressReturn} property.</p>
* @param {Boolean} suppressReturn
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getSelection
* <p>Gets the value of the {@link Titanium.UI.TextField#property-selection} property.</p>
* @returns {textFieldSelectedParams}
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getShowUndoRedoActions
* <p>Gets the value of the {@link Titanium.UI.TextField#property-showUndoRedoActions} property.</p>
* @returns {Boolean}
* @platform ipad 5.0.0
*/
/**
* @method setShowUndoRedoActions
* <p>Sets the value of the {@link Titanium.UI.TextField#property-showUndoRedoActions} property.</p>
* @param {Boolean} showUndoRedoActions
<p>New value for the property.</p>
* @platform ipad 5.0.0
*/
/**
* @method getColor
* <p>Gets the value of the {@link Titanium.UI.TextField#property-color} property.</p>
* @returns {String}
*/
/**
* @method setColor
* <p>Sets the value of the {@link Titanium.UI.TextField#property-color} property.</p>
* @param {String} color
<p>New value for the property.</p>
*/
/**
* @method getEditable
* <p>Gets the value of the {@link Titanium.UI.TextField#property-editable} property.</p>
* @returns {Boolean}
*/
/**
* @method setEditable
* <p>Sets the value of the {@link Titanium.UI.TextField#property-editable} property.</p>
* @param {Boolean} editable
<p>New value for the property.</p>
*/
/**
* @method getFont
* <p>Gets the value of the {@link Titanium.UI.TextField#property-font} property.</p>
* @returns {Font}
*/
/**
* @method setFont
* <p>Sets the value of the {@link Titanium.UI.TextField#property-font} property.</p>
* @param {Font} font
<p>New value for the property.</p>
*/
/**
* @method getHintText
* <p>Gets the value of the {@link Titanium.UI.TextField#property-hintText} property.</p>
* @returns {String}
*/
/**
* @method setHintText
* <p>Sets the value of the {@link Titanium.UI.TextField#property-hintText} property.</p>
* @param {String} hintText
<p>New value for the property.</p>
*/
/**
* @method getKeyboardType
* <p>Gets the value of the {@link Titanium.UI.TextField#property-keyboardType} property.</p>
* @returns {Number}
*/
/**
* @method setKeyboardType
* <p>Sets the value of the {@link Titanium.UI.TextField#property-keyboardType} property.</p>
* @param {Number} keyboardType
<p>New value for the property.</p>
*/
/**
* @method getMaxLength
* <p>Gets the value of the {@link Titanium.UI.TextField#property-maxLength} property.</p>
* @returns {Number}
* @platform android 3.0.0
* @platform iphone 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method setMaxLength
* <p>Sets the value of the {@link Titanium.UI.TextField#property-maxLength} property.</p>
* @param {Number} maxLength
<p>New value for the property.</p>
* @platform android 3.0.0
* @platform iphone 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method getPasswordMask
* <p>Gets the value of the {@link Titanium.UI.TextField#property-passwordMask} property.</p>
* @returns {Boolean}
*/
/**
* @method setPasswordMask
* <p>Sets the value of the {@link Titanium.UI.TextField#property-passwordMask} property.</p>
* @param {Boolean} passwordMask
<p>New value for the property.</p>
*/
/**
* @method getTextAlign
* <p>Gets the value of the {@link Titanium.UI.TextField#property-textAlign} property.</p>
* @returns {String/Number}
*/
/**
* @method setTextAlign
* <p>Sets the value of the {@link Titanium.UI.TextField#property-textAlign} property.</p>
* @param {String/Number} textAlign
<p>New value for the property.</p>
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.UI.TextField#property-value} property.</p>
* @returns {String}
*/
/**
* @method setValue
* <p>Sets the value of the {@link Titanium.UI.TextField#property-value} property.</p>
* @param {String} value
<p>New value for the property.</p>
*/
/**
* @method getVerticalAlign
* <p>Gets the value of the {@link Titanium.UI.TextField#property-verticalAlign} property.</p>
* @returns {Number/String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method setVerticalAlign
* <p>Sets the value of the {@link Titanium.UI.TextField#property-verticalAlign} property.</p>
* @param {Number/String} verticalAlign
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property [appearance={@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}]
* @type Number
* <p>Determines the appearance of the keyboard displayed when this field is focused.</p>
* @deprecated 5.2.0 Use <Titanium.UI.TextField.keyboardAppearance> instead.
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_ALERT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DARK}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_LIGHT}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [keyboardAppearance={@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}]
* @type Number
* <p>Determines the appearance of the keyboard displayed when this field is focused.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_ALERT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_DARK}
<li> {@link Titanium.UI#property-KEYBOARD_APPEARANCE_LIGHT}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property attributedString
* @type Titanium.UI.AttributedString
* <p>TextField attributed string.</p>
* @description <p>The underlying attributed string drawn by the textField. If set, avoid setting common attributes
in TextField, such as <code>value</code>, <code>color</code> and <code>font</code>, as unexpected behaviors may result. </p>
<p>Prior to Release 3.6.0, assign this property an object from the
{@link Titanium.UI.iOS.AttributedString} class.</p>
<p>Since Appcelerator CLI 4.1.0 (Alloy 1.7.0), for Alloy, you can use an <code><AttributedString></code>
element inside a <code><TextField></code> element and set the text property as node text:</p>
<pre><code><Alloy>
<Window>
<TextField>
<AttributedString>
Alloy is great!
</AttributedString>
</TextField>
</Window>
</Alloy>
</code></pre>
<p>Then set attributes in the TSS file:</p>
<pre><code>"AttributedString" : {
attributes: [
{
type: Ti.UI.ATTRIBUTE_FOREGROUND_COLOR,
value: 'red',
range: [0, 5]
},
{
type: Ti.UI.ATTRIBUTE_UNDERLINES_STYLE,
value: Ti.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE,
range: [9, 5]
}
]
}
</code></pre>
* @platform android 3.6.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property attributedHintText
* @type Titanium.UI.AttributedString
* <p>Hint text attributed string.</p>
* @description <p>The attributed hint text by the textField. If set, avoid setting common attributes
in textField, such as <code>hintText</code>, <code>color</code> and <code>font</code>, as unexpected behaviors may result. </p>
<p>Prior to Release 3.6.0, assign this property an object from the
{@link Titanium.UI.iOS.AttributedString} class.</p>
<p>Since Appcelerator CLI 4.1.0 (Alloy 1.7.0), for Alloy, you can use an <code><AttributedHintText></code>
element inside a <code><TextField></code> element and set the text property as node text:</p>
<pre><code><Alloy>
<Window>
<TextField>
<AttributedHintText>
Alloy is great!
</AttributedHintText>
</TextField>
</Window>
</Alloy>
</code></pre>
<p>Then set attributes in the TSS file:</p>
<pre><code>"AttributedString" : {
attributes: [
{
type: Ti.UI.ATTRIBUTE_FOREGROUND_COLOR,
value: 'red',
range: [0, 5]
},
{
type: Ti.UI.ATTRIBUTE_UNDERLINES_STYLE,
value: Ti.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE,
range: [9, 5]
}
]
}
</code></pre>
* @platform android 3.6.0
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [autocapitalization={@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_NONE}]
* @type Number
* <p>Determines how text is capitalized during typing.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_ALL}
<li> {@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_NONE}
<li> {@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_SENTENCES}
<li> {@link Titanium.UI#property-TEXT_AUTOCAPITALIZATION_WORDS}
</ul></p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property autocorrect
* @type Boolean
* <p>Determines whether to automatically correct text entered into this text field.</p>
* @description <p>Set to <code>true</code> to enable automatic spelling correction. On iOS 9+, this can be used to disable QuickType suggestions.</p>
<p>If this property is not explicitly defined, it behaves as though it were set to <code>true</code>.</p>
<p>On iOS and Mobile Web, the returned default value is <code>false</code>, and on Android, the returned
default value is undefined, but all behave as if the value is <code>true</code>.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property autoLink
* @type Number
* <p>Automatically convert text to clickable links.</p>
* @description <p>Multiple autolink values can be combined with a bitwise OR. For example:</p>
<pre><code>textField.autoLink = Ti.UI.AUTOLINK_MAP_ADDRESSES|Ti.UI.AUTOLINK_PHONE_NUMBERS;
</code></pre>
<p>Prior to Release 3.0, this field used platform-specific constants. These are now
deprecated in favor of the <code>AUTOLINK</code> constants listed above.</p>
<p>The Android-specific <code>LINKIFY</code> legacy constants are defined in {@link Titanium.UI.Android}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-AUTOLINK_MAP_ADDRESSES}
<li> {@link Titanium.UI#property-AUTOLINK_ALL}
<li> {@link Titanium.UI#property-AUTOLINK_CALENDAR}
<li> {@link Titanium.UI#property-AUTOLINK_URLS}
<li> {@link Titanium.UI#property-AUTOLINK_NONE}
<li> {@link Titanium.UI#property-AUTOLINK_PHONE_NUMBERS}
<li> {@link Titanium.UI#property-AUTOLINK_EMAIL_ADDRESSES}
</ul></p>
* @platform android 3.0.0
*/
/**
* @property [borderStyle={@link Titanium.UI#property-INPUT_BORDERSTYLE_NONE}]
* @type Number
* <p>Border style for the field.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-INPUT_BORDERSTYLE_BEZEL}
<li> {@link Titanium.UI#property-INPUT_BORDERSTYLE_LINE}
<li> {@link Titanium.UI#property-INPUT_BORDERSTYLE_NONE}
<li> {@link Titanium.UI#property-INPUT_BORDERSTYLE_ROUNDED}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [clearButtonMode=Titanium.UI.INPUT_BUTTONMODE_NEVER]
* @type Number
* <p>Determines when the clear button is displayed.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-INPUT_BUTTONMODE_ALWAYS}
<li> {@link Titanium.UI#property-INPUT_BUTTONMODE_NEVER}
<li> {@link Titanium.UI#property-INPUT_BUTTONMODE_ONBLUR}
<li> {@link Titanium.UI#property-INPUT_BUTTONMODE_ONFOCUS}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [clearOnEdit=false]
* @type Boolean
* <p>Determines whether the value of this text field should be cleared when it is focused.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [ellipsize=false]
* @type Boolean
* <p>Determines whether an ellipsis (<code>...</code>) should be used to indicate truncated text.</p>
* @platform android 0.8
*/
/**
* @property [enableReturnKey=false]
* @type Boolean
* <p>Determines whether the return key is enabled automatically when there is text in this text
field.</p>
* @description <p>If <code>true</code>, the return key is <strong>disabled</strong> when this text field is empty, and
automatically enabled as soon as the user types any text in the field.</p>
<p>On Android, if <code>true</code>, <code>return</code> event will not fire. Clicking on the return key will do nothing, but
the key itself won't be <strong>disabled</strong>.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property [hintTextColor=The platform's default hint text color.]
* @type String
* <p>Hint text color to display when the field is empty.</p>
* @description <p>Sets the color of the {@link Titanium.UI.TextField#property-hintText}. Please not that this can be overriden
by the {@link Titanium.UI.TextField#property-attributedHintText} which provides an advanced configuration to
style hint texts.</p>
<p><em>Note for Android</em>:
The hint text color in Android is determined by the theme of the application. By default, the
theme is 'Theme.AppCompat' which is a Dark theme. When you create the background to be white,
the hint text color would also be white, hence not visible to the user. To change this, you can
edit the tiapp.xml file with another theme. Example as follows:</p>
<pre><code><android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<application android:theme="@style/Theme.AppCompat.Light"/>
</manifest>
</android>
</code></pre>
<p>Another way to change the hint text color is to use this property and specify a color.</p>
* @platform android 4.1.0
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property [inputType=Empty array. If not defined, default is Keyboard type specified by {@link Titanium.UI.TextField#property-keyboardType}.]
* @type Number[]
* <p>Input type to accept in thetext field. Also influences the Keyboard type to display.</p>
* @description <p>When asking for a specific kind of user input, such as a phone number or email
address, you should always specify the input type that is accepted. This overrides
any changes to the keyboard done by the property {@link Titanium.UI.TextField#property-keyboardType}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-INPUT_TYPE_CLASS_NUMBER}
<li> {@link Titanium.UI#property-INPUT_TYPE_CLASS_TEXT}
</ul></p>
* @platform android 5.2.0
*/
/**
* @property keyboardToolbar
* @type Titanium.UI.View[]/Titanium.UI.iOS.Toolbar
* <p>Array of toolbar button objects or a {@link Titanium.UI.iOS.Toolbar toolbar} to be used when the
keyboard is displayed.</p>
* @description <p>As of Release 2.0, because iOS disallows a view (including toolbar buttons) to be in two places at
once, developers desiring textAreas or {@link Titanium.UI.TextField textFields} to share a toolbar
can instead use a single {@link Titanium.UI.iOS.Toolbar toolbar} instead of having arrays sharing
toolbar buttons.</p>
<p>In Alloy, you can use a <code><KeyboardToolbar></code> element inside a <code><TextField></code> element to create
a <code>KeyboardToolbar</code>.</p>
<pre><code><Alloy>
<TextField id="textfield" platform="ios" hintText="Tap here...">
<!-- even nested proxy properties -->
<KeyboardToolbar >
<Toolbar >
<Items >
<Button>button 1</Button>
<FlexSpace/>
<Button>button 2</Button>
</Items>
</Toolbar>
</KeyboardToolbar>
</TextField>
</Alloy>
</code></pre>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property keyboardToolbarColor
* @type String
* <p>Color of the keyboard toolbar if keyboardToolbar is an array, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property keyboardToolbarHeight
* @type Number
* <p>Height of the keyboard toolbar if keyboardToolbar is an array.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property leftButton
* @type Object
* <p>Left button view to display in the <code>TextField</code>.</p>
* @description <p>Set the <code>width</code> and <code>height</code> properties of the button or else it does not display in the
text field.</p>
<p>Using an object other than a {@link Titanium.UI.Button Button} may have unpredictable results.</p>
<p>In Alloy you can use a <code><LeftButton></code> element inside the <code><TextField></code> element.</p>
<pre><code><Alloy>
<Window>
<!-- iOS TextField proxy properties -->
<TextField id="textfield" platform="ios">
<LeftButton>
<Button onClick="sayHi" class="textButton">left</Button>
</LeftButton>
<RightButton>
<Button onClick="doAlert" class="textButton">right</Button>
</RightButton>
</TextField>
</Window>
</Alloy>
</code></pre>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [leftButtonMode={@link Titanium.UI#property-INPUT_BUTTONMODE_NEVER}]
* @type Number
* <p>Determines when to display the left button view.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-INPUT_BUTTONMODE_ALWAYS}
<li> {@link Titanium.UI#property-INPUT_BUTTONMODE_NEVER}
<li> {@link Titanium.UI#property-INPUT_BUTTONMODE_ONBLUR}
<li> {@link Titanium.UI#property-INPUT_BUTTONMODE_ONFOCUS}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property leftButtonPadding
* @type Number
* <p>Padding between the left button and the edge of the field.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property minimumFontSize
* @type Number
* <p>Minimum size of the font when the font is sized based on the contents. Enables font
scaling to fit.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property padding
* @type TextFieldPadding
* <p>Sets the padding of this text field.</p>
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property paddingLeft
* @type Number
* <p>Left padding of this text field.</p>
* @deprecated 6.0.0 Use <Titanium.UI.TextField.padding> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property paddingRight
* @type Number
* <p>Right padding of this text field.</p>
* @deprecated 6.0.0 Use <Titanium.UI.TextField.padding> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [returnKeyType={@link Titanium.UI#property-RETURNKEY_DEFAULT}]
* @type Number
* <p>Specifies the text to display on the keyboard <code>Return</code> key when this field is focused.</p>
* @description <p>Mobile Web on iOS devices only supports <code>RETURNKEY_DEFAULT</code>,
<code>RETURNKEY_GO</code>, <code>RETURNKEY_GOOGLE</code>, <code>RETURNKEY_SEARCH</code>, and <code>RETURNKEY_YAHOO</code>. Note that
<code>RETURNKEY_GOOGLE</code>, <code>RETURNKEY_SEARCH</code>, and <code>RETURNKEY_YAHOO</code> all display the word "Search".</p>
<p>Mobile Web on Android devices will only display "Go" regardless of this property's value.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-RETURNKEY_CONTINUE}
<li> {@link Titanium.UI#property-RETURNKEY_DEFAULT}
<li> {@link Titanium.UI#property-RETURNKEY_DONE}
<li> {@link Titanium.UI#property-RETURNKEY_EMERGENCY_CALL}
<li> {@link Titanium.UI#property-RETURNKEY_GO}
<li> {@link Titanium.UI#property-RETURNKEY_GOOGLE}
<li> {@link Titanium.UI#property-RETURNKEY_JOIN}
<li> {@link Titanium.UI#property-RETURNKEY_NEXT}
<li> {@link Titanium.UI#property-RETURNKEY_ROUTE}
<li> {@link Titanium.UI#property-RETURNKEY_SEARCH}
<li> {@link Titanium.UI#property-RETURNKEY_SEND}
<li> {@link Titanium.UI#property-RETURNKEY_YAHOO}
</ul></p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property rightButton
* @type Object
* <p>Right button view.</p>
* @description <p>Set the <code>width</code> and <code>height</code> properties of the button or else it does not display in the
text field.</p>
<p>Using an object other than a {@link Titanium.UI.Button Button} may have unpredictable results.
In Alloy you can use a <code><RightButton></code> element inside the <code><TextField></code> element.</p>
<pre><code><Alloy>
<Window>
<!-- iOS TextField proxy properties -->
<TextField id="textfield" platform="ios">
<LeftButton>
<Button onClick="sayHi" class="textButton">left</Button>
</LeftButton>
<RightButton>
<Button onClick="doAlert" class="textButton">right</Button>
</RightButton>
</TextField>
</Window>
</Alloy>
</code></pre>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [rightButtonMode=Titanium.UI.INPUT_BUTTONMODE_NEVER]
* @type Number
* <p>Determines when to display the right button view.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-INPUT_BUTTONMODE_ALWAYS}
<li> {@link Titanium.UI#property-INPUT_BUTTONMODE_NEVER}
<li> {@link Titanium.UI#property-INPUT_BUTTONMODE_ONBLUR}
<li> {@link Titanium.UI#property-INPUT_BUTTONMODE_ONFOCUS}
</ul></p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property rightButtonPadding
* @type Number
* <p>Padding between the right button and the edge of the field.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property suppressReturn
* @type Boolean
* <p>Determines whether the return key should be suppressed during entry.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property selection
* @type textFieldSelectedParams
* @readonly
* <p>Returns the currently selected text of the text field.</p>
* @description <p>This property is useful to track the current cursor position of the text field. On iOS this property
can only be used when the text field has focus. Accessing this property when text field does not have
focus will return an undefined value.</p>
<p>This method will return null on android and undefined on iOS if the view has not yet been attached
to the window.</p>
* @platform android 3.3.0
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [showUndoRedoActions=true]
* @type Boolean
* <p>Determinates if the undo and redo buttons on the left side of the keyboard should be displayed or not. Only valid on iOS9 and above.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @platform ipad 5.0.0
*/
/**
* @property color
* @type String
* <p>Color of the text in this text field, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property [editable=true]
* @type Boolean
* <p>Determines whether this field can be edited.</p>
*/
/**
* @property font
* @type Font
* <p>Font to use for text.</p>
*/
/**
* @property [hintText=No hint text.]
* @type String
* <p>Hint text to display when the field is empty.</p>
* @description <p>Hint text is hidden when the user enters text into this text field.</p>
<p>Use the backslash and letter <code>n</code> line feed character combination, ie <code>\n</code>, to force a new
line. </p>
<p>Use unicode characters, such as those included in (but not limited to) the
<a href="http://en.wikibooks.org/w/index.php?title=Unicode/List_of_useful_symbols">Unicode List of Useful Symbols</a>
section of wikipedia, to insert special characters and symbols.</p>
*/
/**
* @property [keyboardType={@link Titanium.UI#property-KEYBOARD_TYPE_DEFAULT}]
* @type Number
* <p>Keyboard type to display when this text field is focused.</p>
* @description <p>When asking for a specific kind of user input, such as a phone number or email
address, you should always specify the appropriate keyboard type.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_DECIMAL_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_ASCII}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_DEFAULT}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_EMAIL}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NAMEPHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBERS_PUNCTUATION}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBER_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_PHONE_PAD}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_WEBSEARCH}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_TWITTER}
<li> {@link Titanium.UI#property-KEYBOARD_TYPE_URL}
</ul></p>
*/
/**
* @property [maxLength=-1]
* @type Number
* <p>Maximum length of text field input.</p>
* @description <p>Any attempt to input text beyond this length (including pasting a string larger than <code>maxLength</code>) will not edit the field's contents. A value of -1 indicates unlimited length.</p>
* @platform android 3.0.0
* @platform iphone 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property [passwordMask=false]
* @type Boolean
* <p>Obscure the input text from the user.</p>
* @description <p>Set to <code>true</code> to hide entered characters.</p>
<p>On Mobile Web, if you set a <code>keyboardType</code> and enable the <code>passwordMask</code>, the <code>passwordMask</code>
will always take precedence and the default keyboard will be used.</p>
<p>Note: on iOS, <code>passwordMask</code> <em>must</em> be specified when this text field is created.</p>
*/
/**
* @property [textAlign={@link Titanium.UI#property-TEXT_ALIGNMENT_LEFT}]
* @type String/Number
* <p>Text alignment within this text field.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_CENTER}
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_LEFT}
<li> {@link Titanium.UI#property-TEXT_ALIGNMENT_RIGHT}
</ul></p>
*/
/**
* @property value
* @type String
* <p>Value of this text field, which may be set programmatically and modified by the user.</p>
* @description <p>Use the backslash and letter <code>n</code> line feed character combination, ie <code>\n</code>, to force a new
line. </p>
<p>Use unicode characters, such as those included in (but not limited to) the
<a href="http://en.wikibooks.org/w/index.php?title=Unicode/List_of_useful_symbols">Unicode List of Useful Symbols</a>
section of wikipedia, to insert special characters and symbols.</p>
*/
/**
* @property [verticalAlign={@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_CENTER}]
* @type Number/String
* <p>Vertical alignment within this text field.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_BOTTOM}
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_CENTER}
<li> {@link Titanium.UI#property-TEXT_VERTICAL_ALIGNMENT_TOP}
</ul></p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @class textFieldSelectedParams
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TextField.yml
* <p>Dictionary object of parameters for the {@link Titanium.UI.TextField#property-selection} property that describes
position and length of the selected text.</p>
*/
/**
* @property location
* @type Number
* <p>Starting position of selected text.</p>
*/
/**
* @property length
* @type Number
* <p>Number of characters selected.</p>
*/
/**
* @class TextFieldPadding
* @platform android 6.0.0
* @platform iphone 6.0.0
* @platform ipad 6.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/TextField.yml
* <p>Dictionary object of parameters for the {@link Titanium.UI.TextField#property-padding} that describes the padding</p>
*/
/**
* @property left
* @type Number
* <p>Left padding</p>
*/
/**
* @property right
* @type Number
* <p>Right padding</p>
*/
/**
* @class Titanium.UI.Toolbar
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Toolbar.yml
* <p>An iOS toolbar, which can contain buttons and other controls.</p>
* @deprecated 1.8.0 Use <Titanium.UI.iOS.Toolbar> instead.
* @description <p>The toolbar is created by the {@link Titanium.UI#method-createToolbar} method or <strong><code><Toolbar></code></strong> Alloy element.</p>
<p>A toolbar can contain buttons, as well as certain other widgets, including text fields and
labels. </p>
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundRepeat
* @hide
* <p>Gets the value of the {@link Titanium.UI.Toolbar#property-backgroundRepeat} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundRepeat
* @hide
* <p>Sets the value of the {@link Titanium.UI.Toolbar#property-backgroundRepeat} property.</p>
* @param {Boolean} backgroundRepeat
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundLeftCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.Toolbar#property-backgroundLeftCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundLeftCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.Toolbar#property-backgroundLeftCap} property.</p>
* @param {Number} backgroundLeftCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundTopCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.Toolbar#property-backgroundTopCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundTopCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.Toolbar#property-backgroundTopCap} property.</p>
* @param {Number} backgroundTopCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.Toolbar#property-backgroundColor} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.Toolbar#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getLayout
* @hide
* <p>Gets the value of the {@link Titanium.UI.Toolbar#property-layout} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setLayout
* @hide
* <p>Sets the value of the {@link Titanium.UI.Toolbar#property-layout} property.</p>
* @param {String} layout
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBarColor
* <p>Gets the value of the {@link Titanium.UI.Toolbar#property-barColor} property.</p>
* @returns {String}
*/
/**
* @method setBarColor
* <p>Sets the value of the {@link Titanium.UI.Toolbar#property-barColor} property.</p>
* @param {String} barColor
<p>New value for the property.</p>
*/
/**
* @method getItems
* <p>Gets the value of the {@link Titanium.UI.Toolbar#property-items} property.</p>
* @returns {Titanium.UI.View[]}
*/
/**
* @method setItems
* <p>Sets the value of the {@link Titanium.UI.Toolbar#property-items} property.</p>
* @param {Array<Titanium.UI.View>} items
<p>New value for the property.</p>
*/
/**
* @method getBorderTop
* <p>Gets the value of the {@link Titanium.UI.Toolbar#property-borderTop} property.</p>
* @returns {Boolean}
*/
/**
* @method setBorderTop
* <p>Sets the value of the {@link Titanium.UI.Toolbar#property-borderTop} property.</p>
* @param {Boolean} borderTop
<p>New value for the property.</p>
*/
/**
* @method getBorderBottom
* <p>Gets the value of the {@link Titanium.UI.Toolbar#property-borderBottom} property.</p>
* @returns {Boolean}
*/
/**
* @method setBorderBottom
* <p>Sets the value of the {@link Titanium.UI.Toolbar#property-borderBottom} property.</p>
* @param {Boolean} borderBottom
<p>New value for the property.</p>
*/
/**
* @method getTranslucent
* <p>Gets the value of the {@link Titanium.UI.Toolbar#property-translucent} property.</p>
* @returns {Boolean}
*/
/**
* @method setTranslucent
* <p>Sets the value of the {@link Titanium.UI.Toolbar#property-translucent} property.</p>
* @param {Boolean} translucent
<p>New value for the property.</p>
*/
/**
* @property [backgroundRepeat=false]
* @hide
* @type Boolean
* <p>Determines whether to tile a background across a view.</p>
* @description <p>Setting this to <code>true</code> makes the set <code>backgroundImage</code> repeat across the view as a series
of tiles. The tiling begins in the upper-left corner, where the upper-left corner of the
background image is rendered. The image is then tiled to fill the available space of the
view.</p>
<p>Note that setting this to <code>true</code> may incur performance penalties for large views or
background images, as the tiling must be redone whenever a view is resized.</p>
<p>On iOS, the following views do not currently support tiled backgrounds:</p>
<ul>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.TextField}</li>
<li>{@link Titanium.UI.Label}</li>
</ul>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundLeftCap=0]
* @hide
* @type Number
* <p>Size of the left end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundTopCap=0]
* @hide
* @type Number
* <p>Size of the top end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundColor=Transparent]
* @hide
* @type String
* <p>Background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [layout=Composite layout]
* @hide
* @type String
* <p>Specifies how the view positions its children.
One of: 'composite', 'vertical', or 'horizontal'.</p>
* @description <p>There are three layout options:</p>
<ul>
<li><p><code>composite</code> (or <code>absolute</code>). Default layout. A child view is positioned based on its
positioning properties or "pins" (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code> and <code>center</code>).
If no positioning properties are specified, the child is centered. </p>
<p>The child is always sized based on its <code>width</code> and <code>height</code> properties, if these are
specified. If the child's height or width is <em>not</em> specified explicitly, it may be
calculated implicitly from the positioning properties. For example, if both <code>left</code> and
<code>center.x</code> are specified, they can be used to calculate the width of the child control. </p>
<p>Because the size and position properties can conflict, there is a specific precedence
order for the layout properties. For vertical positioning, the precedence
order is: <code>height</code>, <code>top</code>, <code>center.y</code>, <code>bottom</code>.</p>
<p>The following table summarizes the various combinations of properties that can
be used for vertical positioning, in order from highest precedence to lowest.
(For example, if <code>height</code>, <code>center.y</code> and <code>bottom</code> are all specified, the
<code>height</code> and <code>center.y</code> values take precedence.)</p>
<table cellpadding="6px" border="1" rules="all">
<tr>
<th>Scenario</th><th>Behavior</th>
</tr>
<tr>
<td>`height` & `top` specified</td><td>Child positioned `top` unit from
parent's top, using specified `height`;
any `center.y` and `bottom` values are ignored.</td>
</tr>
<tr>
<td>`height` & `center.y` specified</td><td>Child positioned with center at
`center.y`, using specified `height`; any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`height` & `bottom` specified</td><td>Child positioned `bottom` units from
parent's bottom, using specified `height`.</td>
</tr>
<tr>
<td>`top` & `center.y` specified</td><td>Child positioned with top edge `top` units from
parent's top and center at `center.y`. Height is determined implicitly;
any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`top` & `bottom` specified</td><td>Child positioned with top edge `top` units from
parent's top and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly. </td>
</tr>
<tr>
<td>Only `top` specified</td><td>Child positioned `top` units from parent's
top, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`center.y` and `bottom` specified</td><td>Child positioned with center at
`center.y` and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly.</td>
</tr>
<tr>
<td>Only `center.y` specified</td><td>Child positioned with center at
`center.y`, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>Only `bottom` specified</td><td>Child positioned with bottom edge `bottom`
units from parent's bottom, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`height`, `top`, `center.y`, and `bottom` unspecified</td><td>Child
centered vertically in the parent and uses the default height calculation
for the child view type.</td>
</tr>
</table>
<p>Horizontal positioning works like vertical positioning, except that the
precedence is <code>width</code>, <code>left</code>, <code>center.x</code>, <code>right</code>. </p>
<p>For complete details on composite layout rules, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>
in the Titanium Mobile Guides. </p>
<ul><li><code>vertical</code>. Children are laid out vertically from top to bottom. The first child
is laid out <code>top</code> units from its parent's bounding box. Each subsequent child is
laid out below the previous child. The space between children is equal to the
upper child's <code>bottom</code> value plus the lower child's <code>top</code> value. </li></ul>
<p>Each child is positioned horizontally as in the composite layout mode. </p>
<ul><li><code>horizontal</code>. Horizontal layouts have different behavior depending on whether wrapping
is enabled. Wrapping is enabled by default (the <code>horizontalWrap</code> property is <code>true</code>).</li></ul>
<p>With wrapping behavior, the children are laid out horizontally from left to right,
<em>in rows</em>. If a child requires more horizontal space than exists in the current row,
it is wrapped to a new row. The height of each row is equal to the maximum height of
the children in that row.</p>
<p>Wrapping behavior is available on iOS, Android and Mobile Web (Release 2.1.0 and later).
When the <code>horizontalWrap</code> property is set to true, the first row is placed at the top of the
parent view, and successive rows are placed below the first row. Each child is
positioned vertically <em>within its row</em> somewhat like composite layout mode.
In particular: </p>
<ul><li>If neither <code>top</code> or <code>bottom</code> is specified, the child is centered in the
row.</li>
<li>If either <code>top</code> or <code>bottom</code> is specified, the child is aligned to either
the top or bottom of the row, with the specified amount of padding.</li>
<li>If <em>both</em> <code>top</code> and <code>bottom</code> is specified for a given child, the properties
are both treated as padding.</li></ul>
<p>If the <code>horizontalWrap</code> property is false, the behavior is more equivalent to a vertical layout.
Children are laid or horizontally from left to right in a single row. The <code>left</code> and
<code>right</code> properties are used as padding between the children, and the <code>top</code> and <code>bottom</code>
properties are used to position the children vertically.</p>
<p>On Mobile Web <em>prior to</em> Release 2.1.0, the horizontal layout does not wrap by default,
and does not support the <code>horizontalWrap</code> property. On Android and iOS <em>prior to</em> Release
2.1.0, the horizontal layout always wraps and the <code>horizontalWrap</code> property is not supported.</p></li>
</ul>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property barColor
* @type String
* <p>Background color for the toolbar, as a color name or hex triplet.</p>
* @description <p>To use a background image on the toolbar, either <code>barColor</code> must be a fully or
partially transparent color,
or the {@link Titanium.UI.Toolbar#property-translucent translucent} property must be <code>true</code>.</p>
<p>To use a background gradient on a toolbar, <code>barColor</code> must be <code>'transparent'</code>
<em>and</em> the the {@link Titanium.UI.Toolbar#property-translucent translucent} property must be <code>true</code>.</p>
<p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property items
* @type Titanium.UI.View[]
* <p>An array of buttons (or other widgets) contained in the toolbar.</p>
*/
/**
* @property [borderTop=true]
* @type Boolean
* <p>If <code>true</code>, a border is drawn on the top of the toolbar.</p>
*/
/**
* @property [borderBottom=true]
* @type Boolean
* <p>If <code>true</code>, a border is drawn on the bottom of the toolbar.</p>
*/
/**
* @property [translucent=false]
* @type Boolean
* <p>If <code>true</code>, a translucent background color is used for the toolbar.</p>
* @description <p>Note that if <code>translucent</code> is <code>false</code>, views under the toolbar are hidden, even
if {@link Titanium.UI.Toolbar#property-barColor barColor} is set to a semi-transparent or
transparent color.</p>
*/
/**
* @class Titanium.UI
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/UI.yml
* <p>The main {@link Titanium.UI} module.</p>
* @description <p>The UI module is responsible for native user-interface components and interaction inside
Titanium. The goal of the UI module is to provide a native experience along with native
performance by compiling Javascript code into their native counterparts as part of the
build process.</p>
<h4>Design</h4>
<p>The UI module is broken down into 3 major area:</p>
<ul>
<li><p><strong>Views</strong> - {@link Titanium.UI.View Views} are containers that host visual elements such as
controls or other views. Views can have their properties customized, such as their border color
and radius, can fire events such as swipe events or touches, and can optionally contain a
hierarchy or other views as children. In Titanium, most views are specialized to perform both a
visual function and set of interaction behaviors such as {@link Titanium.UI.TableView Table View} or
{@link Titanium.UI.iOS.CoverFlowView Coverflow View}. Views are always named with the suffix <code>View</code>.</p></li>
<li><p><strong>Controls</strong> - controls, or sometimes referred as widgets, are visual elements such as
{@link Titanium.UI.Slider sliders}, {@link Titanium.UI.Button buttons} and {@link Titanium.UI.Switch switches}.
They provide a visual element which has a defined behavior and typical have special
configuration and special events. Controls themselves are views and also inherit a views
properties, functions and events.</p></li>
<li><p><strong>Windows</strong> - {@link Titanium.UI.Window Windows} are typically top-level visual constructs that are
the main part of your interface. An application will always have at least one window and windows
can take different shapes and sizes, can have display and interaction properties such as
fullscreen or modal and can be customized, such as changing their opacity or background color.
Windows themselves are views and also inherit a views properties, functions and events. There
are a few specialization of Windows such as a {@link Titanium.UI.TabGroup Tab Group} which offer
additional behavior beyond the basic Window.</p></li>
</ul>
<p>Titanium uses the <a href="http://en.wikipedia.org/wiki/Factory_method_pattern">Factory Pattern</a> for
constructing objects and a general naming pattern for APIs. For example, to construct a
{@link Titanium.UI.AlertDialog Alert Dialog}, you call the method {@link Titanium.UI#method-createAlertDialog}. <br>
To create a {@link Titanium.UI.TextArea TextArea}, you call the method {@link Titanium.UI#method-createTextArea}. <br>
Once an object is created, it will be available until it goes out of scope.</p>
<h4>Optimizations</h4>
<p>UI objects are optimized by Titanium to not be realized into the drawing context and placed into
the device UI surface until needed. That means that you can create UI objects, set their
properties and add them to their hierarchy without much worry about memory or performance. <br>
When the native drawing surface needs to render a specific view or control, Titanium will
automatically create the view as needed. Additionally, Titanium is optimized to also release
memory once the view is no longer needed, on screen or in low memory situations. However, it's
a good idea to help Titanium along in certain cases where you are no longer using objects. For
example, you should call <code>close</code> on a {@link Titanium.UI.Window Window} instance when you are no
longer using it. You can safely call <code>open</code> on the window again to re-open it.</p>
<h4>Global Context and Threading</h4>
<p>Be careful with the objects that are created in <code>app.js</code> but only used once. Since the <code>app.js</code>
context is global and generally is not garbage collected until the application exits, you
should think about the design of your application as it relates to this fact.</p>
<p>{@link Titanium.UI.Window Window} objects that are opened up with the <code>url</code> property to another
JavaScript file provide a nice way to decompose your application into smaller units.</p>
<p>Additionally, Window objects created with a <code>url</code> value run in a separate JavaScript context
and thread. While all UI processing is done on the main UI thread, other processing inside
a Window or the <code>app.js</code> that does not have UI interaction will run in its own thread.</p>
<p>The other benefit of using the <code>url</code> property is that when the window is closed, resources
allocated in the window's context can be immediately cleaned up, saving resources such as
memory and CPU.</p>
<p>For more information, see the sections "Sub-contexts" and "Passing Data Between Contexts" on the
{@link Titanium.UI.Window Window} reference page.</p>
<h4>Portability</h4>
<p>Titanium components are designed to be portable across as many platforms as it supports. <br>
However, there are cases where a device either does not support a specific feature or capability
or where it support additional functionality. For cases where the device OS supports
capabilities that other platforms do not, we attempt to place those capabilities in a separate
namespace, such as {@link Titanium.UI.iPhone}. However, in cases where the control is in a common
namespace and support additional features, we continue to place that functionality directly on
the object.</p>
<h4>Events</h4>
<p>Event listeners must be defined before their respective events are likely to be fired, otherwise
they are not guaranteed to be called. The open and focus {@link Titanium.UI.Window Window} event
listeners, for instance, must be defined before the window is opened.</p>
<p>Evaluating events as late as possible while bearing the above consideration in mind, however,
can significantly improve application responsiveness. For example, an event listener for a
click event may be defined after the parent window has been opened.</p>
<h4>Colors</h4>
<p>Many UI components have properties that control their color.</p>
<p>Colors may be specified as a hex triplet to determine the red, green and blue channels. Thus,
<code>'#000000'</code> is specified for black, <code>'#ff0000'</code> for red, <code>'#00ff00'</code> for green, <code>'#0000ff'</code> for
blue, and <code>'#ffffff'</code> for white, etc. A channel may be abbreviated when its two hex digits are
identical, such as <code>'#000'</code>, <code>'#f00'</code>, <code>'#0f0#'</code>, <code>'#00f'</code> and <code>'#fff'</code> for the above colors,
respectively.</p>
<p>An additional alpha channel is supported as a prefix to the hex triplet. So, to make
the purple-like color <code>'#ff00ff'</code> semi-opaque, you could use an alpha value of <code>'55'</code>, giving,
<code>'#55ff00ff'</code> or <code>'#5f0f'</code>.</p>
<p>Note that while the pound symbol, <code>#</code>, is not mandatory on iOS when using the hex triplet format,
it is recommended to include it to provide compatibility with other platforms.</p>
<p>iOS also accepts colors specified in the form, <code>rgb(R,G,B)</code> and <code>rgba(R,G,B,A)</code>, with the color
channels inside the parethesis represented by integer numbers between <code>0</code> and <code>255</code> and the
alpha channel by a float number between <code>0</code> and <code>1.0</code> (transparent to opaque, respectively).
For example, an opaque purple could be obtained using <code>'rgb(255,0,255)'</code> and a semi-opaque purple
using <code>'rgba(255,0,255,0.3)'</code>. Note that although this format will work if the <code>rgb</code> or <code>rgba</code>
prefix is omitted, this is not officially supported and thus not recommended.</p>
<p>Alternatively, the following set of color names are recognized.</p>
<p><code>'aqua'</code>, <code>'black'</code>, <code>'blue'</code>, <code>'brown'</code>, <code>'cyan'</code>, <code>'darkgray'</code>, <code>'fuchsia'</code>, <code>'gray'</code>,
<code>'green'</code>, <code>'lightgray'</code>, <code>'lime'</code>, <code>'magenta'</code>, <code>'maroon'</code>, <code>'navy'</code>, <code>'olive'</code>, <code>'orange'</code>,
<code>'pink'</code>, <code>'purple'</code>, <code>'red'</code>, <code>'silver'</code>, <code>'teal'</code>, <code>'white'</code>, <code>'yellow'</code>.</p>
<p>All color properties also accept a value of <code>'transparent'</code>.</p>
<p>On Android, if you want to create a semi-transparent window, set the <code>opacity</code>
property <strong>before</strong> opening the window.</p>
<p>On iOS, you can set a global tinting using {@link Titanium.UI#property-tintColor}. All child views will inherit
the tint color by default and are able to override the color using <code>tintColor</code> on their own views.
The default <code>tintColor</code> on iOS is the blue (system-color).</p>
<p>If a color property is undefined, the default color of the particular UI element is applied.
If a color value is not valid on iOS, the default color is applied, whereas, on Android, the
color yellow is applied.</p>
* <h3>Examples</h3>
<h4>Color Demo</h4>
<p>The following example demonstrates all the color formats, and color names, that are intended
to be supported by Titanium. See the {@link Titanium.UI description} section for details.</p>
<pre><code>var colorArray = [
'#ff00ff', '#f0f', 'rgb(255,0,255)',
'transparent', '#55ff00ff', '#5f0f', 'rgba(255,0,255,0.3)',
'aqua', 'black', 'blue', 'brown', 'cyan', 'darkgray', 'fuchsia', 'gray', 'green',
'lightgray', 'lime', 'magenta', 'maroon', 'navy', 'olive', 'orange', 'pink',
'purple', 'red', 'silver', 'teal', 'white', 'yellow',
];
var win = Ti.UI.createWindow({
backgroundColor: 'black',
exitOnClose: true,
fullscreen: false,
layout: 'vertical',
title: 'Color Demo'
});
var rows = [];
var row;
for (var i=0, ilen = colorArray.length; i < ilen; i++){
row = Ti.UI.createTableViewRow({
color:'black',
backgroundColor: colorArray[i],
title: colorArray[i],
height: 40
});
rows.push(row);
}
var table = Ti.UI.createTableView({
data: rows,
backgroundColor: 'white'
});
win.add(table);
win.open();
</code></pre>
*/
/**
* @method convertUnits
* <p>Converts one type of unit to another using the metrics of the main display.</p>
* @description <p>As this method does not support percentages, <code>0</code> is returned if they are specified.</p>
* @param {String} convertFromValue
<p>Measurement and optional unit to convert from, i.e. 160, "120dip". Percentages are
not accepted.</p>
* @param {Number} convertToUnits
<p>Desired unit for the conversion result.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-UNIT_CM}
<li> {@link Titanium.UI#property-UNIT_DIP}
<li> {@link Titanium.UI#property-UNIT_IN}
<li> {@link Titanium.UI#property-UNIT_MM}
<li> {@link Titanium.UI#property-UNIT_PX}
</ul></p>
* @returns {Number}
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @method create2DMatrix
* <p>Creates and returns an instance of {@link Titanium.UI.2DMatrix}.</p>
* @param {MatrixCreationDict} parameters (optional)
<p>Initial transformation of the matrix.</p>
* @returns {Titanium.UI.2DMatrix}
*/
/**
* @method createView
* <p>Creates and returns an instance of {@link Titanium.UI.View}.</p>
* @param {Dictionary<Titanium.UI.View>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.View} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.View}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method create3DMatrix
* <p>Creates and returns an instance of {@link Titanium.UI.3DMatrix}.</p>
* @param {Dictionary<Titanium.UI.3DMatrix>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.3DMatrix} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.3DMatrix}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method createActivityIndicator
* <p>Creates and returns an instance of {@link Titanium.UI.ActivityIndicator}.</p>
* @param {Dictionary<Titanium.UI.ActivityIndicator>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.ActivityIndicator} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.ActivityIndicator}
*/
/**
* @method createAlertDialog
* <p>Creates and returns an instance of {@link Titanium.UI.AlertDialog}.</p>
* @param {Dictionary<Titanium.UI.AlertDialog>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.AlertDialog} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.AlertDialog}
*/
/**
* @method createAnimation
* <p>Creates and returns an instance of {@link Titanium.UI.Animation}.</p>
* @param {Dictionary<Titanium.UI.Animation>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Animation} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Animation}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method createAttributedString
* <p>Creates and returns an instance of {@link Titanium.UI.AttributedString}.</p>
* @param {Dictionary<Titanium.UI.AttributedString>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.AttributedString} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.AttributedString}
* @platform android 3.6.0
* @platform iphone 3.6.0
* @platform ipad 3.6.0
* @platform windowsphone 4.1.0
*/
/**
* @method createButton
* <p>Creates and returns an instance of {@link Titanium.UI.Button}.</p>
* @param {Dictionary<Titanium.UI.Button>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Button} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Button}
*/
/**
* @method createButtonBar
* <p>Creates and returns an instance of {@link Titanium.UI.ButtonBar}.</p>
* @param {Dictionary<Titanium.UI.ButtonBar>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.ButtonBar} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.ButtonBar}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method createCoverFlowView
* <p>Creates and returns an instance of {@link Titanium.UI.CoverFlowView}.</p>
* @deprecated 1.8.0 Use <Titanium.UI.iOS.CoverFlowView> instead.
* @param {Dictionary<Titanium.UI.CoverFlowView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.CoverFlowView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.CoverFlowView}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method createDashboardItem
* <p>Creates and returns an instance of {@link Titanium.UI.DashboardItem}.</p>
* @param {Dictionary<Titanium.UI.DashboardItem>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.DashboardItem} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.DashboardItem}
* @platform iphone 1.2
* @platform ipad 1.2
*/
/**
* @method createDashboardView
* <p>Creates and returns an instance of {@link Titanium.UI.DashboardView}.</p>
* @param {Dictionary<Titanium.UI.DashboardView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.DashboardView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.DashboardView}
* @platform iphone 1.2
* @platform ipad 1.2
*/
/**
* @method createEmailDialog
* <p>Creates and returns an instance of {@link Titanium.UI.EmailDialog}.</p>
* @param {Dictionary<Titanium.UI.EmailDialog>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.EmailDialog} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.EmailDialog}
*/
/**
* @method createImageView
* <p>Creates and returns an instance of {@link Titanium.UI.ImageView}.</p>
* @param {Dictionary<Titanium.UI.ImageView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.ImageView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.ImageView}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method createLabel
* <p>Creates and returns an instance of {@link Titanium.UI.Label}.</p>
* @param {Dictionary<Titanium.UI.Label>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Label} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Label}
*/
/**
* @method createListSection
* <p>Creates and returns an instance of {@link Titanium.UI.ListSection}.</p>
* @param {Dictionary<Titanium.UI.ListSection>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.ListSection} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.ListSection}
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform windowsphone 4.1.0
*/
/**
* @method createMaskedImage
* <p>Creates and returns an instance of {@link Titanium.UI.MaskedImage}.</p>
* @param {Dictionary<Titanium.UI.MaskedImage>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.MaskedImage} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.MaskedImage}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method createNotification
* <p>Creates and returns an instance of {@link Titanium.UI.Notification}.</p>
* @param {Dictionary<Titanium.UI.Notification>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Notification} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Notification}
* @platform android 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method createOptionDialog
* <p>Creates and returns an instance of {@link Titanium.UI.OptionDialog}.</p>
* @param {Dictionary<Titanium.UI.OptionDialog>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.OptionDialog} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.OptionDialog}
*/
/**
* @method createPicker
* <p>Creates and returns an instance of {@link Titanium.UI.Picker}.</p>
* @param {Dictionary<Titanium.UI.Picker>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Picker} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Picker}
*/
/**
* @method createPickerColumn
* <p>Creates and returns an instance of {@link Titanium.UI.PickerColumn}.</p>
* @param {Dictionary<Titanium.UI.PickerColumn>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.PickerColumn} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.PickerColumn}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method createPickerRow
* <p>Creates and returns an instance of {@link Titanium.UI.PickerRow}.</p>
* @param {Dictionary<Titanium.UI.PickerRow>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.PickerRow} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.PickerRow}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method createProgressBar
* <p>Creates and returns an instance of {@link Titanium.UI.ProgressBar}.</p>
* @param {Dictionary<Titanium.UI.ProgressBar>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.ProgressBar} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.ProgressBar}
*/
/**
* @method createRefreshControl
* <p>Creates and returns an instance of {@link Titanium.UI.RefreshControl}.</p>
* @param {Dictionary<Titanium.UI.RefreshControl>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.RefreshControl} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.RefreshControl}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method createScrollView
* <p>Creates and returns an instance of {@link Titanium.UI.ScrollView}.</p>
* @param {Dictionary<Titanium.UI.ScrollView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.ScrollView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.ScrollView}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method createScrollableView
* <p>Creates and returns an instance of {@link Titanium.UI.ScrollableView}.</p>
* @param {Dictionary<Titanium.UI.ScrollableView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.ScrollableView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.ScrollableView}
*/
/**
* @method createSearchBar
* <p>Creates and returns an instance of {@link Titanium.UI.SearchBar}.</p>
* @param {Dictionary<Titanium.UI.SearchBar>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.SearchBar} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.SearchBar}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method createSlider
* <p>Creates and returns an instance of {@link Titanium.UI.Slider}.</p>
* @param {Dictionary<Titanium.UI.Slider>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Slider} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Slider}
*/
/**
* @method createSwitch
* <p>Creates and returns an instance of {@link Titanium.UI.Switch}.</p>
* @param {Dictionary<Titanium.UI.Switch>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Switch} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Switch}
*/
/**
* @method createTab
* <p>Creates and returns an instance of {@link Titanium.UI.Tab}.</p>
* @param {Dictionary<Titanium.UI.Tab>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Tab} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Tab}
*/
/**
* @method createTabGroup
* <p>Creates and returns an instance of {@link Titanium.UI.TabGroup}.</p>
* @param {Dictionary<Titanium.UI.TabGroup>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.TabGroup} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.TabGroup}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method createTabbedBar
* <p>Creates and returns an instance of {@link Titanium.UI.TabbedBar}.</p>
* @deprecated 1.8.0 Use <Titanium.UI.iOS.TabbedBar> instead.
* @param {Dictionary<Titanium.UI.TabbedBar>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.TabbedBar} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.TabbedBar}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method createTableView
* <p>Creates and returns an instance of {@link Titanium.UI.TableView}.</p>
* @param {Dictionary<Titanium.UI.TableView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.TableView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.TableView}
*/
/**
* @method createTableViewRow
* <p>Creates and returns an instance of {@link Titanium.UI.TableViewRow}.</p>
* @param {Dictionary<Titanium.UI.TableViewRow>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.TableViewRow} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.TableViewRow}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method createTableViewSection
* <p>Creates and returns an instance of {@link Titanium.UI.TableViewSection}.</p>
* @param {Dictionary<Titanium.UI.TableViewSection>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.TableViewSection} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.TableViewSection}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method createTextArea
* <p>Creates and returns an instance of {@link Titanium.UI.TextArea}.</p>
* @param {Dictionary<Titanium.UI.TextArea>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.TextArea} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.TextArea}
*/
/**
* @method createTextField
* <p>Creates and returns an instance of {@link Titanium.UI.TextField}.</p>
* @param {Dictionary<Titanium.UI.TextField>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.TextField} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.TextField}
*/
/**
* @method createToolbar
* <p>Creates and returns an instance of {@link Titanium.UI.Toolbar}.</p>
* @deprecated 1.8.0 Use <Titanium.UI.iOS.Toolbar> instead.
* @param {Dictionary<Titanium.UI.Toolbar>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Toolbar} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Toolbar}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getBackgroundColor
* <p>Gets the value of the {@link Titanium.UI#property-backgroundColor} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setBackgroundColor
* <p>Sets the value of the {@link Titanium.UI#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getBackgroundImage
* <p>Gets the value of the {@link Titanium.UI#property-backgroundImage} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method setBackgroundImage
* <p>Sets the value of the {@link Titanium.UI#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getOrientation
* <p>Gets the value of the {@link Titanium.UI#property-orientation} property.</p>
* @removed 3.0.0 Use <Titanium.UI.Window.orientationModes> instead.
* @returns {Number}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setOrientation
* <p>Sets the value of the {@link Titanium.UI#property-orientation} property.</p>
* @removed 3.0.0 Use <Titanium.UI.Window.orientationModes> instead.
* @param {Number} orientation
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getTintColor
* <p>Gets the value of the {@link Titanium.UI#property-tintColor} property.</p>
* @returns {String}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setTintColor
* <p>Sets the value of the {@link Titanium.UI#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getCurrentTab
* <p>Gets the value of the {@link Titanium.UI#property-currentTab} property.</p>
* @returns {Titanium.UI.Tab}
*/
/**
* @method setCurrentTab
* <p>Sets the value of the {@link Titanium.UI#property-currentTab} property.</p>
* @param {Titanium.UI.Tab} currentTab
<p>New value for the property.</p>
*/
/**
* @method getCurrentWindow
* <p>Gets the value of the {@link Titanium.UI#property-currentWindow} property.</p>
* @returns {Titanium.UI.Window}
*/
/**
* @method createWebView
* <p>Creates and returns an instance of {@link Titanium.UI.WebView}.</p>
* @param {Dictionary<Titanium.UI.WebView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.WebView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.WebView}
*/
/**
* @method createWindow
* <p>Creates and returns an instance of {@link Titanium.UI.Window}.</p>
* @param {Dictionary<Titanium.UI.Window>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Window} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Window}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property ANIMATION_CURVE_EASE_IN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Animation#property-curve Animation.curve} to specify an animation that starts
slowly and speeds up.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property ANIMATION_CURVE_EASE_IN_OUT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Animation#property-curve Animation.curve} to specify an animation that starts
slowly, and speeds up, then slows down at the end of the animation.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property ANIMATION_CURVE_EASE_OUT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Animation#property-curve Animation.curve} to specify an animation that starts
quickly, then slows down at the end of the animation.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property ANIMATION_CURVE_LINEAR
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Animation#property-curve Animation.curve} to specify an animation that proceeds
at a constant rate.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property ATTRIBUTE_FONT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to specify a font.</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Use a {@link Font} dictionary for {@link Attribute#property-value}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform android 3.6.0
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_FOREGROUND_COLOR
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to specify a font color.</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Use a color name or hex value for {@link Attribute#property-value}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform android 3.6.0
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_BACKGROUND_COLOR
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to specify a background color.</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Use a color name or hex value for {@link Attribute#property-value}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform android 3.6.0
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_LIGATURE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to enable or disable ligatures.</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to <code>1</code> to enable ligatures, else <code>0</code> to disable.
Ligatures are only supported on certain fonts.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_LETTERPRESS_STYLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to use a letterpress text effect.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI#property-ATTRIBUTE_TEXT_EFFECT}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_KERN
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to specify kerning (space between characters).</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a float value specifying how many pixels to increase the character
spacing.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_STRIKETHROUGH_STYLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to place a horizontal line through the text.</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Set the <code>value</code> property to a <code>Titanium.UI.ATTRIBUTE_UNDERLINE_*</code> constant.</p>
<p>See {@link Attribute} for more information.</p>
* @platform android 3.6.0
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_UNDERLINES_STYLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to place a horizontal line under the text.</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Set the <code>value</code> property to a <code>Titanium.UI.ATTRIBUTE_UNDERLINE_*</code> constant.</p>
<p>See {@link Attribute} for more information.</p>
* @platform android 3.6.0
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_SUPERSCRIPT_STYLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to place the text in an upper position.</p>
* @description <p>See {@link Attribute} for more information.</p>
* @platform android 6.1.0
*/
/**
* @property ATTRIBUTE_SUBSCRIPT_STYLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to place the text in a lower position.</p>
* @description <p>See {@link Attribute} for more information.</p>
* @platform android 6.1.0
*/
/**
* @property ATTRIBUTE_STROKE_COLOR
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to specify a color for the stroke text.</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Use a color name or hex value for the <code>value</code> property in the attributes dictionary.</p>
<p>See {@link Attribute} for more information on type modes.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_STROKE_WIDTH
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to specify the width of the stroke text.</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a float value specifying the size of stroke width as a percentage of the
font size. A positive value displays an outline of the charater, while a negative value
fills the character.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_SHADOW
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to display a shadow behind the text.</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a {@link shadowDict Shadow} dictionary.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_WRITING_DIRECTION
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to control the direction of the text.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a <code>Titanium.UI.ATTRIBUTE_WRITING_DIRECTION_*</code> constant.</p>
<p>See {@link Attribute} for more information on type modes.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_TEXT_EFFECT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to apply a text effect.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to <code>Titainium.UI.ATTRIBUTE_LETTERPRESS_STYLE</code> to apply a
letterpress effect to the text.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_LINK
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to create a link.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a URL.</p>
<p>Use the Label's {@link Titanium.UI.Label#event-link link} event to determine when the user triggers a
long press (not a click) event on the linked text.</p>
<p>See {@link Attribute} for more information.</p>
* @platform android 3.6.0
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_BASELINE_OFFSET
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to apply a different baseline to the text.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a number to specify how many pixels to raise or lower the text.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_UNDERLINE_COLOR
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to change the color of the horizontal line.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use a color name or hex value for {@link Attribute#property-value}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_STRIKETHROUGH_COLOR
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to change the color of the horizontal line.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use a color name or hex value for {@link Attribute#property-value}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_OBLIQUENESS
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to skew the text.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a float value to specify how much to skew the text.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_EXPANSION
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to stretch the text horizontally.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a float value to specify how much to stretch the text.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_LINE_BREAK
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to wrap and truncate the text.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a <code>Titanium.UI.ATTRIBUTE_LINE_BREAK_*</code> constant.</p>
<p>See {@link Attribute} for more information on type modes.</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property ATTRIBUTE_UNDERLINE_STYLE_NONE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to not draw a line.</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_UNDERLINE_STYLE_SINGLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a single line.</p>
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_UNDERLINE_STYLE_THICK
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a thick line.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_UNDERLINE_STYLE_DOUBLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a double line.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_UNDERLINE_PATTERN_SOLID
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a solid line.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_UNDERLINE_PATTERN_DOT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a dotted line.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_UNDERLINE_PATTERN_DASH
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a dashed line.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_UNDERLINE_PATTERN_DASH_DOT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw an alternating line of dashes and dots.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_UNDERLINE_PATTERN_DASH_DOT_DOT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw an alternating line of dashes and two dots.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_UNDERLINE_BY_WORD
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a line only underneath or through words.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_WRITING_DIRECTION_EMBEDDING
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to use the embedded text direction.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_WRITING_DIRECTION_OVERRIDE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to override the text direction.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_WRITING_DIRECTION_NATURAL
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to use the
<a href="http://www.unicode.org/reports/tr9/#The_Paragraph_Level">Unicode Bidirection Algorithm rules P2 and P3</a>
to determine which direction to use.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_WRITING_DIRECTION_LEFT_TO_RIGHT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to write text left to right.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_WRITING_DIRECTION_RIGHT_TO_LEFT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to write text right to left.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI#property-ATTRIBUTE_WRITING_DIRECTION}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @property ATTRIBUTE_LINE_BREAK_BY_WORD_WRAPPING
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to wrap words at word boundaries.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property ATTRIBUTE_LINE_BREAK_BY_CHAR_WRAPPING
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to wrap words at word boundaries.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property ATTRIBUTE_LINE_BREAK_BY_CLIPPING
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to set lines to not draw past the edge of the text container.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property ATTRIBUTE_LINE_BREAK_BY_TRUNCATING_HEAD
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to use ellipsis glyph at the beginning of the line for missing text.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property ATTRIBUTE_LINE_BREAK_BY_TRUNCATING_MIDDLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to use ellipsis glyph at the middle of the line for missing text.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property ATTRIBUTE_LINE_BREAK_BY_TRUNCATING_TAIL
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to use ellipsis glyph at the end of the line for missing text.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI#property-ATTRIBUTE_LINE_BREAK}.</p>
<p>See {@link Attribute} for more information.</p>
* @platform iphone 5.0.0
* @platform ipad 5.0.0
*/
/**
* @property AUTODETECT_ADDRESS
* @type Number
* @readonly
* <p>Converts strings formatted as addresses into clickable links.</p>
* @removed 6.0.0 Use <Titanium.UI.AUTOLINK_MAP_ADDRESSES> instead.
* <p> <b>Requires:</b>
iOS 4.0 and later
</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUTODETECT_ALL
* @type Number
* @readonly
* <p>Converts all detectable types of data into clickable links.</p>
* @removed 6.0.0 Use <Titanium.UI.AUTOLINK_ALL> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUTODETECT_CALENDAR
* @type Number
* @readonly
* <p>Converts strings formatted as calendar events into clickable links.</p>
* @removed 6.0.0 Use <Titanium.UI.AUTOLINK_CALENDAR> instead.
* <p> <b>Requires:</b>
iOS 4.0 and later
</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUTODETECT_LINK
* @type Number
* @readonly
* <p>Converts strings formatted as URLs into clickable links.</p>
* @removed 6.0.0 Use <Titanium.UI.AUTOLINK_URLS> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUTODETECT_NONE
* @type Number
* @readonly
* <p>Disables converting strings into clickable links.</p>
* @removed 6.0.0 Use <Titanium.UI.AUTOLINK_NONE> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUTODETECT_PHONE
* @type Number
* @readonly
* <p>Converts strings formatted as phone numbers into clickable links.</p>
* @removed 6.0.0 Use <Titanium.UI.AUTOLINK_PHONE_NUMBERS> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property AUTOLINK_MAP_ADDRESSES
* @type Number
* @readonly
* <p>Converts strings formatted as addresses into clickable links.</p>
* <p> <b>Requires:</b>
iOS 4.0 and later
</p>
* @description <p>Two or more autolink constants can be combined using bitwise or.
On iOS:
Use with the {@link Titanium.UI.TextArea#property-autoLink} property.</p>
<p>On Android:
Use with {@link Titanium.UI.TextArea#property-autoLink}, {@link Titanium.UI.TextField#property-autoLink}, and {@link Titanium.UI.Label#property-autoLink} properties.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property AUTOLINK_ALL
* @type Number
* @readonly
* <p>Converts all detectable types of data into clickable links.</p>
* @description <p>Two or more autolink constants can be combined using bitwise or.
On iOS:
Use with the {@link Titanium.UI.TextArea#property-autoLink} property.</p>
<p>On Android:
Use with {@link Titanium.UI.TextArea#property-autoLink}, {@link Titanium.UI.TextField#property-autoLink}, and {@link Titanium.UI.Label#property-autoLink} properties.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property AUTOLINK_CALENDAR
* @type Number
* @readonly
* <p>Converts strings formatted as calendar events into clickable links.</p>
* <p> <b>Requires:</b>
iOS 4.0 and later
</p>
* @description <p>Use with the {@link Titanium.UI.TextArea#property-autoLink} property. Two or more autolink constants can be combined using bitwise or.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property AUTOLINK_URLS
* @type Number
* @readonly
* <p>Converts strings formatted as URLs into clickable links.</p>
* @description <p>Two or more autolink constants can be combined using bitwise or.
On iOS:
Use with the {@link Titanium.UI.TextArea#property-autoLink} property. This property will also convert strings formatted
as email addresses into clickable links.</p>
<p>On Android:
Use with {@link Titanium.UI.TextArea#property-autoLink}, {@link Titanium.UI.TextField#property-autoLink}, and {@link Titanium.UI.Label#property-autoLink} properties.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property AUTOLINK_NONE
* @type Number
* @readonly
* <p>Disables converting strings into clickable links.</p>
* @description <p>Two or more autolink constants can be combined using bitwise or.
On iOS:
Use with the {@link Titanium.UI.TextArea#property-autoLink} property.</p>
<p>On Android:
Use with {@link Titanium.UI.TextArea#property-autoLink}, {@link Titanium.UI.TextField#property-autoLink}, and {@link Titanium.UI.Label#property-autoLink} properties.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property AUTOLINK_PHONE_NUMBERS
* @type Number
* @readonly
* <p>Converts strings formatted as phone numbers into clickable links.</p>
* @description <p>Two or more autolink constants can be combined using bitwise or.
On iOS:
Use with the {@link Titanium.UI.TextArea#property-autoLink} property.</p>
<p>On Android:
Use with {@link Titanium.UI.TextArea#property-autoLink}, {@link Titanium.UI.TextField#property-autoLink}, and {@link Titanium.UI.Label#property-autoLink} properties.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property AUTOLINK_EMAIL_ADDRESSES
* @type Number
* @readonly
* <p>Converts strings formatted as email addresses into clickable links.</p>
* @description <p>Two or more autolink constants can be combined using bitwise or.
On iOS:
Use with the {@link Titanium.UI.TextArea#property-autoLink} property. This property will also convert strings formatted
as URLs into clickable links.</p>
<p>On Android:
Use with {@link Titanium.UI.TextArea#property-autoLink}, {@link Titanium.UI.TextField#property-autoLink}, and {@link Titanium.UI.Label#property-autoLink} properties.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property BLEND_MODE_CLEAR
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_CLEAR> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_COLOR
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_COLOR> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_COLOR_BURN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_COLOR_BURN> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_COLOR_DODGE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_COLOR_DODGE> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_COPY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_COPY> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_DARKEN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_DARKEN> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_DESTINATION_ATOP
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_DESTINATION_ATOP> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_DESTINATION_IN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_DESTINATION_IN> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_DESTINATION_OUT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_DESTINATION_OUT> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_DESTINATION_OVER
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_DESTINATION_OVER> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_DIFFERENCE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_DIFFERENCE> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_EXCLUSION
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_EXCLUSION> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_HARD_LIGHT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_HARD_LIGHT> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_HUE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_HUE> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_LIGHTEN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_LIGHTEN> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_LUMINOSITY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_LUMINOSITY> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_MULTIPLY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_MULTIPLY> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_NORMAL
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_NORMAL> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_OVERLAY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_OVERLAY> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_PLUS_DARKER
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_PLUS_DARKER> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_PLUS_LIGHTER
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_PLUS_LIGHTER> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_SATURATION
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_SATURATION> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_SCREEN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_SCREEN> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_SOFT_LIGHT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_SOFT_LIGHT> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_SOURCE_ATOP
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_SOURCE_ATOP> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_SOURCE_IN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_SOURCE_IN> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_SOURCE_OUT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_SOURCE_OUT> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property BLEND_MODE_XOR
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.BLEND_MODE_XOR> instead.
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property TEXT_ELLIPSIZE_TRUNCATE_WORD_WRAP
* @type Number
* @readonly
* <p>Add ellipses at word boundaries, unless the word itself doesn't fit on a single line.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Label#property-ellipsize} property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property TEXT_ELLIPSIZE_TRUNCATE_CHAR_WRAP
* @type Number
* @readonly
* <p>Add ellipses before the first character that doesnt fit.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Label#property-ellipsize} property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property TEXT_ELLIPSIZE_TRUNCATE_CLIP
* @type Number
* @readonly
* <p>Lines are simply not drawn past the edge of the text container.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Label#property-ellipsize} property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property TEXT_ELLIPSIZE_TRUNCATE_START
* @type Number
* @readonly
* <p>Add ellipses at the beginning of the label if the text is too large to fit.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Label#property-ellipsize} property.</p>
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @property TEXT_ELLIPSIZE_TRUNCATE_MIDDLE
* @type Number
* @readonly
* <p>Add ellipses in the middle of the label if the text is too large to fit.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Label#property-ellipsize} property.</p>
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @property TEXT_ELLIPSIZE_TRUNCATE_END
* @type Number
* @readonly
* <p>Add ellipses at the end of the label if the text is too large to fit.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Label#property-ellipsize} property.</p>
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @property TEXT_ELLIPSIZE_TRUNCATE_MARQUEE
* @type Number
* @readonly
* <p>Turns on a marquee effect of the label if the text is too large to fit. (This requires {@link Titanium.UI.Label#property-focusable} to be true)</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Label#property-ellipsize} property.</p>
* @platform android 4.1.0
*/
/**
* @property TEXT_ELLIPSIZE_TRUNCATE_NONE
* @type Number
* @readonly
* <p>Disables ellipsizing of the label. The text will be cut off if it is too long.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Label#property-ellipsize} property.</p>
* @platform android 6.0.0
*/
/**
* @property EXTEND_EDGE_TOP
* @type Number
* @readonly
* <p>Specifies that the top edge of the window can extend.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Window#property-extendEdges} property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property EXTEND_EDGE_BOTTOM
* @type Number
* @readonly
* <p>Specifies that the bottom edge of the window can extend.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Window#property-extendEdges} property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property EXTEND_EDGE_LEFT
* @type Number
* @readonly
* <p>Specifies that the left edge of the window can extend.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Window#property-extendEdges} property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property EXTEND_EDGE_RIGHT
* @type Number
* @readonly
* <p>Specifies that the right edge of the window can extend.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Window#property-extendEdges} property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property EXTEND_EDGE_NONE
* @type Number
* @readonly
* <p>Specifies that none of the edges of the window can extend.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Window#property-extendEdges} property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property EXTEND_EDGE_ALL
* @type Number
* @readonly
* <p>Specifies that all the edges of the window can extend.</p>
* @description <p>One of the group of constants for the {@link Titanium.UI.Window#property-extendEdges} property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property FACE_DOWN
* @type Number
* @readonly
* <p>Constant value for face-down orientation.</p>
* @description <p>One of the group of orientation constants for the {@link Titanium.Gesture} module,
{@link Titanium.UI#property-PORTRAIT},
{@link Titanium.UI#property-UPSIDE_PORTRAIT},
{@link Titanium.UI#property-LANDSCAPE_LEFT},
{@link Titanium.UI#property-LANDSCAPE_RIGHT},
{@link Titanium.UI#property-FACE_UP},
{@link Titanium.UI#property-FACE_DOWN},
and {@link Titanium.UI#property-UNKNOWN}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property FACE_UP
* @type Number
* @readonly
* <p>Constant value for face-up orientation.</p>
* @description <p>One of the group of orientation constants for the {@link Titanium.Gesture} module,
{@link Titanium.UI#property-PORTRAIT},
{@link Titanium.UI#property-UPSIDE_PORTRAIT},
{@link Titanium.UI#property-LANDSCAPE_LEFT},
{@link Titanium.UI#property-LANDSCAPE_RIGHT},
{@link Titanium.UI#property-FACE_UP},
{@link Titanium.UI#property-FACE_DOWN},
and {@link Titanium.UI#property-UNKNOWN}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property FILL
* @type String
* @readonly
* <p>FILL behavior for UI layout.</p>
* @description <p>The FILL behavior means the view will grow its size to fill its parent.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @property INHERIT
* @type String
* @readonly
* <p>INHERIT behavior for UI layout.</p>
* @description <p>The INHERIT behavior allows the width/height of a view to be determined by the
parent. If a parent has a size of {@link Titanium.UI#property-SIZE}, then the child will inherit
a size of {@link Titanium.UI#property-SIZE}. Otherwise, the child inherits a size of {@link Titanium.UI#property-FILL}.</p>
* @platform mobileweb 2.0.0
*/
/**
* @property INPUT_BORDERSTYLE_BEZEL
* @type Number
* @readonly
* <p>Use a bezel-style border on the input field.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-borderStyle} property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property INPUT_BORDERSTYLE_LINE
* @type Number
* @readonly
* <p>Use a simple line border on the input field.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-borderStyle} property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property INPUT_BORDERSTYLE_NONE
* @type Number
* @readonly
* <p>Use no border on the input field.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-borderStyle} property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property INPUT_BORDERSTYLE_ROUNDED
* @type Number
* @readonly
* <p>Use a rounded-rectangle border on the input field.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-borderStyle} property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property INPUT_BUTTONMODE_ALWAYS
* @type Number
* @readonly
* <p>Always show buttons on the input field.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-clearButtonMode},
{@link Titanium.UI.TextField#property-leftButtonMode},
and {@link Titanium.UI.TextField#property-rightButtonMode} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property INPUT_BUTTONMODE_NEVER
* @type Number
* @readonly
* <p>Never show buttons on the input field.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-clearButtonMode},
{@link Titanium.UI.TextField#property-leftButtonMode},
and {@link Titanium.UI.TextField#property-rightButtonMode} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property INPUT_BUTTONMODE_ONBLUR
* @type Number
* @readonly
* <p>Show buttons on the input field when it loses focus.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-clearButtonMode},
{@link Titanium.UI.TextField#property-leftButtonMode},
and {@link Titanium.UI.TextField#property-rightButtonMode} properties.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property INPUT_BUTTONMODE_ONFOCUS
* @type Number
* @readonly
* <p>Show buttons on the input field when it gains focus.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-clearButtonMode},
{@link Titanium.UI.TextField#property-leftButtonMode},
and {@link Titanium.UI.TextField#property-rightButtonMode} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property INPUT_TYPE_CLASS_NUMBER
* @type Number
* @readonly
* <p>Use a keyboard with a number pad only, with the pad keyboard layout. Accepts only numbers.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-inputType} properties. This overrides any changes {@link Titanium.UI.TextField#property-keyboardType}
does to the inputType of the Android device.</p>
* @platform android 0.8
*/
/**
* @property INPUT_TYPE_CLASS_TEXT
* @type Number
* @readonly
* <p>Use an ASCII keyboard, with the standard keyboard layout.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-inputType} properties. This overrides any changes {@link Titanium.UI.TextField#property-keyboardType}
does to the inputType of the Android device.</p>
* @platform android 0.8
*/
/**
* @property KEYBOARD_APPEARANCE_ALERT
* @type Number
* @readonly
* <p>Use a keyboard appearance suitable for entering text on an alert.</p>
* @deprecated 5.4.0
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property KEYBOARD_APPEARANCE_DEFAULT
* @type Number
* @readonly
* <p>Use the platform-specific default keyboard appearance.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property KEYBOARD_APPEARANCE_DARK
* @type Number
* @readonly
* <p>Use the platform-specific dark keyboard appearance.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property KEYBOARD_APPEARANCE_LIGHT
* @type Number
* @readonly
* <p>Use the platform-specific light keyboard appearance.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property KEYBOARD_ASCII
* @type Number
* @readonly
* <p>Use an ASCII keyboard, with the standard keyboard layout.</p>
* @deprecated 5.2.0 Use <Titanium.UI.KEYBOARD_TYPE_ASCII> instead.
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property KEYBOARD_DECIMAL_PAD
* @type Number
* @readonly
* <p>Use a keyboard with decimal numbers only, with the pad keyboard layout.</p>
* @deprecated 5.2.0 Use <Titanium.UI.KEYBOARD_TYPE_DECIMAL_PAD> instead.
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
<p>On iPad, this behaves the same as {@link Titanium.UI#property-KEYBOARD_DEFAULT}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property KEYBOARD_DEFAULT
* @type Number
* @readonly
* <p>Use the default keyboard, depending on the platform.</p>
* @deprecated 5.2.0 Use <Titanium.UI.KEYBOARD_TYPE_DEFAULT> instead.
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property KEYBOARD_EMAIL
* @type Number
* @readonly
* <p>Use a keyboard suitable for composing email, with the standard keyboard layout.</p>
* @deprecated 5.2.0 Use <Titanium.UI.KEYBOARD_TYPE_EMAIL> instead.
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
<p>Note: on Mobile Web, if you enable <code>passwordType</code>, the <code>keyboardType</code> value will be
overridden with <code>KEYBOARD_TYPE_DEFAULT</code>.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property KEYBOARD_NAMEPHONE_PAD
* @type Number
* @readonly
* <p>Use a keyboard suitable for entering names and phone numbers, with the pad keyboard layout.</p>
* @deprecated 5.2.0 Use <Titanium.UI.KEYBOARD_TYPE_NAMEPHONE_PAD> instead.
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property KEYBOARD_NUMBERS_PUNCTUATION
* @type Number
* @readonly
* <p>Use a keyboard with numbers and punctuation only, with the standard keyboard layout.</p>
* @deprecated 5.2.0 Use <Titanium.UI.KEYBOARD_TYPE_NUMBERS_PUNCTUATION> instead.
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property KEYBOARD_NUMBER_PAD
* @type Number
* @readonly
* <p>Use a keyboard with a number pad only, with the pad keyboard layout.</p>
* @deprecated 5.2.0 Use <Titanium.UI.KEYBOARD_TYPE_NUMBER_PAD> instead.
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
<p>On iPad, this behaves the same as {@link Titanium.UI#property-KEYBOARD_NUMBERS_PUNCTUATION}.</p>
<p>On Mobile Web, if you enable <code>passwordType</code>, the <code>keyboardType</code> value will be overridden with
<code>KEYBOARD_TYPE_DEFAULT</code>.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property KEYBOARD_PHONE_PAD
* @type Number
* @readonly
* <p>Use a keyboard with a phone-style number pad, with the pad keyboard layout.</p>
* @deprecated 5.2.0 Use <Titanium.UI.KEYBOARD_TYPE_PHONE_PAD> instead.
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
<p>On iPad, this behaves the same as {@link Titanium.UI#property-KEYBOARD_NUMBERS_PUNCTUATION}.</p>
<p>On Mobile Web, if you enable <code>passwordType</code>, the <code>keyboardType</code> value will be overridden with
<code>KEYBOARD_TYPE_DEFAULT</code>.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property KEYBOARD_URL
* @type Number
* @readonly
* <p>Use a keyboard optimized for entering URLs, with the standard keyboard layout.</p>
* @deprecated 5.2.0 Use <Titanium.UI.KEYBOARD_TYPE_URL> instead.
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
<p>On Mobile Web, if you enable <code>passwordType</code>, the <code>keyboardType</code> value will be overridden with
<code>KEYBOARD_TYPE_DEFAULT</code>.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property KEYBOARD_TYPE_DECIMAL_PAD
* @type Number
* @readonly
* <p>Use a keyboard with decimal numbers only, with the pad keyboard layout.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
<p>On iPad, this behaves the same as {@link Titanium.UI#property-KEYBOARD_TYPE_DEFAULT}.
type: Number</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property KEYBOARD_TYPE_ASCII
* @type Number
* @readonly
* <p>Use an ASCII keyboard, with the standard keyboard layout.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property KEYBOARD_TYPE_DEFAULT
* @type Number
* @readonly
* <p>Use the default keyboard, depending on the platform.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform mobileweb 5.2.0
*/
/**
* @property KEYBOARD_TYPE_EMAIL
* @type Number
* @readonly
* <p>Use a keyboard suitable for composing email, with the standard keyboard layout.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
<p>Note: on Mobile Web, if you enable <code>passwordType</code>, the <code>keyboardType</code> value will be
overridden with <code>KEYBOARD_TYPE_DEFAULT</code>.</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform mobileweb 5.2.0
*/
/**
* @property KEYBOARD_TYPE_NAMEPHONE_PAD
* @type Number
* @readonly
* <p>Use a keyboard suitable for entering names and phone numbers, with the pad keyboard layout.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property KEYBOARD_TYPE_NUMBERS_PUNCTUATION
* @type Number
* @readonly
* <p>Use a keyboard with numbers and punctuation only, with the standard keyboard layout.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property KEYBOARD_TYPE_NUMBER_PAD
* @type Number
* @readonly
* <p>Use a keyboard with a number pad only, with the pad keyboard layout.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
<p>On iPad, this behaves the same as {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBERS_PUNCTUATION}.</p>
<p>On Mobile Web, if you enable <code>passwordType</code>, the <code>keyboardType</code> value will be overridden with
<code>KEYBOARD_TYPE_DEFAULT</code>.</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform mobileweb 5.2.0
*/
/**
* @property KEYBOARD_TYPE_PHONE_PAD
* @type Number
* @readonly
* <p>Use a keyboard with a phone-style number pad, with the pad keyboard layout.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
<p>On iPad, this behaves the same as {@link Titanium.UI#property-KEYBOARD_TYPE_NUMBERS_PUNCTUATION}.</p>
<p>On Mobile Web, if you enable <code>passwordType</code>, the <code>keyboardType</code> value will be overridden with
<code>KEYBOARD_TYPE_DEFAULT</code>.</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform mobileweb 5.2.0
*/
/**
* @property KEYBOARD_TYPE_WEBSEARCH
* @type Number
* @readonly
* <p>Use a keyboard optimized for web search terms and URL entry.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties. This type features the space and . characters prominently.</p>
<p>Note: This keyboard automatically sets the return key to "Go" (localized).</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
* @property KEYBOARD_TYPE_TWITTER
* @type Number
* @readonly
* <p>Use a keyboard optimized for twitter text entry, with easy access to the @ and</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property KEYBOARD_TYPE_URL
* @type Number
* @readonly
* <p>Use a keyboard optimized for entering URLs, with the standard keyboard layout.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-keyboardType} and {@link Titanium.UI.TextArea#property-keyboardType}
properties.</p>
<p>On Mobile Web, if you enable <code>passwordType</code>, the <code>keyboardType</code> value will be overridden with
<code>KEYBOARD_TYPE_DEFAULT</code>.</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform mobileweb 5.2.0
*/
/**
* @property LANDSCAPE_LEFT
* @type Number
* @readonly
* <p>Standard landscape orientation (home button on left).</p>
* @description <p>One of the group of orientation constants for the {@link Titanium.Gesture} module,
{@link Titanium.UI#property-PORTRAIT},
{@link Titanium.UI#property-UPSIDE_PORTRAIT},
{@link Titanium.UI#property-LANDSCAPE_LEFT},
{@link Titanium.UI#property-LANDSCAPE_RIGHT},
{@link Titanium.UI#property-FACE_UP},
{@link Titanium.UI#property-FACE_DOWN},
and {@link Titanium.UI#property-UNKNOWN}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property LANDSCAPE_RIGHT
* @type Number
* @readonly
* <p>Reverse landscape orientation (home button on right).</p>
* @description <p>One of the group of orientation constants for the {@link Titanium.Gesture} module,
{@link Titanium.UI#property-PORTRAIT},
{@link Titanium.UI#property-UPSIDE_PORTRAIT},
{@link Titanium.UI#property-LANDSCAPE_LEFT},
{@link Titanium.UI#property-LANDSCAPE_RIGHT},
{@link Titanium.UI#property-FACE_UP},
{@link Titanium.UI#property-FACE_DOWN},
and {@link Titanium.UI#property-UNKNOWN}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property LIST_ACCESSORY_TYPE_NONE
* @type Number
* @readonly
* <p>Do not display anything on the right side of an item in a list view.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property LIST_ACCESSORY_TYPE_CHECKMARK
* @type Number
* @readonly
* <p>Displays a checkmark on the right side of an item in a list view.</p>
* @description <p>Use to indicate an item in a list is selected.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property LIST_ACCESSORY_TYPE_DETAIL
* @type Number
* @readonly
* <p>Displays a detail disclosure button on the right side of an item in a list view.</p>
* @description <p>Use to indicate that selecting this item results in the display of a detailed view of that item.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property LIST_ACCESSORY_TYPE_DISCLOSURE
* @type Number
* @readonly
* <p>Displays a disclosure indicator on the right side of an item in a list view.</p>
* @description <p>Use to indicate that selecting this item results in the display of another list, reflecting
the next level in the data model hierarchy.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property LIST_ITEM_TEMPLATE_DEFAULT
* @type Number
* @readonly
* <p>A built-in style for an item with an image view and left-aligned title label.</p>
* @description <p>The text label value and image value bind to the <code>title</code> and <code>image</code> properties, respectively,
of the data item. If a property is not set, that element is not displayed.</p>
<p>On Android, the image appears on the right side of the cell, and on iOS, the image appears
on the left side of the cell.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property LIST_ITEM_TEMPLATE_SETTINGS
* @type Number
* @readonly
* <p>A built-in style for a item with an image view; a left-aligned title label; and a
right-aligned subtitle label.</p>
* @description <p>The title label value, subtitle label value and image value bind to the <code>title</code>, <code>subtitle</code>
and <code>image</code> properties, respectively, of the data item. If a property is not set, that
element is not displayed.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property LIST_ITEM_TEMPLATE_CONTACTS
* @type Number
* @readonly
* <p>A built-in style for an item with a right-aligned title label on the left side of the cell,
which is next to a left-aligned subtitle label.</p>
* @description <p>The title label value and subtitle label value bind to the <code>title</code> and <code>subtitle</code>
properties, respectively, of the data item. If a property is not set, that element is not
displayed.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property LIST_ITEM_TEMPLATE_SUBTITLE
* @type Number
* @readonly
* <p>A built-in style for an item with an image view; a black, left-aligned title label across the
top of the cell and a subtitle label below it.</p>
* @description <p>The title label value, subtitle label value and image value bind to the <code>title</code>, <code>subtitle</code>
and <code>image</code> properties, respectively, of the data item. If a property is not set, that
element is not displayed.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @property NOTIFICATION_DURATION_LONG
* @type Number
* @readonly
* <p>Specifies a long duration for an Android Toast notification ({@link Titanium.UI.Notification}).</p>
* @platform android 0.8
*/
/**
* @property NOTIFICATION_DURATION_SHORT
* @type Number
* @readonly
* <p>Specifies a short duration for an Android Toast notification ({@link Titanium.UI.Notification}).</p>
* @platform android 0.8
*/
/**
* @property CLIPBOARD_OPTION_LOCAL_ONLY
* @type String
* @readonly
* <p>Specifies that the clipboard items should not be available to other devices through Handoff.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 5.5.0
* @platform ipad 5.5.0
*/
/**
* @property CLIPBOARD_OPTION_EXPIRATION_DATE
* @type String
* @readonly
* <p>Specifies the time and date that you want the system to remove the clipboard items from the clipboard.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 5.5.0
* @platform ipad 5.5.0
*/
/**
* @property PICKER_TYPE_COUNT_DOWN_TIMER
* @type Number
* @readonly
* <p>Use a picker with a countdown timer appearance, showing hours and minutes.</p>
* @description <p>For an actual countdown timer, the application is responsible for setting a timer
to update the picker values.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property PICKER_TYPE_DATE
* @type Number
* @readonly
* <p>Use a date picker.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property PICKER_TYPE_DATE_AND_TIME
* @type Number
* @readonly
* <p>Use a date and time picker.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property PICKER_TYPE_PLAIN
* @type Number
* @readonly
* <p>Use a plain picker (for values other than date or time).</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property PICKER_TYPE_TIME
* @type Number
* @readonly
* <p>Use a time picker.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property PORTRAIT
* @type Number
* @readonly
* <p>Orientation constant for portrait mode orientation.</p>
* @description <p>One of the group of orientation constants for the {@link Titanium.Gesture} module,
{@link Titanium.UI#property-PORTRAIT},
{@link Titanium.UI#property-UPSIDE_PORTRAIT},
{@link Titanium.UI#property-LANDSCAPE_LEFT},
{@link Titanium.UI#property-LANDSCAPE_RIGHT},
{@link Titanium.UI#property-FACE_UP},
{@link Titanium.UI#property-FACE_DOWN},
and {@link Titanium.UI#property-UNKNOWN}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property RETURNKEY_CONTINUE
* @type Number
* @readonly
* <p>Set the return key text to "Continue".</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-returnKeyType} and
{@link Titanium.UI.TextArea#property-returnKeyType} properties.</p>
<p>Note: This constant is only available on iOS devices running iOS 9 or later. Older iOS
devices will display {@link Titanium.UI#property-RETURNKEY_DEFAULT}.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property RETURNKEY_DEFAULT
* @type Number
* @readonly
* <p>Use the default return key on the virtual keyboard.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-returnKeyType} and
{@link Titanium.UI.TextArea#property-returnKeyType} properties.</p>
<p>On Android devices, the default return key displays a graphical arrow.</p>
<p>On Mobile Web, the default return key label depends on the mobile browser. For Mobile Web
on iOS devices, the default label is "return".</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property RETURNKEY_DONE
* @type Number
* @readonly
* <p>Set the return key text to "Done".</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-returnKeyType} and
{@link Titanium.UI.TextArea#property-returnKeyType} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property RETURNKEY_EMERGENCY_CALL
* @type Number
* @readonly
* <p>Set the return key text to "Emergency Call".</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-returnKeyType} and
{@link Titanium.UI.TextArea#property-returnKeyType} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property RETURNKEY_GO
* @type Number
* @readonly
* <p>Set the return key text to "Go".</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-returnKeyType} and
{@link Titanium.UI.TextArea#property-returnKeyType} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property RETURNKEY_GOOGLE
* @type Number
* @readonly
* <p>Set the return key text to "Google".</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-returnKeyType} and
{@link Titanium.UI.TextArea#property-returnKeyType} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property RETURNKEY_JOIN
* @type Number
* @readonly
* <p>Set the return key text to "Join".</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-returnKeyType} and
{@link Titanium.UI.TextArea#property-returnKeyType} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property RETURNKEY_NEXT
* @type Number
* @readonly
* <p>Set the return key text to "Next".</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-returnKeyType} and
{@link Titanium.UI.TextArea#property-returnKeyType} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property RETURNKEY_ROUTE
* @type Number
* @readonly
* <p>Set the return key text to "Route".</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-returnKeyType} and
{@link Titanium.UI.TextArea#property-returnKeyType} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property RETURNKEY_SEARCH
* @type Number
* @readonly
* <p>Set the return key text to "Search".</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-returnKeyType} and
{@link Titanium.UI.TextArea#property-returnKeyType} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property RETURNKEY_SEND
* @type Number
* @readonly
* <p>Set the return key text to "Send".</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-returnKeyType} and
{@link Titanium.UI.TextArea#property-returnKeyType} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property RETURNKEY_YAHOO
* @type Number
* @readonly
* <p>Set the return key text to "Yahoo".</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-returnKeyType} and
{@link Titanium.UI.TextArea#property-returnKeyType} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property SIZE
* @type String
* @readonly
* <p>SIZE behavior for UI layout.</p>
* @description <p>The SIZE behavior means the view will constrain its size fit its contents.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @property TABLE_VIEW_SEPARATOR_STYLE_NONE
* @type Number
* @readonly
* <p>The row divider is hidden.</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property TABLE_VIEW_SEPARATOR_STYLE_SINGLE_LINE
* @type Number
* @readonly
* <p>The row divider is shown as a single line.</p>
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property TEXT_ALIGNMENT_CENTER
* @type Number/String
* @readonly
* <p>Center align text.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-textAlign} and
{@link Titanium.UI.TextArea#property-textAlign} properties.</p>
<p>This constant is a string on Android, and a number on iOS and Mobile Web.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property TEXT_ALIGNMENT_LEFT
* @type Number/String
* @readonly
* <p>Left align text.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-textAlign} and
{@link Titanium.UI.TextArea#property-textAlign} properties.</p>
<p>This constant is a string on Android, and a number on iOS and Mobile Web.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property TEXT_ALIGNMENT_RIGHT
* @type Number/String
* @readonly
* <p>Right align text.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-textAlign} and
{@link Titanium.UI.TextArea#property-textAlign} properties.</p>
<p>This constant is a string on Android, and a number on iOS and Mobile Web.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property TEXT_AUTOCAPITALIZATION_ALL
* @type Number
* @readonly
* <p>Auto-capitalize all text in the input field.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-autocapitalization} and
{@link Titanium.UI.TextArea#property-autocapitalization} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property TEXT_AUTOCAPITALIZATION_NONE
* @type Number
* @readonly
* <p>Do not auto-capitalize.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-autocapitalization} and
{@link Titanium.UI.TextArea#property-autocapitalization} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property TEXT_AUTOCAPITALIZATION_SENTENCES
* @type Number
* @readonly
* <p>Use sentence-style auto-capitalization in the input field.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-autocapitalization} and
{@link Titanium.UI.TextArea#property-autocapitalization} properties.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property TEXT_AUTOCAPITALIZATION_WORDS
* @type Number
* @readonly
* <p>Auto-capitalize the first letter of each word in the input field.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-autocapitalization} and
{@link Titanium.UI.TextArea#property-autocapitalization} properties.</p>
<p>Mobile Web does not support this because it would interfere with the native capitalization
of the mobile browser.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property TEXT_STYLE_HEADLINE
* @type String
* @readonly
* <p>Specifies the text style for the {@link Font} Object.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>One of the group of textStyle constants for the {@link Font} Object.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property TEXT_STYLE_SUBHEADLINE
* @type String
* @readonly
* <p>Specifies the text style for the {@link Font} Object.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>One of the group of textStyle constants for the {@link Font} Object.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property TEXT_STYLE_BODY
* @type String
* @readonly
* <p>Specifies the text style for the {@link Font} Object.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>One of the group of textStyle constants for the {@link Font} Object.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
* @property TEXT_STYLE_FOOTNOTE
* @type String
* @readonly
* <p>Specifies the text style for the {@link Font} Object.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>One of the group of textStyle constants for the {@link Font} Object.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property TEXT_STYLE_CAPTION1
* @type String
* @readonly
* <p>Specifies the text style for the {@link Font} Object.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>One of the group of textStyle constants for the {@link Font} Object.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property TEXT_STYLE_CAPTION2
* @type String
* @readonly
* <p>Specifies the text style for the {@link Font} Object.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>One of the group of textStyle constants for the {@link Font} Object.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property TEXT_STYLE_CALLOUT
* @type String
* @readonly
* <p>Specifies the text style for the {@link Font} Object.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>One of the group of textStyle constants for the {@link Font} Object.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property TEXT_STYLE_TITLE1
* @type String
* @readonly
* <p>Specifies the text style for the {@link Font} Object.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>One of the group of textStyle constants for the {@link Font} Object.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property TEXT_STYLE_TITLE2
* @type String
* @readonly
* <p>Specifies the text style for the {@link Font} Object.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>One of the group of textStyle constants for the {@link Font} Object.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property TEXT_STYLE_TITLE3
* @type String
* @readonly
* <p>Specifies the text style for the {@link Font} Object.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>One of the group of textStyle constants for the {@link Font} Object.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property TEXT_VERTICAL_ALIGNMENT_BOTTOM
* @type Number/String
* @readonly
* <p>Align text to the bottom of the view.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-verticalAlign} and
{@link Titanium.UI.TextArea#property-verticalAlign} properties.</p>
<p>This constant is a string on Android, and a number on iOS and Mobile Web.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property TEXT_VERTICAL_ALIGNMENT_CENTER
* @type Number/String
* @readonly
* <p>Vertically align text to the center of the view.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-verticalAlign} and
{@link Titanium.UI.TextArea#property-verticalAlign} properties.</p>
<p>This constant is a string on Android, and a number on iOS and Mobile Web.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property TEXT_VERTICAL_ALIGNMENT_TOP
* @type Number/String
* @readonly
* <p>Align text to the top of the view.</p>
* @description <p>Use with the {@link Titanium.UI.TextField#property-verticalAlign} and
{@link Titanium.UI.TextArea#property-verticalAlign} properties.</p>
<p>This constant is a string on Android, and a number on iOS and Mobile Web.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property UNIT_CM
* @type String
* @readonly
* <p>Unit constant representing units in centimeters.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @property UNIT_DIP
* @type String
* @readonly
* <p>Unit constant representing units in density-independent pixels.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @property UNIT_IN
* @type String
* @readonly
* <p>Unit constant representing units in inches.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @property UNIT_MM
* @type String
* @readonly
* <p>Unit constant representing units in millimeters.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @property UNIT_PX
* @type String
* @readonly
* <p>Unit constant representing units in pixels.</p>
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
*/
/**
* @property UNKNOWN
* @type Number
* @readonly
* <p>Orientation constant representing an unknown orientation.</p>
* @description <p>One of the group of orientation constants for the {@link Titanium.Gesture} module,
{@link Titanium.UI#property-PORTRAIT},
{@link Titanium.UI#property-UPSIDE_PORTRAIT},
{@link Titanium.UI#property-LANDSCAPE_LEFT},
{@link Titanium.UI#property-LANDSCAPE_RIGHT},
{@link Titanium.UI#property-FACE_UP},
{@link Titanium.UI#property-FACE_DOWN},
and {@link Titanium.UI#property-UNKNOWN}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property UPSIDE_PORTRAIT
* @type Number
* @readonly
* <p>Orientation constant for inverted portait orientation.</p>
* @description <p>One of the group of orientation constants for the {@link Titanium.Gesture} module,
{@link Titanium.UI#property-PORTRAIT},
{@link Titanium.UI#property-UPSIDE_PORTRAIT},
{@link Titanium.UI#property-LANDSCAPE_LEFT},
{@link Titanium.UI#property-LANDSCAPE_RIGHT},
{@link Titanium.UI#property-FACE_UP},
{@link Titanium.UI#property-FACE_DOWN},
and {@link Titanium.UI#property-UNKNOWN}.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property URL_ERROR_AUTHENTICATION
* @type Number
* @readonly
* <p>Authentication error code reported via {@link Titanium.UI.WebView#event-error}.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property URL_ERROR_BAD_URL
* @type Number
* @readonly
* <p>Bad url error code reported via {@link Titanium.UI.WebView#event-error}.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property URL_ERROR_CONNECT
* @type Number
* @readonly
* <p>Error code reported via {@link Titanium.UI.WebView#event-error} for a failure to connect to host.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property URL_ERROR_SSL_FAILED
* @type Number
* @readonly
* <p>Error code reported via {@link Titanium.UI.WebView#event-error} for an SSL failure.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property URL_ERROR_FILE
* @type Number
* @readonly
* <p>Error code reported via {@link Titanium.UI.WebView#event-error} for a failure to access a file resource on a host, except "file not found", which has its own constant.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property URL_ERROR_FILE_NOT_FOUND
* @type Number
* @readonly
* <p>Error code reported via {@link Titanium.UI.WebView#event-error} when a requested file does not exist on the host.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property URL_ERROR_HOST_LOOKUP
* @type Number
* @readonly
* <p>Error code reported via {@link Titanium.UI.WebView#event-error} when a host name cannot be resolved, such as via a DNS lookup error.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property URL_ERROR_REDIRECT_LOOP
* @type Number
* @readonly
* <p>Error code reported via {@link Titanium.UI.WebView#event-error} when a redirect loop is detected.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property URL_ERROR_TIMEOUT
* @type Number
* @readonly
* <p>Error code reported via {@link Titanium.UI.WebView#event-error} when a timeout occurs.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property URL_ERROR_UNKNOWN
* @type Number
* @readonly
* <p>Error code reported via {@link Titanium.UI.WebView#event-error} when an unknown error occurs.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property URL_ERROR_UNSUPPORTED_SCHEME
* @type Number
* @readonly
* <p>Error code reported via {@link Titanium.UI.WebView#event-error} when a url contains an unsupported scheme.</p>
* @platform android 3.0.0
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property backgroundColor
* @type String
* <p>Sets the background color of the master view (when there are no windows or other top-level
controls displayed).</p>
* @description <p>The default background color may also show through if you use semi-transparent
windows.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property backgroundImage
* @type String
* <p>Local path or URL to an image file for setting a background for the master view (when there
are no windows or other top-level controls displayed).</p>
* @description <p>The default background image may also show through if you use semi-transparent
windows.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property orientation
* @type Number
* <p>Updates the orientation of the current window to the specified orientation value.</p>
* @removed 3.0.0 Use <Titanium.UI.Window.orientationModes> instead.
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property tintColor
* @type String
* <p>Sets the global tint color of the application. It is inherited by the child views and can be
overwritten by them using the <code>tintColor</code> property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property currentTab
* @type Titanium.UI.Tab
* <p>The currently active tab, if a tab group is open.</p>
* @description <p>If no tab group is open, this value is undefined.</p>
*/
/**
* @property currentWindow
* @type Titanium.UI.Window
* @readonly
* <p>The active window associated with the executing JavaScript context.</p>
* @description <p>This property is only available when using the {@link Titanium.UI.Window#property-url} property to load
JavaScript files in their own contexts.</p>
*/
/**
* @class Point
* @platform android 1.8.0
* @platform iphone 1.8.0
* @platform ipad 1.8.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/View.yml
* <p>A pair of coordinates used to describe the location of a {@link Titanium.UI.View}.</p>
*/
/**
* @property x
* @type Number
* <p>The x-axis coordinate of this point.</p>
*/
/**
* @property y
* @type Number
* <p>The y-axis coordinate of this point.</p>
*/
/**
* @class Gradient
* @platform iphone 1.8.0
* @platform ipad 1.8.0
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/View.yml
* <p>A simple object defining a color gradient.</p>
*/
/**
* @property [type=linear]
* @type String
* <p>Type of gradient, either 'linear' or 'radial'.</p>
*/
/**
* @property [startPoint=[object Object]]
* @type Point
* <p>Start point for the gradient.</p>
*/
/**
* @property [endPoint=[object Object]]
* @type Point
* <p>End point for the gradient.</p>
*/
/**
* @property startRadius
* @type Number
* <p>For a radial gradient, the radius at the <code>startPoint</code>.</p>
*/
/**
* @property endRadius
* @type Number
* <p>For a radial gradient, the radius at the <code>endPoint</code>.</p>
*/
/**
* @property colors
* @type String[]/GradientColorRef[]
* <p>An array of colors, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property [backfillStart=false]
* @type Boolean
* <p>Set to <code>true</code> to continue filling with the starting color beyond the <code>startPoint</code>.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @property [backfillEnd=false]
* @type Boolean
* <p>Set to <code>true</code> to continue filling with the final color beyond the <code>endPoint</code>.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @class GradientColorRef
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/View.yml
* <p>A simple object consisting of a color and an offset.</p>
*/
/**
* @property color
* @type String
* <p>Color value at this point in the gradient, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property offset
* @type Number
* <p>Offset of this color in the gradient, from 0 (start) to 1 (end).</p>
*/
/**
* @class Dimension
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @platform mobileweb 2.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/View.yml
* <p>A simple object consisting of the position and size measurements.</p>
* @description <p>When a dimension is returned by the {@link Titanium.UI.View#property-rect rect} property, <code>x</code> represents the
view's left position, and <code>y</code> represents the view's top position. </p>
<p>The {@link Titanium.UI.View#property-size size} property returns a dimension object with <code>x</code> and <code>y</code> both set
to 0.</p>
*/
/**
* @property height
* @type Number
* <p>The height measurement.</p>
*/
/**
* @property width
* @type Number
* <p>The width measurement.</p>
*/
/**
* @property x
* @type Number
* <p>The x-axis coordinate of the position.</p>
*/
/**
* @property y
* @type Number
* <p>The y-axis coordinate of the position.</p>
*/
/**
* @class AnimationOption
* @platform android 5.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/View.yml
* <p>Optional parameter to enable animation to {@link Titanium.UI.View#method-hide hide} and {@link Titanium.UI.View#method-show show}.</p>
*/
/**
* @property [animated=false]
* @type Boolean
* <p>Determines whether to enable a circular reveal animation.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
*/
/**
* @class Titanium.UI.WebView
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/WebView.yml
* <p>The web view allows you to open an HTML5 based view which can load either local or remote content. </p>
* @description <p>Use the {@link Titanium.UI#method-createWebView} method or <strong><code><WebView></code></strong> Alloy element to create a web view.</p>
<p>Web views are more expensive to create than other native views because of the requirement to
load the HTML browser into memory.</p>
<p>The web view content can be any valid web content such as HTML, PDF, SVG or other WebKit supported
content types. </p>
<h4>JavaScript Context in WebViews--Local vs. Remote Content</h4>
<p>JavaScript in the web view executes in its own context. The web view can interact with this
content, but most of this functionality is limited to local content.</p>
<p><strong>Local Scripts</strong></p>
<p>When running local web content
(that is, content that is included in the application's resources), scripts have
access to the Titanium namespace. In particular, when running local web content:</p>
<ul>
<li><p>You can use {@link Titanium.App#method-addEventListener} and
{@link Titanium.App#method-fireEvent} to receive and send application-level events.</p></li>
<li><p>Events can be logged using the {@link Titanium.API} logging methods. </p></li>
</ul>
<p><strong>Remote Scripts</strong></p>
<p>Scripts downloaded from remote web servers cannot access the Titanium namespace.</p>
<p>To interact with remote content, wait until the content is loaded, then use the
{@link Titanium.UI.WebView#method-evalJS evalJS} method to execute a JavaScript expression
inside the web view and retrieve the value of an expression.</p>
<h4>Local JavaScript Files</h4>
<p>During the build process for creating a package, all JavaScript files, that is, any file with a
'.js' extension, are removed and their content is encrypted and obfuscated into one resource,
causing these files to not load properly in a WebView if they are loaded externally.</p>
<p>For JavaScript files referenced in static local HTML files, these JavaScript files are omitted
from processing and left intact, which means they can be correctly loaded in the WebView.</p>
<p>For local JavaScript files not referenced in static local HTML files, for example, a
dynamically-genereated HTML file referencing a local JavaScript file,
rename the file extension of the local JavaScript files to '.jslocal' instead of '.js'.</p>
<p>The build process for testing your application on the simulator, emulator or device does not
affect the loading of local JavaScript files.</p>
<h4>iOS Platform Implementation Notes</h4>
<p>On the iOS platform, the native web view handles scrolling and other related touch
events internally. If you add event listeners on the web view <strong>or its parent views</strong>
for any of the standard touch events (<code>touchstart</code>, <code>click</code>, and so on), these events
do not reach the native web view, and the user will not be able to scroll, zoom, click
on links, and so on. To prevent this default behavior, set
{@link Titanium.UI.WebView#property-willHandleTouches willHandleTouches} to <code>false</code>.</p>
<p>In other words, you can have either Titanium-style events against the
web view instance, or internal JavaScript events in the DOM, but not both.</p>
<h4>Android Platform Implementation Notes</h4>
<p><strong>Android 4.4 and Later Support</strong></p>
<p>Starting with Android 4.4 (API Level 19), the WebView component is based off of Chromium,
introducing a number of changes to its rendering engine. Web content may look or behave
differently depending on the Android version. The WebView does not
have full feature parity with Chrome for Android.</p>
<p>By default, the Chromium WebView uses hardware acceleration, which may cause content to
fail to render. If the WebView fails to render the content, the web view will clear
itself, displaying only the default background color. The following log messages will be
displayed in the console:</p>
<pre><code>[WARN] : AwContents: nativeOnDraw failed; clearing to background color.
[INFO] : chromium: [INFO:async_pixel_transfer_manager_android.cc(56)]
</code></pre>
<p>To workaround this issue, you can enable software rendering by setting the WebView's
{@link Titanium.UI.WebView#property-borderRadius borderRadius} property to a value greater than zero.</p>
<p>If you are developing local HTML content and size your elements using percentages, the WebView may
not calculate the sizes correctly when hardware acceleration is enabled, resulting in the same
behavior previously mentioned.</p>
<p>To workaround this issue, you can use the previously mentioned workaround to enable software
rendering, use absolute size values or use the
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Window.onresize">onresize</a> event to set the
heights of the components. For example, if you have a div element with an id set to <code>component</code>
that needs to use the entire web view, the following callback resizes the content to use the
full height of the web view:</p>
<pre><code>window.onresize= function(){
document.getElementById("component").style.height = window.innerHeight + 'px';
};
</code></pre>
<p>For more information, see the following topics:</p>
<ul>
<li><a href="http://developer.android.com/guide/webapps/migrating.html">Android Developers: Migrating to WebView in Android 4.4</a></li>
<li><a href="https://developer.chrome.com/multidevice/webview/overview">Google Chrome: WebView for Android</a></li>
</ul>
<p><strong>Plugin Support</strong></p>
<p>The Android web view supports native plugins such as Flash Player. Note that the Chromium-based
web view introduced in Android 4.4 does not support the Flash Player plugin.</p>
<p>To use plugin content, you must set the {@link Titanium.UI.WebView#property-pluginState pluginState} property
to either {@link Titanium.UI.Android#property-WEBVIEW_PLUGINS_ON WEBVIEW_PLUGINS_ON} or
{@link Titanium.UI.Android#property-WEBVIEW_PLUGINS_ON_DEMAND WEBVIEW_PLUGINS_ON_DEMAND}.</p>
<p>You must also call {@link Titanium.UI.WebView#method-pause pause} when the current activity is
paused, to prevent plugin content from continuing to run in the background. Call
{@link Titanium.UI.WebView#method-resume resume} when the current activity is resumed. You can
do this by adding listeners for the {@link Titanium.Android.Activity#event-pause Activity.pause}
and {@link Titanium.Android.Activity#event-resume Activity.resume} events.</p>
<p><strong>Accessing Cookies</strong></p>
<p>On Android, the web view uses the system cookie store which does not share cookies with the
{@link Titanium.Network.HTTPClient} cookie store. Developers can manage their cookies for both
cookie stores using the methods {@link Titanium.Network#method-addHTTPCookie}, {@link Titanium.Network#method-addSystemCookie},
{@link Titanium.Network#method-getHTTPCookies}, {@link Titanium.Network#method-getHTTPCookiesForDomain}, {@link Titanium.Network#method-getSystemCookies},
{@link Titanium.Network#method-removeHTTPCookie}, {@link Titanium.Network#method-removeHTTPCookiesForDomain}, {@link Titanium.Network#method-removeAllHTTPCookies},
{@link Titanium.Network#method-removeSystemCookie}, {@link Titanium.Network#method-removeAllSystemCookies}.</p>
<h4>For More Information</h4>
<p>See <a href="http://docs.appcelerator.com/platform/latest/#!/guide/Integrating_Web_Content">Integrating Web
Content</a>
in the Titanium Mobile Guides for more information on using web views, including use
cases, more code examples, and best practices for web view content.</p>
* <h3>Examples</h3>
<h4>Basic Web View to External URL</h4>
<p>Create a web view to a remote URL and open the window as modal.</p>
<pre><code> var webview = Titanium.UI.createWebView({url:'http://www.appcelerator.com'});
var window = Titanium.UI.createWindow();
window.add(webview);
window.open({modal:true});
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<pre><code><Alloy>
<Window id="win" modal="true">
<WebView id="webview" url="http://www.appcelerator.com" />
</Window>
</Alloy>
</code></pre>
*/
/**
* @event beforeload
* <p>Fired before the web view starts loading its content.</p>
* @description <p>This event may fire multiple times depending on the content or URL. For example, if you set
the URL of the web view to a URL that redirects to another URL, such as an HTTP URL
redirecting to an HTTPS URL, this event is fired for the original URL and the redirect URL.</p>
<p>For Mobile Web, if you pass the <code>url</code> into the constructor, you must attach the event listener
before adding the web view to its parent, otherwise the event will fire before you have a
chance to add the event listener.</p>
<p>This event does not fire when navigating remote web pages.</p>
* @param {String} url
<p>URL of the web document being loaded.</p>
* @param {Number} (ipad iphone) navigationType
<p>Constant indicating the user's action.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-WEBVIEW_NAVIGATIONTYPE_LINK_CLICKED}
<li> {@link Titanium.UI.iOS#property-WEBVIEW_NAVIGATIONTYPE_FORM_SUBMITTED}
<li> {@link Titanium.UI.iOS#property-WEBVIEW_NAVIGATIONTYPE_BACK_FORWARD}
<li> {@link Titanium.UI.iOS#property-WEBVIEW_NAVIGATIONTYPE_RELOAD}
<li> {@link Titanium.UI.iOS#property-WEBVIEW_NAVIGATIONTYPE_FORM_RESUBMITTED}
<li> {@link Titanium.UI.iOS#property-WEBVIEW_NAVIGATIONTYPE_OTHER}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event error
* <p>Fired when the web view cannot load the content.</p>
* @description <p>For Mobile Web, generally this event will <strong>not</strong> fire, even for 404, 500, and invalid URLs.
The <code>errorCode</code> value refers to one of the {@link Titanium.UI} URL_ERROR constants or, if it does not
match one of those constants, it refers to a platform-specific constant. The platform-specific
values are underlying <a href="https://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/Reference/reference.html#//apple_ref/doc/uid/TP40003793-CH3g-SW40">iOS NSURLError*</a>
or <a href="http://developer.android.com/reference/android/webkit/WebViewClient.html">Android WebViewClient ERROR_*</a> constants.</p>
* @param {Boolean} success
<p>Indicates a successful operation. Returns <code>false</code>.</p>
* @param {String} error
<p>Error message, if any returned. May be undefined.</p>
* @param {Number} code
<p>Error code.
If the error was generated by the operating system, that system's error value
is used. Otherwise, this value will be -1.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-URL_ERROR_AUTHENTICATION}
<li> {@link Titanium.UI#property-URL_ERROR_BAD_URL}
<li> {@link Titanium.UI#property-URL_ERROR_CONNECT}
<li> {@link Titanium.UI#property-URL_ERROR_SSL_FAILED}
<li> {@link Titanium.UI#property-URL_ERROR_FILE}
<li> {@link Titanium.UI#property-URL_ERROR_FILE_NOT_FOUND}
<li> {@link Titanium.UI#property-URL_ERROR_HOST_LOOKUP}
<li> {@link Titanium.UI#property-URL_ERROR_REDIRECT_LOOP}
<li> {@link Titanium.UI#property-URL_ERROR_TIMEOUT}
<li> {@link Titanium.UI#property-URL_ERROR_UNKNOWN}
<li> {@link Titanium.UI#property-URL_ERROR_UNSUPPORTED_SCHEME}
</ul></p>
* @param {String} (iphone ipad mobileweb android) url
<p>URL of the web document.</p>
* @param {String} (iphone ipad mobileweb android) message
<p>Error message. Use error instead.</p>
* @param {Number} (iphone ipad android) errorCode
<p>A constant or underlying platform specific error code. Use code instead.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-URL_ERROR_AUTHENTICATION}
<li> {@link Titanium.UI#property-URL_ERROR_BAD_URL}
<li> {@link Titanium.UI#property-URL_ERROR_CONNECT}
<li> {@link Titanium.UI#property-URL_ERROR_SSL_FAILED}
<li> {@link Titanium.UI#property-URL_ERROR_FILE}
<li> {@link Titanium.UI#property-URL_ERROR_FILE_NOT_FOUND}
<li> {@link Titanium.UI#property-URL_ERROR_HOST_LOOKUP}
<li> {@link Titanium.UI#property-URL_ERROR_REDIRECT_LOOP}
<li> {@link Titanium.UI#property-URL_ERROR_TIMEOUT}
<li> {@link Titanium.UI#property-URL_ERROR_UNKNOWN}
<li> {@link Titanium.UI#property-URL_ERROR_UNSUPPORTED_SCHEME}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event load
* <p>Fired when the web view content is loaded.</p>
* @description <p>For Mobile Web, the <code>url</code> returned in the load event is generally accurate when loading
same domain pages and remote pages that you explicitly set using the <code>url</code> property.
If you navigate to a remote page, then this <code>url</code> is set to the initial remote page's URL.</p>
* @param {String} url
<p>URL of the web document.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @event onLoadResource
* <p>Fired when loading resource.</p>
* @description <p>Android only. Notify the host application that the WebView will load the resource specified by the given url.</p>
* @param {String} url
<p>The url of the resource that will load.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.6.0
*/
/**
* @event sslerror
* <p>Fired when an SSL error occurred.</p>
* @description <p>Android only. This is a synchronous event and the developer can change the value of <code>ignoreSslError</code>
to control if the request should proceed or fail.</p>
* @param {Number} code
<p>SSL error code.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.3.0
*/
/**
* @event onStopBlacklistedUrl
* <p>Fired when a blacklisted Url is stopped</p>
* @description <p>This event is fired when a blacklisted Url is stopped</p>
* @param {String} url
<p>URL of the web document that is stopped.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 5.4.0
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method add
* @hide
* <p>Adds a child to this view's hierarchy.</p>
* @description <p>The child view is added as the last child in this view's hierarchy. </p>
<p>Although all views inherit from {@link Titanium.UI.View}, not all views are capable of
containing other views. In particular:</p>
<ul>
<li>Some views are not designed to be containers at all.</li>
<li>Some views are special-purpose containers that can only contain certain other
views.</li>
<li>Some views are top-level containers that cannot (or should not) be added to other views.</li>
</ul>
<h4>Non-Container Views</h4>
<p>The following views are not intended to act as containers that can hold other
views:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator ActivityIndicator}</li>
<li>{@link Titanium.UI.Button Button}</li>
<li>{@link Titanium.UI.ImageView ImageView}</li>
<li>{@link Titanium.UI.Label Label}</li>
<li>{@link Titanium.UI.ProgressBar ProgressBar}</li>
<li>{@link Titanium.UI.SearchBar SearchBar}</li>
<li>{@link Titanium.UI.Slider Slider}</li>
<li>{@link Titanium.UI.Switch Switch}</li>
<li>{@link Titanium.UI.TableView TableView}</li>
<li>{@link Titanium.UI.TextArea TextArea}</li>
<li>{@link Titanium.UI.TextField TextField}</li>
<li>{@link Titanium.UI.WebView WebView}</li>
</ul>
<p>Adding children to the these views <em>may</em> be supported on some platforms,
but is not guaranteed to work across platforms. Where it is supported, it may not
work as expected.</p>
<p>For maximum portability, these views should be treated as if they do not support children. <br>
Instead of adding children to these views, applications can positon other views as
siblings. For example, instead of adding a button as a child of a <code>WebView</code>, you can add
the button to the web view's parent such that it appears on top of the web view. </p>
<h4>Special-Purpose Containers</h4>
<p>A few view objects act as special-purpose containers--that is, they only manage
certain types of children, and many of them support a special means of adding
these children, instead of the general <code>add</code> method. These containers include:</p>
<ul>
<li><p>{@link Titanium.UI.ButtonBar ButtonBar} and {@link Titanium.UI.iOS.TabbedBar TabbedBar} are designed
to hold their own internally-created buttons, assigned by adding strings to the "labels" array.
Views added using the <code>add</code> method are displayed on top of these buttons.</p></li>
<li><p>{@link Titanium.UI.Picker Picker}. Can only hold <code>PickerRows</code> and <code>PickerColumns</code>, which
are added using the <code>add</code> method. Adding other types of views to a <code>Picker</code> is not
supported.</p></li>
<li><p>{@link Titanium.UI.TableView TableView} is a specialized container for
<code>TableViewSection</code> and <code>TableViewRow</code> objects. These objects must be
added using the properties and methods that <code>TableView</code> provides
for adding and removing sectons and rows.</p>
<p>On some platforms, it is possible to add arbitrary child views to a table view
using the <code>add</code> method. However, this is not guaranteed to work on all platforms,
and in general, should be avoided.</p></li>
<li><p>{@link Titanium.UI.TableViewSection TableViewSection} is a specialized container
for <code>TableViewRow</code> objects, which <em>are</em> added using the <code>add</code> method. The <code>add</code> method
on <code>TableViewSection</code> can only be used to add <code>TableViewRow</code> objects.</p></li>
<li><p>{@link Titanium.UI.iOS.Toolbar Toolbar} is designed to hold buttons and certain
other controls, added to its <code>items</code> array. Views added using the <code>add</code> method are
displayed on top of the controls in the <code>items</code> array.</p></li>
<li><p>The <code>Tab</code>, <code>TabGroup</code>, <code>NavigationGroup</code>, <code>NavigationWindow</code> and <code>SplitWindow</code> objects are
special containers that manage windows. These are discussed in the
"Top-Level Containers" section.</p></li>
</ul>
<h4>Top-Level Containers</h4>
<p>There are certain top-level containers that are not intended to be added
as the children of other views. These top-level containers include
{@link Titanium.UI.Window}, {@link Titanium.UI.iPad.SplitWindow}, {@link Titanium.UI.iOS.NavigationWindow},
and {@link Titanium.UI.TabGroup}. Other types of views must be added
to a top-level container in order to be displayed on screen.</p>
<p>The special containers {@link Titanium.UI.MobileWeb.NavigationGroup},
{@link Titanium.UI.iOS.NavigationWindow}, {@link Titanium.UI.iPad.SplitWindow},
{@link Titanium.UI.Tab}, and {@link Titanium.UI.TabGroup} manage windows.
These managed windows may be referred to as <em>children</em> of the
container, but they are not added using the <code>add</code> method.</p>
<p>Note that although a <code>NavigationGroup</code> manages windows, it is not itself a
top-level container. It must be added to a <code>Window</code> in order to be displayed.</p>
<p><code>Tab</code> is another kind of special container: it is not itself a top-level container,
but can only be used within a <code>TabGroup</code>. You cannot <code>add</code> a <code>Tab</code> to an arbitrary
container.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method pause
* <p>Pauses native webview plugins.</p>
* @description <p>Add a <code>pause</code> handler to your {@link Titanium.Android.Activity} and invoke
this method to pause native plugins. This is important with Flash content
as it will continue in the background unless this method is invoked.</p>
<p>Call {@link Titanium.UI.WebView#method-resume resume} to unpause native plugins.</p>
* @platform android 1.8.0
*/
/**
* @method repaint
* <p>Forces the web view to repaint its contents.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method release
* <p>Releases memory when the web view is no longer needed.</p>
* @platform android 2.0.0
*/
/**
* @method resume
* <p>Resume native webview plugins.</p>
* @description <p>Used to unpause native plugins after calling {@link Titanium.UI.WebView#method-pause pause}.</p>
<p>Add a <code>resume</code> handler to your {@link Titanium.Android.Activity} and invoke
this method to resume native plugins.</p>
* @platform android 1.8.0
*/
/**
* @method setBasicAuthentication
* <p>Sets the basic authentication for this web view to use on subsequent URl requests.</p>
* @param {String} username
<p>Basic auth username.</p>
* @param {String} password
<p>Basic auth password.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method canGoBack
* <p>Returns <code>true</code> if the web view can go back in its history list.</p>
* @description <p>For Mobile Web, returns true if <code>url</code> is set.</p>
* @returns {Boolean}
*/
/**
* @method canGoForward
* <p>Returns <code>true</code> if the web view can go forward in its history list.</p>
* @description <p>For Mobile Web, returns true if <code>url</code> is set.</p>
* @returns {Boolean}
*/
/**
* @method evalJS
* <p>Evaluates a JavaScript expression inside the context of the web view and
optionally, returns a result.</p>
* @description <p>The JavaScript expression must be passed in as a string. If you are passing in any objects,
you must serialize them to strings using {@link Global stringify}.</p>
<p>The <code>evalJS</code> method returns a string representing the value of the expression. For
example, the following call retrieves the <code>document.title</code> element from the
document currently loaded into the web view.</p>
<pre><code>var docTitle = myWebView.evalJS('document.title');
</code></pre>
<p>It is not necessary to include <code>return</code> in the JavaScript. In fact, the following
call returns the empty string:</p>
<pre><code>myWebView.evalJS('return document.title');
</code></pre>
<p>For Mobile Web, you can only execute JavaScript when the contents are on the same domain.</p>
* @param {String} code
<p>JavaScript code as a string. The code will be evaluated inside the web view context.</p>
* @returns {String}
*/
/**
* @method goBack
* <p>Goes back one entry in the web view's history list, to the previous page.</p>
* @description <p>For Mobile Web, you can only go back for same domain pages. If you set the initial <code>url</code> to a
remote page, the back function will not work. If you load a local page, then the user navigates
away to a remote page, you cannot go back.</p>
*/
/**
* @method goForward
* <p>Goes forward one entry in this web view's history list, if possible.</p>
* @description <p>For Mobile Web, you can only go forward for same domain pages. If you set the initial <code>url</code>
to a remote page, the forward function will not work.</p>
*/
/**
* @method reload
* <p>Reloads the current webpage.</p>
* @description <p>For Mobile Web, when you reload, the last visited same domain page or the original <code>url</code>
is the page that is reloaded and all local URL history is reset. The history of remote URLs is
preserved.</p>
<p>You may need to simply reset the <code>url</code> property to reinitialize the WebView's iframe. </p>
*/
/**
* @method stopLoading
* <p>Stops loading a currently loading page.</p>
* @description <p>For Mobile Web, due to browser permissions, this will issue a stop on all windows including
the parent and all other web views. Generally, this feature does not work reliably and instead
you may choose to set the <code>hardStop</code> argument to true.</p>
<p>When <code>hardStop</code> is set to <code>true</code>, the Mobile Web platforms will destroy the iFrame
used to display the content, so nothing is displayed where the web view used to
be. The actual web view component is <em>not</em> destroyed, and you can redisplay it by
calling {@link Titanium.UI.WebView#method-reload reload}, or by specifying new content.</p>
* @param {Boolean} hardStop
<p>Forces the web view to destroy the iFrame (Mobile Web only).</p>
*/
/**
* @method setHtml
* <p>Sets the value of {@link Titanium.UI.WebView#property-html html} property.</p>
* @description <p>The <code>options</code> parameter can be used to specify two options that affect
the WebView main content presentation:</p>
<ul>
<li><code>baseURL</code>. Sets the base URL for the content.</li>
<li><code>mimeType</code>. Sets the MIME type for the content. Defaults to "text/html" if not specified.</li>
</ul>
<p>For example:</p>
<pre><code>setHtml('<html><body>Hello, <a href="/documentation">Titanium</a>!</body></html>',
{baseURL:'http://developer.appcelerator.com/'});
</code></pre>
* @param {Object} html
<p>New HTML to display in the web view.</p>
* @param {Dictionary} options (optional)
<p>Optional parameters for the content. Only used by iOS and Android.</p>
*/
/**
* @method getAllowsLinkPreview
* <p>Gets the value of the {@link Titanium.UI.WebView#property-allowsLinkPreview} property.</p>
* @returns {Boolean}
* @platform iphone 5.4.0
*/
/**
* @method setAllowsLinkPreview
* <p>Sets the value of the {@link Titanium.UI.WebView#property-allowsLinkPreview} property.</p>
* @param {Boolean} allowsLinkPreview
<p>New value for the property.</p>
* @platform iphone 5.4.0
*/
/**
* @method getBlacklistedURLs
* <p>Gets the value of the {@link Titanium.UI.WebView#property-blacklistedURLs} property.</p>
* @returns {String[]}
* @platform android 5.4.0
*/
/**
* @method setBlacklistedURLs
* <p>Sets the value of the {@link Titanium.UI.WebView#property-blacklistedURLs} property.</p>
* @param {Array<String>} blacklistedURLs
<p>New value for the property.</p>
* @platform android 5.4.0
*/
/**
* @method getDisableBounce
* <p>Gets the value of the {@link Titanium.UI.WebView#property-disableBounce} property.</p>
* @returns {Boolean}
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setDisableBounce
* <p>Sets the value of the {@link Titanium.UI.WebView#property-disableBounce} property.</p>
* @param {Boolean} disableBounce
<p>New value for the property.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getDisableSelection
* <p>Gets the value of the {@link Titanium.UI.WebView#property-disableSelection} property.</p>
* @returns {Boolean}
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @method setDisableSelection
* <p>Sets the value of the {@link Titanium.UI.WebView#property-disableSelection} property.</p>
* @param {Boolean} disableSelection
<p>New value for the property.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @method getEnableJavascriptInterface
* <p>Gets the value of the {@link Titanium.UI.WebView#property-enableJavascriptInterface} property.</p>
* @returns {Boolean}
* @platform android 3.6.0
*/
/**
* @method setEnableJavascriptInterface
* <p>Sets the value of the {@link Titanium.UI.WebView#property-enableJavascriptInterface} property.</p>
* @param {Boolean} enableJavascriptInterface
<p>New value for the property.</p>
* @platform android 3.6.0
*/
/**
* @method getHandlePlatformUrl
* <p>Gets the value of the {@link Titanium.UI.WebView#property-handlePlatformUrl} property.</p>
* @returns {Boolean}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setHandlePlatformUrl
* <p>Sets the value of the {@link Titanium.UI.WebView#property-handlePlatformUrl} property.</p>
* @param {Boolean} handlePlatformUrl
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getHideLoadIndicator
* <p>Gets the value of the {@link Titanium.UI.WebView#property-hideLoadIndicator} property.</p>
* @returns {Boolean}
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method setHideLoadIndicator
* <p>Sets the value of the {@link Titanium.UI.WebView#property-hideLoadIndicator} property.</p>
* @param {Boolean} hideLoadIndicator
<p>New value for the property.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getIgnoreSslError
* <p>Gets the value of the {@link Titanium.UI.WebView#property-ignoreSslError} property.</p>
* @returns {Boolean}
* @platform android 3.0.0
*/
/**
* @method setIgnoreSslError
* <p>Sets the value of the {@link Titanium.UI.WebView#property-ignoreSslError} property.</p>
* @param {Boolean} ignoreSslError
<p>New value for the property.</p>
* @platform android 3.0.0
*/
/**
* @method getOnCreateWindow
* <p>Gets the value of the {@link Titanium.UI.WebView#property-onCreateWindow} property.</p>
* @returns {Callback<Object>}
* @platform android 2.1.0
*/
/**
* @method setOnCreateWindow
* <p>Sets the value of the {@link Titanium.UI.WebView#property-onCreateWindow} property.</p>
* @param {Callback<Object>} onCreateWindow
<p>New value for the property.</p>
* @platform android 2.1.0
*/
/**
* @method getOverScrollMode
* <p>Gets the value of the {@link Titanium.UI.WebView#property-overScrollMode} property.</p>
* @returns {Number}
* @platform android 3.1.0
*/
/**
* @method setOverScrollMode
* <p>Sets the value of the {@link Titanium.UI.WebView#property-overScrollMode} property.</p>
* @param {Number} overScrollMode
<p>New value for the property.</p>
* @platform android 3.1.0
*/
/**
* @method getCacheMode
* <p>Gets the value of the {@link Titanium.UI.WebView#property-cacheMode} property.</p>
* @returns {Number}
* @platform android 3.2.0
*/
/**
* @method setCacheMode
* <p>Sets the value of the {@link Titanium.UI.WebView#property-cacheMode} property.</p>
* @param {Number} cacheMode
<p>New value for the property.</p>
* @platform android 3.2.0
*/
/**
* @method getPluginState
* <p>Gets the value of the {@link Titanium.UI.WebView#property-pluginState} property.</p>
* @returns {Number}
* @platform android 1.8.0
*/
/**
* @method setPluginState
* <p>Sets the value of the {@link Titanium.UI.WebView#property-pluginState} property.</p>
* @param {Number} pluginState
<p>New value for the property.</p>
* @platform android 1.8.0
*/
/**
* @method getScrollsToTop
* <p>Gets the value of the {@link Titanium.UI.WebView#property-scrollsToTop} property.</p>
* @returns {Boolean}
* @platform iphone 2.0.0
* @platform ipad 2.0.0
*/
/**
* @method setScrollsToTop
* <p>Sets the value of the {@link Titanium.UI.WebView#property-scrollsToTop} property.</p>
* @param {Boolean} scrollsToTop
<p>New value for the property.</p>
* @platform iphone 2.0.0
* @platform ipad 2.0.0
*/
/**
* @method getShowScrollbars
* <p>Gets the value of the {@link Titanium.UI.WebView#property-showScrollbars} property.</p>
* @returns {Boolean}
* @platform mobileweb 1.8.2
*/
/**
* @method setShowScrollbars
* <p>Sets the value of the {@link Titanium.UI.WebView#property-showScrollbars} property.</p>
* @param {Boolean} showScrollbars
<p>New value for the property.</p>
* @platform mobileweb 1.8.2
*/
/**
* @method getEnableZoomControls
* <p>Gets the value of the {@link Titanium.UI.WebView#property-enableZoomControls} property.</p>
* @returns {Boolean}
* @platform android 1.8.0
*/
/**
* @method setEnableZoomControls
* <p>Sets the value of the {@link Titanium.UI.WebView#property-enableZoomControls} property.</p>
* @param {Boolean} enableZoomControls
<p>New value for the property.</p>
* @platform android 1.8.0
*/
/**
* @method getScalesPageToFit
* <p>Gets the value of the {@link Titanium.UI.WebView#property-scalesPageToFit} property.</p>
* @returns {Boolean}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method setScalesPageToFit
* <p>Sets the value of the {@link Titanium.UI.WebView#property-scalesPageToFit} property.</p>
* @param {Boolean} scalesPageToFit
<p>New value for the property.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getUserAgent
* <p>Gets the value of the {@link Titanium.UI.WebView#property-userAgent} property.</p>
* @returns {String}
* @platform android 0.8
*/
/**
* @method setUserAgent
* <p>Sets the value of the {@link Titanium.UI.WebView#property-userAgent} property.</p>
* @param {String} userAgent
<p>New value for the property.</p>
* @platform android 0.8
*/
/**
* @method getWillHandleTouches
* <p>Gets the value of the {@link Titanium.UI.WebView#property-willHandleTouches} property.</p>
* @returns {Boolean}
* @platform iphone 1.8.2
* @platform ipad 1.8.2
*/
/**
* @method setWillHandleTouches
* <p>Sets the value of the {@link Titanium.UI.WebView#property-willHandleTouches} property.</p>
* @param {Boolean} willHandleTouches
<p>New value for the property.</p>
* @platform iphone 1.8.2
* @platform ipad 1.8.2
*/
/**
* @method getLightTouchEnabled
* <p>Gets the value of the {@link Titanium.UI.WebView#property-lightTouchEnabled} property.</p>
* @returns {Boolean}
* @platform android 3.2.0
*/
/**
* @method setLightTouchEnabled
* <p>Sets the value of the {@link Titanium.UI.WebView#property-lightTouchEnabled} property.</p>
* @param {Boolean} lightTouchEnabled
<p>New value for the property.</p>
* @platform android 3.2.0
*/
* @method getRequestHeaders
* <p>Gets the value of the {@link Titanium.UI.WebView#property-requestHeaders} property.</p>
* @returns {Dictionary}
* @platform android 6.1.0
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
* @method setRequestHeaders
* <p>Sets the value of the {@link Titanium.UI.WebView#property-requestHeaders} property.</p>
* @param {Dictionary} requestHeaders
<p>New value for the property.</p>
* @platform android 6.1.0
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @method getData
* <p>Gets the value of the {@link Titanium.UI.WebView#property-data} property.</p>
* @returns {Titanium.Blob/Titanium.Filesystem.File}
*/
/**
* @method setData
* <p>Sets the value of the {@link Titanium.UI.WebView#property-data} property.</p>
* @param {Titanium.Blob/Titanium.Filesystem.File} data
<p>New value for the property.</p>
*/
/**
* @method getHtml
* <p>Gets the value of the {@link Titanium.UI.WebView#property-html} property.</p>
* @returns {String}
*/
/**
* @method setHtml
* <p>Sets the value of the {@link Titanium.UI.WebView#property-html} property.</p>
* @param {String} html
<p>New value for the property.</p>
*/
/**
* @method getLoading
* <p>Gets the value of the {@link Titanium.UI.WebView#property-loading} property.</p>
* @returns {Boolean}
*/
/**
* @method setLoading
* <p>Sets the value of the {@link Titanium.UI.WebView#property-loading} property.</p>
* @param {Boolean} loading
<p>New value for the property.</p>
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.UI.WebView#property-url} property.</p>
* @returns {String}
*/
/**
* @method setUrl
* <p>Sets the value of the {@link Titanium.UI.WebView#property-url} property.</p>
* @param {String} url
<p>New value for the property.</p>
*/
/**
* @property [allowsLinkPreview=false]
* @type Boolean
* <p>A Boolean value that determines whether pressing on a link displays a preview of the
destination for the link.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>This property is available on devices that support 3D Touch. Default value is <code>false</code>.</p>
<p>If you set this value to <code>true</code> for a web view, users (with devices that support 3D Touch)
can preview link destinations, and can preview detected data such as addresses, by pressing on links.
Such previews are known to users as peeks. If a user presses deeper, the preview navigates (or pops,
in user terminology) to the destination. Because pop navigation switches the user from your app to
Safari, it is opt-in, by way of this property, rather default behavior for this class.</p>
* @platform iphone 5.4.0
*/
/**
* @property blacklistedURLs
* @type String[]
* @creationOnly
* <p>An array of url strings to blacklist.</p>
* @description <p>An array of url strings to blacklist. This will stop the webview from going to urls listed in
the blacklist. Note, this only applies in the links clicked inside the webview. The first website
that is loaded will not be stopped even if it matches the blacklist.</p>
* @platform android 5.4.0
*/
/**
* @property [disableBounce=false]
* @type Boolean
* <p>Determines whether the view will bounce when scrolling to the edge of the scrollable region.</p>
* @description <p>Set to <code>true</code> to disable the bounce effect.</p>
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [disableSelection=false]
* @type Boolean
* <p>Determines whether the webview should not be able to select a range of text and show the
contextual callout-bubble.</p>
* @description <p>Set to <code>true</code> to disable the text-selection and callout-bubble.</p>
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property [enableJavascriptInterface=true]
* @type Boolean
* @creationOnly
* <p>Enable adding javascript interfaces internally to webview prior to JELLY_BEAN_MR1 (Android 4.2)</p>
* @description <p>This property is introduced to prevent a security issue with older devices (< JELLY_BEAN_MR1)</p>
* @platform android 3.6.0
*/
/**
* @property [handlePlatformUrl=undefined. Behaves as if false]
* @type Boolean
* <p>Lets the webview handle platform supported urls</p>
* @description <p>By default any urls that are not handled by the Titanium platform but can be handled by the
shared application are automatically sent to the shared application and the webview does not
open these. When this property is set to <code>true</code> the webview will attempt to handle these
urls and they will not be sent to the shared application. An example is links to telephone
numbers.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [hideLoadIndicator=false]
* @type Boolean
* <p>Hides activity indicator when loading remote URL.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property [ignoreSslError=undefined but behaves as false]
* @type Boolean
* <p>Controls whether to ignore invalid SSL certificates or not.</p>
* @description <p>If set to <code>true</code>, the web page loads despite having an invalid SSL certificate.</p>
<p>If set to <code>false</code>, a web page with an invalid SSL certificate does not load.</p>
* @platform android 3.0.0
*/
/**
* @property onCreateWindow
* @type Callback<Object>
* <p>Callback function called when there is a request for the application to create a new window
to host new content.</p>
* @description <p>For example, the request is triggered if a web page wants to open a URL in a new
window. By default, Titanium will open a new full-size window to host the new content.
Use the callback to override the default behavior.</p>
<p>The callback needs to create a new WebView object to host the content in and add the WebView to the
application UI. The callback must return either a WebView object to host the content in or <code>null</code> if
it does not wish to handle the request.</p>
<p>The callback is passed a dictionary with two boolean properties:</p>
<ul>
<li><code>isDialog</code>: set to true if the content should be opened in a dialog window rather than a
full-size window.</li>
<li><code>isUserGesture</code>: set to true if the user initiated the request with a gesture, such as
tapping a link.</li>
</ul>
<p>The following example opens new web content in a new tab rather than a new window:</p>
<pre><code>var tabGroup = Ti.UI.createTabGroup(),
win = Ti.UI.createWindow(),
tab = Ti.UI.createTab({window: win, title: 'Start Page'}),
webview = Ti.UI.createWebView({ url:'index.html'});
webview.onCreateWindow = function(e) {
var newWin = Ti.UI.createWindow(),
newWebView = Ti.UI.createWebView(),
newTab = Ti.UI.createTab({window: newWin, title: 'New Page'});
newWin.add(newWebView);
tabGroup.addTab(newTab);
return newWebView;
};
win.add(webview);
tabGroup.addTab(tab);
tabGroup.open();
</code></pre>
* @platform android 2.1.0
*/
/**
* @property [overScrollMode=Titanium.UI.Android.OVER_SCROLL_ALWAYS]
* @type Number
* <p>Determines the behavior when the user overscrolls the view.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-OVER_SCROLL_ALWAYS}
<li> {@link Titanium.UI.Android#property-OVER_SCROLL_IF_CONTENT_SCROLLS}
<li> {@link Titanium.UI.Android#property-OVER_SCROLL_NEVER}
</ul></p>
* @platform android 3.1.0
*/
/**
* @property [cacheMode={@link Titanium.UI.Android#property-WEBVIEW_LOAD_DEFAULT}]
* @type Number
* <p>Determines how a cache is used in this web view.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-WEBVIEW_LOAD_DEFAULT}
<li> {@link Titanium.UI.Android#property-WEBVIEW_LOAD_NO_CACHE}
<li> {@link Titanium.UI.Android#property-WEBVIEW_LOAD_CACHE_ONLY}
<li> {@link Titanium.UI.Android#property-WEBVIEW_LOAD_CACHE_ELSE_NETWORK}
</ul></p>
* @platform android 3.2.0
*/
/**
* @property [pluginState={@link Titanium.UI.Android#property-WEBVIEW_PLUGINS_OFF}]
* @type Number
* <p>Determines how to treat content that requires plugins in this web view.</p>
* <p> <b>Requires:</b>
Android 2.2 and later
</p>
* @description <p>This setting affects the loading of content that requires web plugins, such as
Flash Player.</p>
<p>To use the Flash Player plugin, hardware acceleration must be enabled for your
application. To enable hardware acceleration, add the <code>tool-api-level</code> and
<code>manifest</code> elements shown below inside the <code>android</code> element in your <code>tiapp.xml</code> file.</p>
<pre><code><android xmlns:android="http://schemas.android.com/apk/res/android">
<tool-api-level>11</tool-api-level>
<manifest>
<application android:hardwareAccelerated="true"/>
</manifest>
</android>
</code></pre>
<p>See Android documentation for
<a href="http://developer.android.com/reference/android/webkit/WebSettings.PluginState.html">WebSettings.PluginState</a>. </p>
<p>This property only works on Android devices at API Level 8 or greater.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-WEBVIEW_PLUGINS_OFF}
<li> {@link Titanium.UI.Android#property-WEBVIEW_PLUGINS_ON}
<li> {@link Titanium.UI.Android#property-WEBVIEW_PLUGINS_ON_DEMAND}
</ul></p>
* @platform android 1.8.0
*/
/**
* @property [scrollsToTop=true]
* @type Boolean
* <p>Controls whether the scroll-to-top gesture is effective.</p>
* @description <p>The scroll-to-top gesture is a tap on the status bar; The default value of this property is true.
This gesture works when you have a single visible web view.
If there are multiple table views, web views, text areas, and/or scroll views visible,
you will need to disable (set to false) on the above views you DON'T want this
behaviour on. The remaining view will then respond to scroll-to-top gesture. </p>
* @platform iphone 2.0.0
* @platform ipad 2.0.0
*/
/**
* @property [showScrollbars=true]
* @type Boolean
* <p>If <code>true</code>, scrollbars are displayed if content is larger than the web view.</p>
* @platform mobileweb 1.8.2
*/
/**
* @property [enableZoomControls=true]
* @type Boolean
* <p>If <code>true</code>, zoom controls are enabled.</p>
* @platform android 1.8.0
*/
/**
* @property [scalesPageToFit=`false` on iOS. On Android, `false` when content is specified as a local URL,
`true` for any other kind of content (remote URL, `Blob`, or `File`).
]
* @type Boolean
* <p>If <code>true</code>, scale contents to fit the web view.</p>
* @description <p>On iOS, setting this to <code>true</code> sets the initial zoom level to show the entire
page, and enables the user to zoom the web view in and out. Setting this to
<code>false</code> prevents the user from zooming the web view.</p>
<p>On Android, only controls the initial zoom level.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property [userAgent=System default user-agent value.]
* @type String
* <p>The User-Agent header used by the web view when requesting content.</p>
* @platform android 0.8
*/
/**
* @property [willHandleTouches=true]
* @type Boolean
* <p>Explicitly specifies if this web view handles touches.</p>
* @description <p>On the iOS platform, if this web view <strong>or any of its parent views</strong> have touch
listeners, the Titanium component intercepts <strong>all</strong> touch events. This
prevents the user from interacting with the native web view components.</p>
<p>Set this flag to <code>false</code> to disable the default behavior. Setting this property to <code>false</code>
allows the user to interact with the native web view and still honor any <code>touch</code> events sent to
its parents. No <code>touch</code> events will be generated when the user interacts with the web view itself.</p>
<p>Set this flag to <code>true</code> if you want to receive touch events from the web view and
the user does not need to interact with the web content directly.</p>
<p>This flag is <code>true</code> by default to retain backwards compatibility with previous
behavior.</p>
* @platform iphone 1.8.2
* @platform ipad 1.8.2
*/
/**
* @property [lightTouchEnabled=true]
* @type Boolean
* <p>Enables using light touches to make a selection and activate mouseovers.</p>
* @description <p>Setting this property solves the problem of web links with specific length not triggering a link click in Android.</p>
<p>This is only an Android specific property and has no effect starting from API level 18.</p>
<p>This flag is <code>true</code> by default to retain backwards compatibility with previous
behavior.</p>
* @platform android 3.2.0
*/
* @property requestHeaders
* @type Dictionary
* <p>Sets extra request headers for this web view to use on subsequent URL requests.</p>
* @description <p>Setting this property allows you to set custom headers to the URL requests.
The parameter will be key-value pairs: <code>{"Custom-field1":"value1", "Custom-field2":"value2"}</code></p>
<p>On Android you should avoid Calling <code>setRequestHeaders()</code> right after <code>createWebView()</code>. Use the <code>requestHeaders</code> property
inside <code>createWebView()</code> or put it inside the window <code>open</code> event.</p>
* @platform android 6.1.0
* @platform iphone 6.1.0
* @platform ipad 6.1.0
*/
/**
* @property data
* @type Titanium.Blob/Titanium.Filesystem.File
* <p>Web content to load.</p>
* @description <p>Android only supports loading data from a <code>Blob</code>, not a <code>File</code>.</p>
<p>For Mobile Web, setting new content will reset the <code>url</code> and the WebView's history. The WebView's
"onload" event will have already fired prior to the data being set inside the WebView.</p>
<p>See also: {@link Titanium.UI.WebView#property-url url} and {@link Titanium.UI.WebView#property-html html}.</p>
*/
/**
* @property html
* @type String
* <p>HTML content of this web view.</p>
* @description <p>See {@link Titanium.UI.WebView#method-setHtml setHtml} for additional parameters that can be
specified when setting HTML content.</p>
<p>The web view's content can also be set using the {@link Titanium.UI.WebView#property-data data} or
{@link Titanium.UI.WebView#property-url url} properties.</p>
<h4>Mobile Web Platform Notes</h4>
<p>For Mobile Web, setting new content will reset the <code>url</code> and the WebView's
history. </p>
<p>Content added using the <code>html</code> property (or the <code>setHtml</code> method) will never
receive an "onload" DOM event. </p>
<p>When querying this the <code>html</code> property, Mobile Web return a modified version of the original html.
The <code><html></code> tag is stripped off, along with any comments outside of the <code><html></code> tag. Some default
attributes may be added as well. For example, a web page with the code:</p>
<pre><code><html><head></head><body>hello</body></html>
</code></pre>
<p>returns:</p>
<pre><code><head></head><body marginwidth="0" marginheight="0">hello</body>
</code></pre>
<p>in Safari.</p>
<p>See also: {@link Titanium.UI.WebView#property-data data} and {@link Titanium.UI.WebView#property-url url}.</p>
*/
/**
* @property loading
* @type Boolean
* <p>Indicates if the webview is loading content.</p>
*/
/**
* @property url
* @type String
* <p>URL to the web document.</p>
* @description <p>This property changes as the content of the webview changes (such as when the user
clicks a hyperlink inside the web view).</p>
<p>See also: {@link Titanium.UI.WebView#property-data data} and {@link Titanium.UI.WebView#property-html html}.</p>
*/
/**
* @class Titanium.UI.Window
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Window.yml
* <p>The Window is an empty drawing surface or container.</p>
* @description <p>To create a window, use the {@link Titanium.UI#method-createWindow} method or a <strong><code><Window></code></strong> Alloy element.</p>
<p>A window is a top-level container which can contain other views. Windows can
be <em>opened</em> and <em>closed</em>. Opening a window causes the window and its child
views to be added to the application's render stack, on top of any previously opened
windows. Closing a window removes the window and its children from the render stack.</p>
<p>Windows <em>contain</em> other views, but in general they are not <em>contained</em> inside
other views. There are a few specialized views that manage windows:</p>
<ul>
<li>{@link Titanium.UI.iOS.NavigationWindow NavigationWindow}</li>
<li>{@link Titanium.UI.iPad.SplitWindow SplitWindow}</li>
<li>{@link Titanium.UI.TabGroup TabGroup}</li>
<li>{@link Titanium.UI.Tab Tab}</li>
<li>{@link Titanium.UI.MobileWeb.NavigationGroup NavigationGroup}</li>
</ul>
<p>By default, windows occupy the entire screen except for the navigation bar,
status bar, and in the case of windows contained in tab groups, the tab bar.
To take up the entire screen, covering any other UI, specify <code>fullscreen:true</code>
when creating the window.</p>
<h3>Pass Context Between Windows</h3>
<p>To pass data between windows, use a
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/CommonJS_Modules_in_Titanium">CommonJS module</a>
to save information from one window then retrieve it in another. In the example below, the foo
module exposes two methods to store and retrieve an object. The first window of the project
loads the foo module and uses the set method to store some data before opening the second window.
The second window loads the same module and is able to retrieve the content saved by the first
window with the get method.</p>
<p>Note that for Alloy projects, you can simply pass the context as the second argument of the
Alloy.createController method, then retrieve the data with the special variable <code>arguments[0]</code>
in the controller code.</p>
<p><code>app/lib/foo.js</code>:</p>
<pre><code>// For a classic Titanium project, save the file to 'Resources/foo.js'
var data = {};
function setData (obj){
data = obj;
}
function getData () {
return data;
}
// The special variable 'exports' exposes the functions as public
exports.setData = setData;
exports.getData = getData;
</code></pre>
<p><code>app/views/index.xml</code>:</p>
<pre><code><Alloy>
<Window backgroundColor="blue">
<Label onClick="openWindow">Open the Red Window!</Label>
</Window>
</Alloy>
</code></pre>
<p><code>app/controllers/index.js</code>:</p>
<pre><code>var foo = require('foo');
foo.setData({foobar: 42});
function openWindow () {
var win2 = Alloy.createController('win2').getView();
// For Alloy projects, you can pass context
// to the controller in the Alloy.createController method.
// var win2 = Alloy.createController('win2', {foobar: 42}).getView();
win2.open();
}
$.index.open();
</code></pre>
<p><code>app/views/win2.xml</code>:</p>
<pre><code><Alloy>
<Window backgroundColor="red">
<Label id="label">I am a red window.</Label>
</Window>
</Alloy>
</code></pre>
<p><code>app/controllers/win2.js</code>:</p>
<pre><code>var foo = require('foo');
$.label.text = foo.getData().foobar;
// For Alloy projects, you can also pass in context
// with the Alloy.createController method and retrieve
// it in the controller code.
// var args = arguments[0] || {};
// $.label.text = args.foobar;
</code></pre>
<h3>Modal Windows</h3>
<p>In the user interface, a modal window is a window that blocks the main application UI until the
modal window is dismissed. A modal window requires the user to interact with it to resume the
normal flow of the application. For example, if an action requires the user to login, the
application can present a login window, then after the user is authenticated, the normal flow
of the application can be resumed.</p>
<p>To create a modal window, set the <code>modal</code> property to <code>true</code> in the dictionary passed to
either the <code>Titanium.UI.createWindow()</code> method or the Window object's <code>open()</code> method.</p>
<h4>Android Behavior</h4>
<p>The Android platform does not have a concept of a modal window but instead uses modal
dialogs. You may want to use a {@link Titanium.UI.AlertDialog} or {@link Titanium.UI.OptionDialog} and
use the <code>androidView</code> property rather than a modal window.</p>
<p>For Android, Titanium creates a heavyweight window with a translucent background
(if the background properties are not set). Before API level 14 (Android 4.x), the
modal window will blur the background. On API level 14 and above, the Android OS no longer
supports the blur effect.</p>
<p>The combination of <code>fullscreen:true</code> and <code>modal:true</code> will not work as expected.
If the background window displays the status bar or action bar, it will be visible behind the modal
window.</p>
<p>Note that Titanium will allow a non-modal window to open on top of a modal window on
Android.</p>
<h4>iOS Behavior</h4>
<p>By default, if you do not set a <code>backgroundColor</code>, the modal's background color will be the
value set to <code>Titanium.UI.backgroundColor</code>.</p>
<p>The modal window will not show the background window stack even if you make the modal translucent.
For fullscreen modals, when the modal appears, the background window stack is removed. For
non-fullscreen modals on the iPad, the background will be opaque gray if a background color
is not specified.</p>
<p>By default, modal windows appear from the bottom of the screen and slide up. To change the default
transition, set the <code>modalTransitionStyle</code> property to a
<code>Titanium.UI.iPhone.MODAL_TRANSITION_STYLE_*</code> constant in the dictionary passed to the Window
object's <code>open()</code> method.</p>
<p>Modal windows should not support orientation modes that the window they are opened over do not
support. Doing otherwise <em>may</em> cause bad visual/redraw behavior after the modal is dismissed,
due to how iOS manages modal transitions.</p>
<p>Starting with Release 3.1.3, if the <code>orientationModes</code> property of a modal window is undefined,
then the orientations supported by this window would be the orientation modes specified by
the <code>tiapp.xml</code> with the <code>UISupportedInterfaceOrientations</code> key.</p>
<p>iOS does not allow opening non-modal windows on top of a modal window.</p>
<h5>iPad Features</h5>
<p>In addition to full-screen modal windows, iPad supports "Page sheet"
and "Form sheet" style windows:</p>
<ul>
<li><p><strong>Page sheet</strong> style windows have a fixed width, equal to the width of the screen
in portait mode, and a height equal to the <em>current</em> height of the screen. This means
that in portrait mode, the window covers the entire screen. In landscape mode,
the window is centered on the screen horizontally.</p></li>
<li><p><strong>Form sheet</strong> style windows are smaller than the screen size, and centered on the screen.</p></li>
</ul>
<p>The example below is a modal window using the Form sheet style:</p>
<p><img src="images/window/window-modal.png" width="400" /></p>
<p>You can create this type of modal window on iPad with the following code snippet:</p>
<pre><code>var win = Ti.UI.iOS.createNavigationWindow({
window: Ti.UI.createWindow({
title: "Modal Window"
})
});
win.open({
modal: true,
modalTransitionStyle: Ti.UI.iOS.MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL,
modalStyle: Ti.UI.iOS.MODAL_PRESENTATION_FORMSHEET
});
</code></pre>
<h4>Mobile Web Behavior</h4>
<p>On Mobile Web, windows are always modal, blocking input to underlying
windows. Setting <code>modal</code> to <code>true</code> dims any background windows.</p>
<p>If the window's <code>backgroundColor</code> or <code>opacity</code> property is set,
the <code>modal</code> property has no effect.</p>
<p>On Mobile Web, non-modal windows can open on top of modal windows.</p>
<h3>Animations</h3>
<p>Windows can be animated like a {@link Titanium.UI.View View}, such as using an animation
to open or close a window. The example below creates a window
that opens from small to large with a bounce effect. This is done by applying a
transformation at initialization time that scales the original size of the window to 0.
When the window is opened, a new 2D transformation is applied that will scale the window
size from 0 to 110% of it's original size, then, after 1/20th of a second, it is scaled
back to it's original size at 100%. This gives the bounce effect during animation.</p>
<p><code>app/views/index.xml</code>:</p>
<pre><code><Alloy>
<Window backgroundColor="blue" onPostlayout="animateOpen" >
<Label color="orange">Animated Window</Label>
</Window>
</Alloy>
</code></pre>
<p><code>app/controllers/index.js</code>:</p>
<pre><code>$.index.transform = Titanium.UI.create2DMatrix().scale(0);
$.index.open();
var a = Ti.UI.createAnimation({
transform : Ti.UI.create2DMatrix().scale(1.1),
duration : 2000,
});
a.addEventListener('complete', function() {
$.index.animate({
transform: Ti.UI.create2DMatrix(),
duration: 200
});
});
function animateOpen() {
$.index.animate(a);
}
</code></pre>
<p>Note that to animate an Android heavyweight window while you open it, you need
to follow a specific procedure which is explained below in "Heavyweight
Window Transitions in Android".</p>
<h3>iOS Platform Notes</h3>
<h4>iOS Transition Animations</h4>
<p>iOS contains built-in transition animations when switching between non-modal windows. In the Window's
<code>open</code> method, set the <code>transition</code> property to a <code>Titanium.UI.iPhone.AnimationStyle</code> constant to use an animation.
For example, to flip right-to-left between two windows:</p>
<p><code>app/views/index.xml</code>:</p>
<pre><code><Alloy>
<Window backgroundColor="blue" onOpen="animateOpen">
<Label id="label">I am a blue window!</Label>
</Window>
</Alloy>
</code></pre>
<p><code>app/controllers/index.js</code></p>
<pre><code>function animateOpen() {
Alloy.createController('win2').getView().open({
transition: Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT
});
}
$.index.open();
</code></pre>
<p><code>app/views/win2.xml</code>:</p>
<pre><code><Alloy>
<Window backgroundColor="red">
<Label id="label">I am a red window!</Label>
</Window>
</Alloy>
</code></pre>
<p>In the above example, the red window will be animated from the right-to-left over the blue window.</p>
<p>Starting with iOS 7, you can create transition animations when opening and closing windows in
either a {@link Titanium.UI.iOS.NavigationWindow} or {@link Titanium.UI.Tab}.</p>
<p>Use the {@link Titanium.UI.iOS#method-createTransitionAnimation} method to specify an animation objects to hide and
show the window, then set the newly created TransitionAnimation object to the window's
{@link Titanium.UI.Window#property-transitionAnimation} property.</p>
<p>In the example below, the windows are closed by rotating them upside down while simulatenously
making them transparent:</p>
<p><code>app/views/index.xml</code>:</p>
<pre><code><Alloy>
<NavigationWindow platform="ios">
<Window id="redwin" title="Red Window" backgroundColor="red">
<Button id="button" onClick="openBlueWindow">Open Blue Window</Button>
</Window>
</NavigationWindow>
</Alloy>
</code></pre>
<p><code>app/controllers/index.js</code>:</p>
<pre><code>function openBlueWindow(e) {
var bluewin = Alloy.createController('bluewin').getView();
$.index.openWindow(bluewin);
}
$.redwin.transitionAnimation = Ti.UI.iOS.createTransitionAnimation({
duration: 300,
// The show transition makes the window opaque and rotates it correctly
transitionTo: {
opacity: 1,
duration: 300,
transform: Ti.UI.create2DMatrix()
},
// The hide transition makes the window transparent and rotates it upside down
transitionFrom: {
opacity: 0,
duration: 300 / 2,
transform: Ti.UI.create2DMatrix().rotate(180),
}
});
$.index.open();
</code></pre>
<p><code>app/views/bluewin.xml</code>:</p>
<pre><code><Alloy>
<Window title="Blue Window" backgroundColor="blue" opacity="0">
<Button onClick="closeWindow">Close Window</Button>
</Window>
</Alloy>
</code></pre>
<p><code>app/controllers/bluewin.js</code>:</p>
<pre><code>function closeWindow(){
$.bluewin.close();
}
$.bluewin.transitionAnimation = Ti.UI.iOS.createTransitionAnimation({
duration: 300,
// The show transition makes the window opaque and rotates it correctly
transitionTo: {
opacity: 1,
duration: 300,
transform: Ti.UI.create2DMatrix()
},
// The hide transition makes the window transparent and rotates it upside down
transitionFrom: {
opacity: 0,
duration: 300 / 2,
transform: Ti.UI.create2DMatrix().rotate(180),
}
});
$.bluewin.transform = Ti.UI.create2DMatrix().rotate(180);
</code></pre>
<h3>Android Platform Notes</h3>
<h4>Android Heavyweight and Lightweight Windows</h4>
<p>Prior to Release Titanium 3.2.0 in Android, Titanium windows can be heavyweight or lightweight:</p>
<ul>
<li><p>A <em>heavyweight</em> window is associated with a new Android
{@link Titanium.Android.Activity Activity}.</p></li>
<li><p>A <em>lightweight</em> window is a fullscreen view, and runs in the current Android Activity.</p></li>
</ul>
<p>The {@link Titanium.UI#method-createWindow createWindow} call creates a heavyweight window
if any of the following properties are defined (set to either <code>true</code> or <code>false</code>)
on creation:</p>
<ul>
<li><code>fullscreen</code></li>
<li><code>navBarHidden</code></li>
<li><code>modal</code></li>
<li><code>windowSoftInputMode</code></li>
</ul>
<p>Starting with Release 3.2.0 in Android, all the windows are heavyweight. If you still want
the old behavior, you can enable the <code>ti.android.useLegacyWindow</code> property in the <code>tiapp.xml</code>:</p>
<pre><code><property name="ti.android.useLegacyWindow" type="bool">true</property>
</code></pre>
<p>Note that this property only works with Release 3.2.x. It has no effect on other releases.</p>
<p>A heavyweight window is always created when you open a new window from inside a
{@link Titanium.UI.TabGroup TabGroup}.</p>
<h4>Heavyweight Window Transitions in Android</h4>
<p>As explained above, heavyweight windows are their own Android Activity. The only way
to animate the opening or closing of an Activity in Android is to apply an animation <em>resource</em>
to it. Passing a {@link Titanium.UI.Animation} object as a parameter to {@link Titanium.UI.Window#method-open}
or {@link Titanium.UI.Window#method-close} will have no effect if the window being opened/closed is heavyweight
and thus opens/closes its own Activity.</p>
<p>Instead, in the parameter dictionary you pass to {@link Titanium.UI.Window#method-open} or {@link Titanium.UI.Window#method-close},
you should set the <code>activityEnterAnimation</code> and <code>activityExitAnimation</code> keys to
animation resources. <code>activityEnterAnimation</code> should be set to the animation you want to run
on the incoming activity, while <code>activityExitAnimation</code> should be set to the animation you
want to run on the outgoing activity that you are leaving.</p>
<p>Animation resources are available through the <code>R</code> object. Use either {@link Titanium.Android.R} for
built-in resources or {@link Titanium.App.Android.R} for resources that you package in your application.</p>
<p>As an example, you may wish for the window that you are opening to fade in while the window
you are leaving should fade out:</p>
<pre><code>var win2 = Ti.UI.createWindow({
fullscreen: false // Makes it heavyweight before Titanium 3.2.0
});
win2.open({
activityEnterAnimation: Ti.Android.R.anim.fade_in,
activityExitAnimation: Ti.Android.R.anim.fade_out
});
</code></pre>
<p>See the official Android <a href="http://developer.android.com/reference/android/R.anim.html">R.anim</a> documentation
for information about built-in animations.</p>
<p>For information on creating your own animation resource XML files, see
"<a href="http://developer.android.com/guide/topics/resources/animation-resource.html#View">View Animation</a>"
in Android's Resources documentation. After creating an animation resource file, you can place it under
<code>platform/android/res/anim</code> in your Titanium project folder and it will be packaged in your app's APK
and then available via {@link Titanium.App.Android.R}.</p>
<h4>Material design transitions in Android</h4>
<p>You can provide transition between common elements among participating activities. For example in a master-detail pattern,
clicking on a row item animates the common elements of image, title smoothly into details activity as if they are part of
the same scene. This seamless animation is called shared element transition and can be achieved by the following steps. </p>
<p>Say window A is opening window B.
Firstly, specify a unique <code>transitionName</code> to the common UI elements between the two windows.
Next use <code>addSharedElement</code> method on window B passing the window A common UI element and the transition name. This tells the system
which views are shared between windows and performs the transition between them. Note that we specify the UI elements of window A
since the system needs the source element and connects the destination element from the shared transition name once window B is created
and shown. </p>
<p>For example to transition a title label in window A to a title label in window B. </p>
<pre><code>// Create label in window A with a unique transitionName.
var titleInWinA = new Ti.UI.createLabel({
text:'Top 10 pics from Mars!',
left:70, top: 6,
width:200, height: 30,
transitionName: 'title'
});
windowA.add(titleInWinA);
// Creating label in window B, note that the same transitionName is used.
var titleInWinB = new Ti.UI.createLabel({
text:'Top 10 pics from Mars!',
left:50, top: 10,
width:200, height: 30,
transitionName: 'title'
});
// Before opening window B specify the common UI elements.
windowB.addSharedElement(titleInWinA, "title");
windowB.open();
</code></pre>
<p>Further you can use <code>activityEnterTransition</code>, <code>activityExitTransition</code>, <code>activityReenterTransition</code> and <code>activityReturnTransition</code> to customize
the way activities transition into the scene. Currently activity transition will work only when atleast a shared element is used between the participating
activities.</p>
<p>Note that specifying the transitions is not mandatory. If not specified it defaults to Material theme transition. </p>
<p>See the official Android <a href="http://developer.android.com/training/material/animations.html#Transitions">Activity Transitions</a>
documentation for more information and supported transitons.</p>
<h4>Android "root" Windows</h4>
<p>In Android, you may wish to specify that a window which you create (such as the first
window) should be considered the root window and that the application should exit when
the back button is pressed from that window. This is particularly useful if your application
is not using a Tab Group and therefore the splash screen window is appearing whenever you
press the back button from your lowest window on the stack.</p>
<p>To indicate that a particular window should cause an application to exit when the back
button is pressed, pass <code>exitOnClose: true</code> as one of the creation arguments, as shown here:</p>
<pre><code>var win = Titanium.UI.createWindow({
title: 'My Root Window',
exitOnClose: true
});
</code></pre>
<p>Starting with Release 3.2.0, the root window's <code>exitOnClose</code> property is set to <code>true</code> by
default. Prior to Release 3.2.0, the default value of the property was <code>false</code> for all windows.</p>
* <h3>Examples</h3>
<h4>Full Screen Window example</h4>
<p>Create a fullscreen window with a red background.</p>
<pre><code>var window = Titanium.UI.createWindow({
backgroundColor:'red'
});
window.open({fullscreen:true});
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<pre><code><Alloy>
<Window id="win" backgroundColor="red" fullscreen="true" />
</Alloy>
</code></pre>
*/
/**
* @event focus
* <p>Fired when the window gains focus.</p>
* @description <p>The listener for this event must be defined before this window
is opened.</p>
<p>On Android, this event also fires when the activity enters the foreground
(after the activity enters the resume state).</p>
<p>On iOS, this event does not fire after the application returns to the foreground
if it was previously backgrounded.
The application needs to monitor the {@link Titanium.App#event-resumed} event.
See {@link Titanium.App} for more information on the iOS application lifecycle.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event android:back
* <p>Fired when the Back button is released.</p>
* @deprecated 3.0.0 Use <Titanium.UI.Window.androidback> instead.
* @description <p>Setting a listener disables the default key handling for the Back button.
To restore default behavior, remove the listener. It is recommended that you only
have one handler per heavyweight window.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event android:camera
* <p>Fired when the Camera button is released.</p>
* @deprecated 3.0.0 Use <Titanium.UI.Window.androidcamera> instead.
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener. It is recommended that you only have one
handler per heavyweight window.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event android:focus
* <p>Fired when the Camera button is half-pressed then released.</p>
* @deprecated 3.0.0 Use <Titanium.UI.Window.androidfocus> instead.
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener. It is recommended that you only have one
handler per heavyweight window.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event android:search
* <p>Fired when the Search button is released.</p>
* @deprecated 3.0.0 Use <Titanium.UI.Window.androidsearch> instead.
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener. It is recommended that you only have
one handler per heavyweight window.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event android:voldown
* <p>Fired when the volume down button is released.</p>
* @deprecated 3.0.0 Use <Titanium.UI.Window.androidvoldown> instead.
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener. It is recommended that you only have one
handler per heavyweight window.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event android:volup
* <p>Fired when the volume up button is released.</p>
* @deprecated 3.0.0 Use <Titanium.UI.Window.androidvolup> instead.
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener. It is recommended that you only have one
handler per heavyweight window.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
*/
/**
* @event androidback
* <p>Fired when the back button is pressed by the user.</p>
* @description <p>This event is fired when the current window's activity detects
a back button press by the user to navigate back.</p>
<p>By default this event would trigger the current activity to be finished
and removed from the task stack. Subscribing to this event with a listener
will prevent the default behavior. To finish the activity from your listener
just call the <em>close</em> method of the window.</p>
<p>This event replaces the android:back event. Some behavior
changes may exist such as the event no longer firing when the
user dismisses the keyboard with the back button or when the
user closes a full-screen video which is embedded in a web view
with the back button.</p>
<p>As of 5.0.0, you can create an event that can prevent accidental closure of the
app due to hitting the back button to many times.</p>
<pre><code>var win = Ti.UI.createWindow(
{ // some code... }
);
// more code
win.addEventListener("windows:back", function()
{ alert("Back pressed"); }
);
</code></pre>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event androidcamera
* <p>Fired when the Camera button is released.</p>
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener. It is recommended that you only have one
handler per heavyweight window.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event androidfocus
* <p>Fired when the Camera button is half-pressed then released.</p>
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener. It is recommended that you only have one
handler per heavyweight window.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event androidsearch
* <p>Fired when the Search button is released.</p>
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener. It is recommended that you only have
one handler per heavyweight window.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event androidvoldown
* <p>Fired when the volume down button is released.</p>
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener. It is recommended that you only have one
handler per heavyweight window.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event androidvolup
* <p>Fired when the volume up button is released.</p>
* @description <p>Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener. It is recommended that you only have one
handler per heavyweight window.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 3.0.0
*/
/**
* @event blur
* <p>Fired when the window loses focus.</p>
* @description <p>On Android, this event also fires before putting the activity in the background
(before the activity enters the pause state).</p>
<p>On iOS, this event does not fire before putting the application in the background.
The application needs to monitor the {@link Titanium.App#event-pause} event.
See {@link Titanium.App} for more information on the iOS application lifecycle.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event close
* <p>Fired when the window is closed.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @event open
* <p>Fired when the window is opened.</p>
* @description <p>The listener for this event must be defined before this window
is opened.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method addSharedElement
* <p>Adds a common UI element to participate in window transition animation.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>Available from Android 5.0. Use the current window's UI element that is contextually shared with the other window. </p>
* @param {Titanium.UI.View} view
<p>The shared view from the current window.</p>
* @param {String} transitionName
<p>The assigned common transition name of UI elements in both windows.</p>
* @platform android 5.2.0
*/
/**
* @method hideNavBar
* <p>Hides the navigation bar.</p>
* @description <p>If the window is not displayed in a {@link Titanium.UI.iOS.NavigationWindow}, this method has no effect.</p>
* @param {Dictionary} options (optional)
<p>Options dictionary supporting a single <code>animated</code> boolean property to determine whether
the navigation bar will be animated (default) while being hidden.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method hideTabBar
* <p>Hides the tab bar. Must be called before opening the window.</p>
* @description <p>To hide the tab bar when opening a window as a child of a tab, call
<code>hideTabBar</code> or set <code>tabBarHidden</code> to <code>true</code> <strong>before</strong> opening the window.</p>
<p>If the window is not a child of a tab, this method has no effect.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method removeAllSharedElements
* <p>Clears all added shared elements.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>Available from Android 5.0. Use this method to clear all shared elements. This will not remove the views from view hierarchy. </p>
* @platform android 5.2.0
*/
/**
* @method setToolbar
* <p>Sets the array of items to show in the window's toolbar.</p>
* @param {Array<Object>} items
<p>Array of button objects to show in the window's toolbar.</p>
* @param {windowToolbarParam} params (optional)
<p>Parameters to control the toolbar appearance.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method showNavBar
* <p>Makes the navigation bar visible.</p>
* @description <p>If the window is not displayed in a {@link Titanium.UI.iOS.NavigationWindow}, this method has no effect.</p>
* @param {Dictionary} options (optional)
<p>Options dictionary supporting a single <code>animated</code> boolean property to determine whether
the navigation bar will be animated (default) while being shown.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method showToolbar
* <p>Makes the bottom toolbar visible.</p>
* @description <p>If the window is not displayed in a {@link Titanium.UI.iOS.NavigationWindow}, this method has no effect.
Note: This method is only intended to work with toolbars that are created using {@link Titanium.UI.Window#method-setToolbar setToolbar}.
It will not have any effect on toolbars added manually to the window.</p>
* @param {Dictionary} options (optional)
<p>Options dictionary supporting a single <code>animated</code> boolean property to determine whether
the toolbar will be animated (default) while being shown.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method hideToolbar
* <p>Makes the bottom toolbar invisible.</p>
* @description <p>If the window is not displayed in a {@link Titanium.UI.iOS.NavigationWindow}, this method has no effect.
Note: This method is only intended to work with toolbars that are created using {@link Titanium.UI.Window#method-setToolbar setToolbar}.
It will not have any effect on toolbars added manually to the window.</p>
* @param {Dictionary} options (optional)
<p>Options dictionary supporting a single <code>animated</code> boolean property to determine whether
the toolbar will be animated (default) while being hidden.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method close
* <p>Closes the window.</p>
* @description <p>Android only supports the argument type {@link closeWindowParams closeWindowParams}.</p>
* @param {Dictionary<Titanium.UI.Animation>/closeWindowParams} params (optional)
<p>Animation or display properties to use when closing the window.</p>
*/
/**
* @method open
* <p>Opens the window.</p>
* @param {openWindowParams} params (optional)
<p>Animation or display properties to use when opening the window.</p>
*/
/**
* @method getOpacity
* <p>Gets the value of the {@link Titanium.UI.Window#property-opacity} property.</p>
* @returns {Number}
*/
/**
* @method setOpacity
* <p>Sets the value of the {@link Titanium.UI.Window#property-opacity} property.</p>
* @param {Number} opacity
<p>New value for the property.</p>
*/
/**
* @method getBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.Window#property-backgroundColor} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.Window#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
*/
/**
* @method getTop
* <p>Gets the value of the {@link Titanium.UI.Window#property-top} property.</p>
* @returns {Number/String}
*/
/**
* @method setTop
* <p>Sets the value of the {@link Titanium.UI.Window#property-top} property.</p>
* @param {Number/String} top
<p>New value for the property.</p>
*/
/**
* @method getLeft
* <p>Gets the value of the {@link Titanium.UI.Window#property-left} property.</p>
* @returns {Number/String}
*/
/**
* @method setLeft
* <p>Sets the value of the {@link Titanium.UI.Window#property-left} property.</p>
* @param {Number/String} left
<p>New value for the property.</p>
*/
/**
* @method getBottom
* <p>Gets the value of the {@link Titanium.UI.Window#property-bottom} property.</p>
* @returns {Number/String}
*/
/**
* @method setBottom
* <p>Sets the value of the {@link Titanium.UI.Window#property-bottom} property.</p>
* @param {Number/String} bottom
<p>New value for the property.</p>
*/
/**
* @method getRight
* <p>Gets the value of the {@link Titanium.UI.Window#property-right} property.</p>
* @returns {Number/String}
*/
/**
* @method setRight
* <p>Sets the value of the {@link Titanium.UI.Window#property-right} property.</p>
* @param {Number/String} right
<p>New value for the property.</p>
*/
/**
* @method getActivity
* <p>Gets the value of the {@link Titanium.UI.Window#property-activity} property.</p>
* @returns {Titanium.Android.Activity}
* @platform android 0.9
*/
/**
* @method getBackButtonTitle
* <p>Gets the value of the {@link Titanium.UI.Window#property-backButtonTitle} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackButtonTitle
* <p>Sets the value of the {@link Titanium.UI.Window#property-backButtonTitle} property.</p>
* @param {String} backButtonTitle
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackButtonTitleImage
* <p>Gets the value of the {@link Titanium.UI.Window#property-backButtonTitleImage} property.</p>
* @returns {String/Titanium.Blob}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackButtonTitleImage
* <p>Sets the value of the {@link Titanium.UI.Window#property-backButtonTitleImage} property.</p>
* @param {String/Titanium.Blob} backButtonTitleImage
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBarColor
* <p>Gets the value of the {@link Titanium.UI.Window#property-barColor} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setBarColor
* <p>Sets the value of the {@link Titanium.UI.Window#property-barColor} property.</p>
* @param {String} barColor
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getBarImage
* <p>Gets the value of the {@link Titanium.UI.Window#property-barImage} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setBarImage
* <p>Sets the value of the {@link Titanium.UI.Window#property-barImage} property.</p>
* @param {String} barImage
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getExtendEdges
* <p>Gets the value of the {@link Titanium.UI.Window#property-extendEdges} property.</p>
* @returns {Number[]}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setExtendEdges
* <p>Sets the value of the {@link Titanium.UI.Window#property-extendEdges} property.</p>
* @param {Array<Number>} extendEdges
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getFlagSecure
* <p>Gets the value of the {@link Titanium.UI.Window#property-flagSecure} property.</p>
* @returns {Boolean}
* @platform android 3.3.0
*/
/**
* @method setFlagSecure
* <p>Sets the value of the {@link Titanium.UI.Window#property-flagSecure} property.</p>
* @param {Boolean} flagSecure
<p>New value for the property.</p>
* @platform android 3.3.0
*/
/**
* @method getIncludeOpaqueBars
* <p>Gets the value of the {@link Titanium.UI.Window#property-includeOpaqueBars} property.</p>
* @returns {Boolean}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setIncludeOpaqueBars
* <p>Sets the value of the {@link Titanium.UI.Window#property-includeOpaqueBars} property.</p>
* @param {Boolean} includeOpaqueBars
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getAutoAdjustScrollViewInsets
* <p>Gets the value of the {@link Titanium.UI.Window#property-autoAdjustScrollViewInsets} property.</p>
* @returns {Boolean}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setAutoAdjustScrollViewInsets
* <p>Sets the value of the {@link Titanium.UI.Window#property-autoAdjustScrollViewInsets} property.</p>
* @param {Boolean} autoAdjustScrollViewInsets
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getHideShadow
* <p>Gets the value of the {@link Titanium.UI.Window#property-hideShadow} property.</p>
* @returns {Boolean}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setHideShadow
* <p>Sets the value of the {@link Titanium.UI.Window#property-hideShadow} property.</p>
* @param {Boolean} hideShadow
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getHidesBarsOnSwipe
* <p>Gets the value of the {@link Titanium.UI.Window#property-hidesBarsOnSwipe} property.</p>
* @returns {Boolean}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setHidesBarsOnSwipe
* <p>Sets the value of the {@link Titanium.UI.Window#property-hidesBarsOnSwipe} property.</p>
* @param {Boolean} hidesBarsOnSwipe
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getHidesBarsOnTap
* <p>Gets the value of the {@link Titanium.UI.Window#property-hidesBarsOnTap} property.</p>
* @returns {Boolean}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setHidesBarsOnTap
* <p>Sets the value of the {@link Titanium.UI.Window#property-hidesBarsOnTap} property.</p>
* @param {Boolean} hidesBarsOnTap
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getHidesBarsWhenVerticallyCompact
* <p>Gets the value of the {@link Titanium.UI.Window#property-hidesBarsWhenVerticallyCompact} property.</p>
* @returns {Boolean}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setHidesBarsWhenVerticallyCompact
* <p>Sets the value of the {@link Titanium.UI.Window#property-hidesBarsWhenVerticallyCompact} property.</p>
* @param {Boolean} hidesBarsWhenVerticallyCompact
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getHidesBarsWhenKeyboardAppears
* <p>Gets the value of the {@link Titanium.UI.Window#property-hidesBarsWhenKeyboardAppears} property.</p>
* @returns {Boolean}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setHidesBarsWhenKeyboardAppears
* <p>Sets the value of the {@link Titanium.UI.Window#property-hidesBarsWhenKeyboardAppears} property.</p>
* @param {Boolean} hidesBarsWhenKeyboardAppears
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getLeftNavButton
* <p>Gets the value of the {@link Titanium.UI.Window#property-leftNavButton} property.</p>
* @returns {Titanium.UI.View}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setLeftNavButton
* <p>Sets the value of the {@link Titanium.UI.Window#property-leftNavButton} property.</p>
* @param {Titanium.UI.View} leftNavButton
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getLeftNavButtons
* <p>Gets the value of the {@link Titanium.UI.Window#property-leftNavButtons} property.</p>
* @returns {Titanium.UI.View[]}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setLeftNavButtons
* <p>Sets the value of the {@link Titanium.UI.Window#property-leftNavButtons} property.</p>
* @param {Array<Titanium.UI.View>} leftNavButtons
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getModal
* <p>Gets the value of the {@link Titanium.UI.Window#property-modal} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setModal
* <p>Sets the value of the {@link Titanium.UI.Window#property-modal} property.</p>
* @param {Boolean} modal
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getNavBarHidden
* <p>Gets the value of the {@link Titanium.UI.Window#property-navBarHidden} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setNavBarHidden
* <p>Sets the value of the {@link Titanium.UI.Window#property-navBarHidden} property.</p>
* @param {Boolean} navBarHidden
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getNavTintColor
* <p>Gets the value of the {@link Titanium.UI.Window#property-navTintColor} property.</p>
* @returns {String}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setNavTintColor
* <p>Sets the value of the {@link Titanium.UI.Window#property-navTintColor} property.</p>
* @param {String} navTintColor
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getOnBack
* <p>Gets the value of the {@link Titanium.UI.Window#property-onBack} property.</p>
* @returns {Callback<Object>}
* @platform android 0.9
*/
/**
* @method setOnBack
* <p>Sets the value of the {@link Titanium.UI.Window#property-onBack} property.</p>
* @param {Callback<Object>} onBack
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getOrientationModes
* <p>Gets the value of the {@link Titanium.UI.Window#property-orientationModes} property.</p>
* @returns {Number[]}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setOrientationModes
* <p>Sets the value of the {@link Titanium.UI.Window#property-orientationModes} property.</p>
* @param {Array<Number>} orientationModes
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getOrientation
* <p>Gets the value of the {@link Titanium.UI.Window#property-orientation} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @method getRightNavButton
* <p>Gets the value of the {@link Titanium.UI.Window#property-rightNavButton} property.</p>
* @returns {Titanium.UI.View}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setRightNavButton
* <p>Sets the value of the {@link Titanium.UI.Window#property-rightNavButton} property.</p>
* @param {Titanium.UI.View} rightNavButton
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getRightNavButtons
* <p>Gets the value of the {@link Titanium.UI.Window#property-rightNavButtons} property.</p>
* @returns {Titanium.UI.View[]}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setRightNavButtons
* <p>Sets the value of the {@link Titanium.UI.Window#property-rightNavButtons} property.</p>
* @param {Array<Titanium.UI.View>} rightNavButtons
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getShadowImage
* <p>Gets the value of the {@link Titanium.UI.Window#property-shadowImage} property.</p>
* @returns {String}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setShadowImage
* <p>Sets the value of the {@link Titanium.UI.Window#property-shadowImage} property.</p>
* @param {String} shadowImage
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getSplitActionBar
* <p>Gets the value of the {@link Titanium.UI.Window#property-splitActionBar} property.</p>
* @returns {Boolean}
* @platform android 3.6.0
*/
/**
* @method setSplitActionBar
* <p>Sets the value of the {@link Titanium.UI.Window#property-splitActionBar} property.</p>
* @param {Boolean} splitActionBar
<p>New value for the property.</p>
* @platform android 3.6.0
*/
/**
* @method getStatusBarStyle
* <p>Gets the value of the {@link Titanium.UI.Window#property-statusBarStyle} property.</p>
* @returns {Number}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method setStatusBarStyle
* <p>Sets the value of the {@link Titanium.UI.Window#property-statusBarStyle} property.</p>
* @param {Number} statusBarStyle
<p>New value for the property.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method getSwipeToClose
* <p>Gets the value of the {@link Titanium.UI.Window#property-swipeToClose} property.</p>
* @returns {Boolean}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setSwipeToClose
* <p>Sets the value of the {@link Titanium.UI.Window#property-swipeToClose} property.</p>
* @param {Boolean} swipeToClose
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getTabBarHidden
* <p>Gets the value of the {@link Titanium.UI.Window#property-tabBarHidden} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setTabBarHidden
* <p>Sets the value of the {@link Titanium.UI.Window#property-tabBarHidden} property.</p>
* @param {Boolean} tabBarHidden
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getTheme
* <p>Gets the value of the {@link Titanium.UI.Window#property-theme} property.</p>
* @returns {String}
* @platform android 3.4.0
*/
/**
* @method setTheme
* <p>Sets the value of the {@link Titanium.UI.Window#property-theme} property.</p>
* @param {String} theme
<p>New value for the property.</p>
* @platform android 3.4.0
*/
/**
* @method getTitleAttributes
* <p>Gets the value of the {@link Titanium.UI.Window#property-titleAttributes} property.</p>
* @returns {titleAttributesParams}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setTitleAttributes
* <p>Sets the value of the {@link Titanium.UI.Window#property-titleAttributes} property.</p>
* @param {titleAttributesParams} titleAttributes
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getTitleControl
* <p>Gets the value of the {@link Titanium.UI.Window#property-titleControl} property.</p>
* @returns {Titanium.UI.View}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setTitleControl
* <p>Sets the value of the {@link Titanium.UI.Window#property-titleControl} property.</p>
* @param {Titanium.UI.View} titleControl
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getTitleImage
* <p>Gets the value of the {@link Titanium.UI.Window#property-titleImage} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setTitleImage
* <p>Sets the value of the {@link Titanium.UI.Window#property-titleImage} property.</p>
* @param {String} titleImage
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getTitlePrompt
* <p>Gets the value of the {@link Titanium.UI.Window#property-titlePrompt} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setTitlePrompt
* <p>Sets the value of the {@link Titanium.UI.Window#property-titlePrompt} property.</p>
* @param {String} titlePrompt
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getTitlepromptid
* <p>Gets the value of the {@link Titanium.UI.Window#property-titlepromptid} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setTitlepromptid
* <p>Sets the value of the {@link Titanium.UI.Window#property-titlepromptid} property.</p>
* @param {String} titlepromptid
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getToolbar
* <p>Gets the value of the {@link Titanium.UI.Window#property-toolbar} property.</p>
* @returns {Object[]}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setToolbar
* <p>Sets the value of the {@link Titanium.UI.Window#property-toolbar} property.</p>
* @param {Array<Object>} toolbar
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getTransitionAnimation
* <p>Gets the value of the {@link Titanium.UI.Window#property-transitionAnimation} property.</p>
* @returns {Titanium.Proxy}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setTransitionAnimation
* <p>Sets the value of the {@link Titanium.UI.Window#property-transitionAnimation} property.</p>
* @param {Titanium.Proxy} transitionAnimation
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getTranslucent
* <p>Gets the value of the {@link Titanium.UI.Window#property-translucent} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setTranslucent
* <p>Sets the value of the {@link Titanium.UI.Window#property-translucent} property.</p>
* @param {Boolean} translucent
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.UI.Window#property-url} property.</p>
* @removed 6.0.0
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setUrl
* <p>Sets the value of the {@link Titanium.UI.Window#property-url} property.</p>
* @removed 6.0.0
* @param {String} url
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getWindowFlags
* <p>Gets the value of the {@link Titanium.UI.Window#property-windowFlags} property.</p>
* @returns {Number}
* @platform android 3.3.0
*/
/**
* @method setWindowFlags
* <p>Sets the value of the {@link Titanium.UI.Window#property-windowFlags} property.</p>
* @param {Number} windowFlags
<p>New value for the property.</p>
* @platform android 3.3.0
*/
/**
* @method getWindowSoftInputMode
* <p>Gets the value of the {@link Titanium.UI.Window#property-windowSoftInputMode} property.</p>
* @returns {Number}
* @platform android 0.9
*/
/**
* @method setWindowSoftInputMode
* <p>Sets the value of the {@link Titanium.UI.Window#property-windowSoftInputMode} property.</p>
* @param {Number} windowSoftInputMode
<p>New value for the property.</p>
* @platform android 0.9
*/
/**
* @method getWindowPixelFormat
* <p>Gets the value of the {@link Titanium.UI.Window#property-windowPixelFormat} property.</p>
* @returns {Number}
* @platform android 1.8.0
*/
/**
* @method setWindowPixelFormat
* <p>Sets the value of the {@link Titanium.UI.Window#property-windowPixelFormat} property.</p>
* @param {Number} windowPixelFormat
<p>New value for the property.</p>
* @platform android 1.8.0
*/
/**
* @method getActivityExitTransition
* <p>Gets the value of the {@link Titanium.UI.Window#property-activityExitTransition} property.</p>
* @returns {Number}
* @platform android 5.2.0
*/
/**
* @method setActivityExitTransition
* <p>Sets the value of the {@link Titanium.UI.Window#property-activityExitTransition} property.</p>
* @param {Number} activityExitTransition
<p>New value for the property.</p>
* @platform android 5.2.0
*/
/**
* @method getActivityEnterTransition
* <p>Gets the value of the {@link Titanium.UI.Window#property-activityEnterTransition} property.</p>
* @returns {Number}
* @platform android 5.2.0
*/
/**
* @method setActivityEnterTransition
* <p>Sets the value of the {@link Titanium.UI.Window#property-activityEnterTransition} property.</p>
* @param {Number} activityEnterTransition
<p>New value for the property.</p>
* @platform android 5.2.0
*/
/**
* @method getActivityReturnTransition
* <p>Gets the value of the {@link Titanium.UI.Window#property-activityReturnTransition} property.</p>
* @returns {Number}
* @platform android 5.2.0
*/
/**
* @method setActivityReturnTransition
* <p>Sets the value of the {@link Titanium.UI.Window#property-activityReturnTransition} property.</p>
* @param {Number} activityReturnTransition
<p>New value for the property.</p>
* @platform android 5.2.0
*/
/**
* @method getActivityReenterTransition
* <p>Gets the value of the {@link Titanium.UI.Window#property-activityReenterTransition} property.</p>
* @returns {Number}
* @platform android 5.2.0
*/
/**
* @method setActivityReenterTransition
* <p>Sets the value of the {@link Titanium.UI.Window#property-activityReenterTransition} property.</p>
* @param {Number} activityReenterTransition
<p>New value for the property.</p>
* @platform android 5.2.0
*/
/**
* @method getActivitySharedElementExitTransition
* <p>Gets the value of the {@link Titanium.UI.Window#property-activitySharedElementExitTransition} property.</p>
* @returns {Number}
* @platform android 5.2.0
*/
/**
* @method setActivitySharedElementExitTransition
* <p>Sets the value of the {@link Titanium.UI.Window#property-activitySharedElementExitTransition} property.</p>
* @param {Number} activitySharedElementExitTransition
<p>New value for the property.</p>
* @platform android 5.2.0
*/
/**
* @method getActivitySharedElementEnterTransition
* <p>Gets the value of the {@link Titanium.UI.Window#property-activitySharedElementEnterTransition} property.</p>
* @returns {Number}
* @platform android 5.2.0
*/
/**
* @method setActivitySharedElementEnterTransition
* <p>Sets the value of the {@link Titanium.UI.Window#property-activitySharedElementEnterTransition} property.</p>
* @param {Number} activitySharedElementEnterTransition
<p>New value for the property.</p>
* @platform android 5.2.0
*/
/**
* @method getActivitySharedElementReturnTransition
* <p>Gets the value of the {@link Titanium.UI.Window#property-activitySharedElementReturnTransition} property.</p>
* @returns {Number}
* @platform android 5.2.0
*/
/**
* @method setActivitySharedElementReturnTransition
* <p>Sets the value of the {@link Titanium.UI.Window#property-activitySharedElementReturnTransition} property.</p>
* @param {Number} activitySharedElementReturnTransition
<p>New value for the property.</p>
* @platform android 5.2.0
*/
/**
* @method getActivitySharedElementReenterTransition
* <p>Gets the value of the {@link Titanium.UI.Window#property-activitySharedElementReenterTransition} property.</p>
* @returns {Number}
* @platform android 5.2.0
*/
/**
* @method setActivitySharedElementReenterTransition
* <p>Sets the value of the {@link Titanium.UI.Window#property-activitySharedElementReenterTransition} property.</p>
* @param {Number} activitySharedElementReenterTransition
<p>New value for the property.</p>
* @platform android 5.2.0
*/
/**
* @method getExitOnClose
* <p>Gets the value of the {@link Titanium.UI.Window#property-exitOnClose} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setExitOnClose
* <p>Sets the value of the {@link Titanium.UI.Window#property-exitOnClose} property.</p>
* @param {Boolean} exitOnClose
<p>New value for the property.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getFullscreen
* <p>Gets the value of the {@link Titanium.UI.Window#property-fullscreen} property.</p>
* @returns {Boolean}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method setFullscreen
* <p>Sets the value of the {@link Titanium.UI.Window#property-fullscreen} property.</p>
* @param {Boolean} fullscreen
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.Window#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.Window#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getTitleid
* <p>Gets the value of the {@link Titanium.UI.Window#property-titleid} property.</p>
* @returns {String}
*/
/**
* @method setTitleid
* <p>Sets the value of the {@link Titanium.UI.Window#property-titleid} property.</p>
* @param {String} titleid
<p>New value for the property.</p>
*/
/**
* @property [opacity=1.0 (opaque)]
* @type Number
* <p>The opacity from 0.0-1.0.</p>
* @description <p>iOS notes: For modal windows that cover the previous window, the previous window is
removed from the render stack after the modal window finishes opening. If the
modal window is semi-transparent, the underlying window will be visible during the
transition animation, but disappear as soon as the animation is completed. (In general
all modal windows cover the previous window, except for iPad modal windows using the
Page sheet or Form sheet style.)</p>
<p>Android notes: If you set any of <code>windowSoftInputMode</code>, <code>fullscreen</code>, or <code>navBarHidden</code>,
<em>and</em> you wish to use the <code>opacity</code> property at any time during the window's lifetime,
be sure to set an <code>opacity</code> value <strong>before</strong> opening the window. You can later change that
value -- and you can set it to 1 for full opacity if you wish -- but the important thing
is that you set it to a value before opening the window if you will want to set it at
any time during the window's lifetime.</p>
<p>The technical reason for this is that if the opacity property is present (i.e., has
been set to something) and a new Android Activity is created for the window,
then a translucent theme will be used for the Activity. Window transparency (opacity
values below 1) will only work in Android if the Activity's theme is translucent, and
Titanium only uses a translucent theme for an Activity if you set an opacity property
before opening the window. Additionally, do not use <code>opacity</code> and <code>fullscreen: true</code>
together, because translucent themes in Android cannot hide the status bar. Finally,
if you do set the <code>opacity</code> property, be sure to also set a <code>backgroundImage</code> or
<code>backgroundColor</code> property as well, unless you want the window to be completely
transparent.</p>
*/
/**
* @property [backgroundColor=Transparent]
* @type String
* <p>Background color of the window, as a color name or hex triplet.</p>
* @description <p>On Android, to specify a semi-transparent background, set the alpha value using the
{@link Titanium.UI.Window#property-opacity opacity} property before opening the window.</p>
<p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property top
* @type Number/String
* <p>Window's top position, in platform-specific units.</p>
* @description <p>On Android, this property only works with lightweight windows.
See "Android Heavyweight and Lightweight Windows" in the main description
of Titanium.UI.Window for more information.</p>
*/
/**
* @property left
* @type Number/String
* <p>Window's left position, in platform-specific units.</p>
* @description <p>On Android, this property only works with lightweight windows.
See "Android Heavyweight and Lightweight Windows" in the main description
of Titanium.UI.Window for more information.</p>
*/
/**
* @property bottom
* @type Number/String
* <p>Window's bottom position, in platform-specific units.</p>
* @description <p>On Android, this property only works with lightweight windows.
See "Android Heavyweight and Lightweight Windows" in the main description
of Titanium.UI.Window for more information.</p>
*/
/**
* @property right
* @type Number/String
* <p>Window's right position, in platform-specific units.</p>
* @description <p>On Android, this property only works with lightweight windows.
See "Android Heavyweight and Lightweight Windows" in the main description
of Titanium.UI.Window for more information.</p>
*/
/**
* @property activity
* @type Titanium.Android.Activity
* @readonly
* <p>For lightweight windows, this property returns undefined.
For heavyweight windows, this property contains a reference to the
Android Activity object associated with this window.</p>
* @description <p>An Activity object is not created until the window is opened.
Before the window is opened, <code>activity</code> refers to an empty JavaScript object.
You can be set properties on this object, but cannot invoke any Activity methods on it.
Once the window is opened, the actual Activity object is created,
using any properties set on the JavaScript object. At this point, you can call methods
on the activity and access any properties that are set when the activity is created,
for example, {@link Titanium.Android.Activity#property-actionBar actionBar}.</p>
* @platform android 0.9
*/
/**
* @property backButtonTitle
* @type String
* <p>Title for the back button. This is only valid when the window is a child of a tab.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property backButtonTitleImage
* @type String/Titanium.Blob
* <p>The image to show as the back button. This is only valid when the window is a child of a tab.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property barColor
* @type String
* <p>Background color for the nav bar, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property barImage
* @type String
* <p>Background image for the nav bar, specified as a URL to a local image.</p>
* @description <p>The behavior of this API on iOS has changed from version 3.2.0. Previous versions
of the SDK created a custom image view and inserted it as a child of the navigation bar.
The titanium sdk now uses the native call to set the background image of the navigation bar.
You can set it to a 1px transparent png to use a combination of <code>barColor</code> and <code>hideShadow:true</code>.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property extendEdges
* @type Number[]
* <p>An array of supported values specified using the EXTEND_EDGE constants in {@link Titanium.UI}. Valid on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This is only valid for windows hosted by navigation controllers or tab bar controllers. This property is used to
determine the layout of the window within its parent view controller. For example if the window is specified to extend its top edge
and it is hosted in a navigation controller, then the top edge of the window is extended underneath the navigation bar so that part
of the window is obscured. If the navigation bar is opaque (translucent property on window is false), then the top edge of the window
will only extend if {@link Titanium.UI.Window#property-includeOpaqueBars} is set to true. </p>
<p>The default behavior is to assume that no edges are to be extended. Must be specified before <strong>opening</strong> the window.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-EXTEND_EDGE_TOP}
<li> {@link Titanium.UI#property-EXTEND_EDGE_BOTTOM}
<li> {@link Titanium.UI#property-EXTEND_EDGE_LEFT}
<li> {@link Titanium.UI#property-EXTEND_EDGE_RIGHT}
<li> {@link Titanium.UI#property-EXTEND_EDGE_NONE}
<li> {@link Titanium.UI#property-EXTEND_EDGE_ALL}
</ul></p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property [flagSecure=false]
* @type Boolean
* @creationOnly
* <p>Treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.</p>
* @description <p>When the value is true, preventing it from appearing in screenshots or from being viewed on non-secure displays.</p>
* @platform android 3.3.0
*/
/**
* @property includeOpaqueBars
* @type Boolean
* <p>Specifies if the edges should extend beyond opaque bars (navigation bar, tab bar, toolbar). Valid on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>By default edges are only extended to include translucent bars. However if this is set to true, then edges are extended beyond
opaque bars as well.</p>
<p>The default behavior assumes that this is false. Must be specified before <strong>opening</strong> the window.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property autoAdjustScrollViewInsets
* @type Boolean
* <p>Specifies whether or not the view controller should automatically adjust its scroll view insets. Valid on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>When the value is true, it allows the view controller to adjust its scroll view insets in response
to the screen areas consumed by the status bar, navigation bar, toolbar and tab bar.</p>
<p>The default behavior assumes that this is false. Must be specified before <strong>opening</strong> the window.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property [hideShadow=false]
* @type Boolean
* <p>Set this to true to hide the shadow image of the navigation bar.</p>
* @description <p>This property is only honored if a valid value is specified for the {@link Titanium.UI.Window#property-barImage barImage} property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [hidesBarsOnSwipe=false]
* @type Boolean
* <p>Set this to true to hide the navigation bar on swipe.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>When this property is set to true, an upward swipe hides the navigation bar and toolbar.
A downward swipe shows both bars again. If the toolbar does not have any items, it remains
visible even after a swipe.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property [hidesBarsOnTap=false]
* @type Boolean
* <p>Set this to true to hide the navigation bar on tap.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>When the value of this property is true, the navigation controller toggles the hiding and
showing of its navigation bar and toolbar in response to an otherwise unhandled tap
in the content area.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property [hidesBarsWhenVerticallyCompact=false]
* @type Boolean
* <p>Set this to true to hide the navigation bar in a vertically compact environment.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>When the value of this property is true, the navigation controller hides its navigation bar
and toolbar when it transitions to a vertically compact environment.
Upon returning to a vertically regular environment, the navigation controller automatically shows both bars again.
In addition, unhandled taps in the content area cause the navigation controller to show both bars again.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property [hidesBarsWhenKeyboardAppears=false]
* @type Boolean
* <p>Set this to true to hide the navigation bar when the keyboard appears.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>When this property is set to true, the appearance of the keyboard causes the
navigation controller to hide its navigation bar and toolbar.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property leftNavButton
* @type Titanium.UI.View
* <p>View to show in the left nav bar area.</p>
* @description <p>In an Alloy application you can specify this property with a <code><LeftNavButton></code> element inside the
<code><Window></code> element, for example:</p>
<pre><code><Alloy>
<TabGroup>
<Tab>
<Window class="container">
<LeftNavButton platform=ios>
<Button title="Back" onClick="closeWindow" />
</LeftNavButton>
</Window>
</Tab>
</TabGroup>
</Alloy>
</code></pre>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property leftNavButtons
* @type Titanium.UI.View[]
* <p>An Array of views to show in the left nav bar area.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [modal=false]
* @type Boolean
* <p>Indicates to open a modal window or not.</p>
* @description <p>Set to <code>true</code> to create a modal window.</p>
<p>Must be specified at creation time or in the dictionary passed to the
{@link Titanium.UI.Window#method-open Window.open} method.</p>
<p>In the user interface, a modal window is a window that blocks the main application UI until
the modal window is dismissed. A modal window requires the user to interact with it to
resume the normal flow of the application.</p>
<p>See the "Modal Windows" section for platform-specific information.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [navBarHidden=false]
* @type Boolean
* <p>Hides the nav bar (<code>true</code>) or shows the nav bar (<code>false</code>).</p>
* @description <p>Must be specified at creation time or in the <code>options</code> dictionary passed to the
{@link Titanium.UI.Window#method-open Window.open} method.</p>
<h4>Android Platform Notes</h4>
<p>Since Release 3.3.0, due to changes to support the appcompat library, this property has no
effect. By default, the action bar is always displayed. To hide the action bar, see the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Action_Bar">Android Action Bar guide</a>.</p>
<p>Prior to Release 3.2.0, setting this property forces the creation of a heavyweight window. See "Android
Heavyweight and Lightweight Windows" in the main description of this class for more
information. Setting this property to true disables the Action Bar since it is part of the navigation title bar.</p>
<h4>iOS Platform Notes</h4>
<p>Since Release 3.1.3, this is no longer a valid parameter passed to the {@link Titanium.UI.Window#method-open Window.open} method.
Modal windows on iOS no longer have a navigation controller and hence <strong>do not</strong> have a nav bar.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property [navTintColor=]
* @type String
* <p>The tintColor to apply to the navigation bar. This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of NavigationBar on iOS.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property onBack
* @type Callback<Object>
* <p>Callback function that overrides the default behavior when the user presses the <strong>Back</strong>
button.</p>
* @description <p>This was separated from the <Ti.UI.Window.androidback> event. You need to define this
callback if you explicitly want to override the back button behavior.</p>
* @platform android 0.9
*/
/**
* @property [orientationModes=empty array]
* @type Number[]
* <p>Array of supported orientation modes, specified using the orientation
constants defined in {@link Titanium.UI}.</p>
* @description <p><strong>Note:</strong> Using the <code>orientationModes</code> property to force the orientation of non-modal
windows is considered a bad practice and will not be supported, including forcing the
orientation of windows inside a NavigationWindow or TabGroup.</p>
<p>To restrict this window to a certain set of orientations, specify one or more
of the orientation constants {@link Titanium.UI#property-LANDSCAPE_LEFT LANDSCAPE_LEFT},
{@link Titanium.UI#property-LANDSCAPE_RIGHT LANDSCAPE_RIGHT}, {@link Titanium.UI#property-PORTRAIT PORTRAIT},
{@link Titanium.UI#property-UPSIDE_PORTRAIT UPSIDE_PORTRAIT}.</p>
<p><code>orientationModes</code> must be set <strong>before</strong> opening the window.</p>
<p>To determine the current orientation of the <em>window</em>, see
{@link Titanium.UI.Window#property-orientation Window.orientation}.
To determine the current orientation of the <em>device</em>, see
{@link Titanium.Gesture#property-orientation Gesture.orientation}.
To be notified when the device's current orientation changes, add a listener for the
{@link Titanium.Gesture#event-orientationchange} event.</p>
<h4>Android Orientation Modes</h4>
<p>On Android, <code>orientationModes</code> only takes effect when specified on a heavyweight
window.</p>
<p>On Android, orientation behavior is dependent on the Android SDK level
of the device itself. Devices running Android 2.3 and above support "sensor portait
mode" and "sensor landscape mode," in these modes, the device is locked into
either a portrait or landscape orientation, but can switch between the normal and reverse
orientations (for example, between PORTRAIT and UPSIDE_PORTRAIT).</p>
<p>In addition, the definition of portrait or
landscape mode can vary based on the physical design of the device. For example,
on some devices {@link Titanium.UI#property-LANDSCAPE_LEFT} represents the top of the device being at
the 270 degree position but other devices may (based on camera position for example)
treat this position as {@link Titanium.UI#property-LANDSCAPE_RIGHT}. In general, applications for
Android that need to be aware of orientation should try and limit their orientation
logic to handling either portrait or landscape rather than worrying about the reverse
modes. This approach will allow the orientation modes to adopt a more natural feel for
the specific device.</p>
<p>The following list breaks down the orientation behavior on Android based on the contents
of the <code>orientationModes</code> array:</p>
<ol>
<li><p>Empty array. Enables orientation to be fully controlled by the device sensor.</p></li>
<li><p>Array includes one or both portrait modes <strong>and</strong> one or both landscape modes.
Enables full sensor control (identical to an empty array).</p></li>
<li><p>Array contains PORTRAIT <strong>and</strong> UPSIDE_PORTRAIT. On Android 2.3 and above,
enables sensor portrait mode. This means the screen will shift between
both portrait modes according to the sensor inside the device.</p>
<p>On Android versions below 2.3, locks screen orientation in normal portrait mode.</p></li>
<li><p>Array contains LANDSCAPE_LEFT <strong>and</strong> LANDSCAPE_RIGHT. On Android 2.3 and above,
enables sensor landscape mode. This means the screen will shift between both
landscape modes according to the sensor inside the device.</p>
<p>On Android versions below 2.3, locks screen orientation in normal landscape mode.</p></li>
<li><p>Array contains <strong>only</strong> {@link Titanium.UI#property-PORTRAIT PORTRAIT}. Locks screen orientation
to normal portrait mode.</p></li>
<li><p>Array contains <strong>only</strong> {@link Titanium.UI#property-LANDSCAPE_LEFT LANDSCAPE_LEFT}. Locks screen
orientation to normal landscape mode.</p></li>
<li><p>Array contains <strong>only</strong> {@link Titanium.UI#property-UPSIDE_PORTRAIT UPSIDE_PORTRAIT}. On
Android 2.3 and above, locks screen in reverse portrait mode. </p>
<p>On Android versions below 2.3, results are undefined.</p></li>
<li><p>Array contains <strong>only</strong> {@link Titanium.UI#property-LANDSCAPE_RIGHT LANDSCAPE_RIGHT}. On
Android 2.3 and above, locks screen in reverse landscape mode. </p>
<p>On Android versions below 2.3, results are undefined.</p></li>
</ol>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-LANDSCAPE_LEFT}
<li> {@link Titanium.UI#property-LANDSCAPE_RIGHT}
<li> {@link Titanium.UI#property-PORTRAIT}
<li> {@link Titanium.UI#property-UPSIDE_PORTRAIT}
</ul></p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property orientation
* @type Number
* @readonly
* <p>Current orientation of the window.</p>
* @description <p>To determine the current orientation of the <em>device</em>, see
{@link Titanium.Gesture#property-orientation Gesture.orientation}, instead.</p>
<p>See
the discussion of the {@link Titanium.UI.Window#property-orientationModes orientationModes}
property for more information on how the screen orientation is determined.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-LANDSCAPE_LEFT}
<li> {@link Titanium.UI#property-LANDSCAPE_RIGHT}
<li> {@link Titanium.UI#property-PORTRAIT}
<li> {@link Titanium.UI#property-UPSIDE_PORTRAIT}
</ul></p>
* @platform android 0.9
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @property rightNavButton
* @type Titanium.UI.View
* <p>View to show in the right nav bar area.</p>
* @description <p>In an Alloy application you can specify this property with a <code><RightNavButton></code> element in the
<code><Window></code> element, for example:</p>
<pre><code><Alloy>
<TabGroup>
<Tab>
<Window class="container">
<RightNavButton platform=ios>
<Button title="Back" onClick="closeWindow" />
</RightNavButton>
</Window>
</Tab>
</TabGroup>
</Alloy>
</code></pre>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property rightNavButtons
* @type Titanium.UI.View[]
* <p>An Array of views to show in the right nav bar area.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property shadowImage
* @type String
* <p>Shadow image for the navigation bar, specified as a URL to a local image..</p>
* @description <p>This property is only honored if a valid value is specified for the {@link Titanium.UI.Window#property-barImage barImage} property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property splitActionBar
* @type Boolean
* @creationOnly
* <p>Boolean value to enable split action bar.</p>
* @description <p><code>splitActionBar</code> must be set <strong>before</strong> opening the window.
This property indicates if the window should use a <a href="http://developer.android.com/guide/topics/ui/actionbar.html#SplitBar">split action bar</a></p>
* @platform android 3.6.0
*/
/**
* @property statusBarStyle
* @type Number
* <p>The status bar style associated with this window.</p>
* @description <p>Sets the status bar style when this window has focus. This is now the recommended way to control the
status bar style on the application.</p>
<p>If this value is undefined, the value is set to UIStatusBarStyle defined in tiapp.xml.
If that is not defined it defaults to {@link Titanium.UI.iPhone.StatusBar#property-DEFAULT}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iPhone.StatusBar#property-DEFAULT}
<li> {@link Titanium.UI.iPhone.StatusBar#property-GRAY}
<li> {@link Titanium.UI.iPhone.StatusBar#property-GREY}
<li> {@link Titanium.UI.iPhone.StatusBar#property-LIGHT_CONTENT}
<li> {@link Titanium.UI.iPhone.StatusBar#property-OPAQUE_BLACK}
<li> {@link Titanium.UI.iPhone.StatusBar#property-TRANSLUCENT_BLACK}
</ul></p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property [swipeToClose=true]
* @type Boolean
* <p>Boolean value indicating if the user should be able to close a window using a swipe gesture.</p>
* @description <p>If <code>false</code> the user will not be able to swipe from the left edge of the window to close it.
Note: This property is only used for a window being embedded in a {@link Titanium.UI.Tab Ti.UI.Tab} or
{@link Titanium.UI.iOS.NavigationWindow Ti.UI.iOS.NavigationWindow}. It is enabled by default.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property tabBarHidden
* @type Boolean
* <p>Boolean value indicating if the tab bar should be hidden. </p>
* @description <p><code>tabBarHidden</code> must be set <strong>before</strong> opening the window.</p>
<p>This property is only valid when the window is the child of a tab.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property theme
* @type String
* @creationOnly
* <p>Name of the theme to apply to the window.</p>
* @description <p>Set the theme of the window. It can be either a <a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Themes-section-34636181_AndroidThemes-Built-inThemes">built-in theme</a>
or a <a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Themes-section-34636181_AndroidThemes-CustomThemes">custom theme</a>.</p>
* @platform android 3.4.0
*/
/**
* @property titleAttributes
* @type titleAttributesParams
* <p>Title text attributes of the window.</p>
* @description <p>Use this property to specify the color, font and shadow attributes of the title.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property titleControl
* @type Titanium.UI.View
* <p>View to show in the title area of the nav bar.</p>
* @description <p>In an Alloy application you can specify this property using a <code><TitleControl></code> element inside
<code><Window></code>, for example:</p>
<pre><code><Alloy>
<Window>
<RightNavButton>
<Button title="Back" />
</RightNavButton>
<LeftNavButton>
<Button title="Back" />
</LeftNavButton>
<TitleControl>
<View backgroundColor="blue" height="100%" width="100%"></View>
</TitleControl>
</Window>
</Alloy>
</code></pre>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property titleImage
* @type String
* <p>Image to show in the title area of the nav bar, specified as a local file path or URL.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property titlePrompt
* @type String
* <p>Title prompt for the window.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property titlepromptid
* @type String
* <p>Key identifying a string from the locale file to use for the window title prompt.</p>
* @description <p>Only one of <code>titlePrompt</code> or <code>titlepromptid</code> should be specified.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property toolbar
* @type Object[]
* <p>Array of button objects to show in the window's toolbar.</p>
* @description <p>The toolbar is only shown when the window is inside a {@link Titanium.UI.iOS.NavigationWindow}.
To display a toolbar when a window is not inside a NavigationWindow, add an instance of a
{@link Titanium.UI.iOS.Toolbar} to the window.</p>
<p>To customize the toolbar, use the {@link Titanium.UI.Window#method-setToolbar setToolbar()} method.</p>
<p>Since Alloy 1.6.0, you can specify this property using the <code><WindowToolbar></code> element as a
child of a <code><Window></code> element, for example:</p>
<pre><code><Alloy>
<NavigationWindow>
<Window>
<WindowToolbar>
<Button id="send" title="Send" style="Ti.UI.iPhone.SystemButtonStyle.DONE" />
<FlexSpace/>
<Button id="camera" systemButton="Ti.UI.iPhone.SystemButton.CAMERA" />
<FlexSpace/>
<Button id="cancel" systemButton="Ti.UI.iPhone.SystemButton.CANCEL" />
</WindowToolbar>
</Window>
</NavigationWindow>
</Alloy>
</code></pre>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property transitionAnimation
* @type Titanium.Proxy
* <p>Use a transition animation when opening or closing windows in a
{@link Titanium.UI.iOS.NavigationWindow} or {@link Titanium.UI.Tab}.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Create the transition animation using the {@link Titanium.UI.iOS#method-createTransitionAnimation}
method.</p>
<p>Supported on iOS 7 and later.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [translucent=true on iOS7 and above, false otherwise.]
* @type Boolean
* <p>Boolean value indicating if the nav bar is translucent.</p>
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property url
* @type String
* @creationOnly
* <p>Loads a JavaScript file from a local URL.</p>
* @removed 6.0.0
* @description <p><strong>Note:</strong> The recommended way of creating windows with their own context is to either use the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Framework">Alloy Framework</a> or a
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/CommonJS_Modules_in_Titanium">CommonJS module</a>
than using this property. One benefit of using a CommonJS module is that it consumes less
resources.</p>
<p>Use this property to have Windows load a JavaScript file in its own subcontext and thread,
separate from the <code>app.js</code> global context.
Reference a file relative to your project's <code>Resources</code> folder for classic Titanium
projects or <code>app/lib</code> folder for Alloy projects.</p>
<p>Note that Titanium will refuse to load JavaScript files from a remote URL. Loading
remote JavaScript from a URL and providing it with the full capabilities of the Titanium
API would be very dangerous.</p>
<p>When loading JavaScript files using this property, the special property
{@link Titanium.UI#property-currentWindow} is available inside a multi-context
application that points to the JavaScript instance by reference in the global context.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property windowFlags
* @type Number
* @creationOnly
* <p>Additional flags to set on the Activity Window.</p>
* @description <p>Set the flags of the window, as per the WindowManager.LayoutParams flags.
See <a href="http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html">WindowManager.LayoutParams</a> for a
list of supported flags. Setting {@link Titanium.UI.Window#property-fullscreen} to true automatically sets the <a href="http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_FULLSCREEN">WindowManager.LayoutParams.FLAG_FULLSCREEN</a>
flag. Setting {@link Titanium.UI.Window#property-flagSecure} to true automatically sets the <a href="http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE">WindowManager.LayoutParams.FLAG_SECURE</a> flag.</p>
* @platform android 3.3.0
*/
/**
* @property windowSoftInputMode
* @type Number
* @creationOnly
* <p>Determines whether a heavyweight window's soft input area (ie software keyboard) is visible
as it receives focus and how the window behaves in order to accomodate it while keeping its
contents in view.</p>
* @description <p>In order for this property to take effect on an emulator, its Android Virtual Device (AVD)
must be configured with the <code>Keyboard Support</code> setting set to <code>No</code>. Note that it is always
recommended to test an application on a physical device to understand its true behavior.</p>
<p>Setting this property forces the creation of a heavyweight window before Titanium 3.2.0. See "Android Heavyweight
and Lightweight Windows" in the main description of this class for more information.</p>
<p>This property is capable of representing two settings from the soft input <em>visibility</em>
constatns and soft input <em>adjustment</em> constants
using the <a href="http://en.wikipedia.org/wiki/Bitwise_operation#OR">bitwise OR</a> operation.</p>
<p>Note that in JavaScript, bitwise OR is achieved using the single pipe operand. See the
example for a demonstration.</p>
<p>For more information, see the official Android Developers website API Reference for
<a href="http://developer.android.com/reference/android/view/Window.html#setSoftInputMode%28int%29">Window.setSoftInputMode</a>.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-SOFT_INPUT_STATE_ALWAYS_HIDDEN}
<li> {@link Titanium.UI.Android#property-SOFT_INPUT_STATE_ALWAYS_VISIBLE}
<li> {@link Titanium.UI.Android#property-SOFT_INPUT_STATE_HIDDEN}
<li> {@link Titanium.UI.Android#property-SOFT_INPUT_STATE_UNSPECIFIED}
<li> {@link Titanium.UI.Android#property-SOFT_INPUT_STATE_VISIBLE}
<li> {@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_PAN}
<li> {@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_RESIZE}
<li> {@link Titanium.UI.Android#property-SOFT_INPUT_ADJUST_UNSPECIFIED}
</ul></p>
* <h3>Examples</h3>
<h4>Soft Input Visibility and Adjustment</h4>
<p>Create a white window and respond to a click of it to open a red window containing a
text area. Show the software keyboard automatically as the red window opens.</p>
<pre><code>var win1 = Ti.UI.createWindow({
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false,
title: 'Click window to test'
});
// use bitwise OR to combine two settings for the windowSoftInputMode property
var softInput = Ti.UI.Android.SOFT_INPUT_STATE_ALWAYS_VISIBLE | Ti.UI.Android.SOFT_INPUT_ADJUST_PAN;
win1.addEventListener('click', function(){
var win2 = Ti.UI.createWindow({
backgroundColor: 'red',
fullscreen: false,
windowSoftInputMode: softInput
});
var textArea = Ti.UI.createTextArea({
value : 'I am a textarea',
height : 200,
width : 300,
top : 200
});
win2.add(textArea);
win2.open();
});
win1.open();
</code></pre>
* @platform android 0.9
*/
/**
* @property windowPixelFormat
* @type Number
* <p>Set the pixel format for the Activity's Window.</p>
* @description <p>For more information on pixel formats, see
<a href="http://developer.android.com/reference/android/view/Window.html#setFormat%28int%29">Android SDK Window.setFormat</a></p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_A_8}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_LA_88}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_L_8}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_OPAQUE}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_RGBA_4444}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_RGBA_5551}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_RGBA_8888}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_RGBX_8888}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_RGB_332}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_RGB_565}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_RGB_888}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_TRANSLUCENT}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_TRANSPARENT}
<li> {@link Titanium.UI.Android#property-PIXEL_FORMAT_UNKNOWN}
</ul></p>
* @platform android 1.8.0
*/
/**
* @property [activityExitTransition=If not specified uses platform theme transition.]
* @type Number
* @creationOnly
* <p>The type of transition used when activity is exiting.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>Activity A's exit transition determines how views in A are animated when A starts B.
Applicable for Android 5.0 and above. This value will be ignored if <code>animated</code> is set to false or
there is no shared element between the participating activities.
See "Material design activity transitions in Android" in the main description of Titanium.UI.Window
for more information. </p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-TRANSITION_EXPLODE}
<li> {@link Titanium.UI.Android#property-TRANSITION_FADE_IN}
<li> {@link Titanium.UI.Android#property-TRANSITION_FADE_OUT}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_TOP}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_RIGHT}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_BOTTOM}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_LEFT}
<li> {@link Titanium.UI.Android#property-TRANSITION_NONE}
</ul></p>
* @platform android 5.2.0
*/
/**
* @property [activityEnterTransition=If not specified uses platform theme transition.]
* @type Number
* @creationOnly
* <p>The type of transition used when activity is entering.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>Activity B's enter transition determines how views in B are animated when A starts B.
Applicable for Android 5.0 and above. This value will be ignored if <code>animated</code> is set to false or
there is no shared element between the participating activities.
See "Material design activity transitions in Android" in the main description of Titanium.UI.Window
for more information.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-TRANSITION_EXPLODE}
<li> {@link Titanium.UI.Android#property-TRANSITION_FADE_IN}
<li> {@link Titanium.UI.Android#property-TRANSITION_FADE_OUT}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_TOP}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_RIGHT}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_BOTTOM}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_LEFT}
<li> {@link Titanium.UI.Android#property-TRANSITION_NONE}
</ul></p>
* @platform android 5.2.0
*/
/**
* @property [activityReturnTransition=If not specified uses `activityEnterTransition`.]
* @type Number
* @creationOnly
* <p>The type of transition used when returning from a previously started activity.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>Activity B's return transition determines how views in B are animated when B returns to A.
Applicable for Android 5.0 and above. This value will be ignored if <code>animated</code> is set to false or
there is no shared element between the participating activities.
See "Material design activity transitions in Android" in the main description of Titanium.UI.Window
for more information.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-TRANSITION_EXPLODE}
<li> {@link Titanium.UI.Android#property-TRANSITION_FADE_IN}
<li> {@link Titanium.UI.Android#property-TRANSITION_FADE_OUT}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_TOP}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_RIGHT}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_BOTTOM}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_LEFT}
<li> {@link Titanium.UI.Android#property-TRANSITION_NONE}
</ul></p>
* @platform android 5.2.0
*/
/**
* @property [activityReenterTransition=If not specified uses `activityExitTransition`.]
* @type Number
* @creationOnly
* <p>The type of transition used when reentering to a previously started activity.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>Activity A's reenter transition determines how views in A are animated when B returns to A.
Applicable for Android 5.0 and above. This value will be ignored if <code>animated</code> is set to false or
there is no shared element between the participating activities.
See "Material design activity transitions in Android" in the main description of Titanium.UI.Window
for more information.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-TRANSITION_EXPLODE}
<li> {@link Titanium.UI.Android#property-TRANSITION_FADE_IN}
<li> {@link Titanium.UI.Android#property-TRANSITION_FADE_OUT}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_TOP}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_RIGHT}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_BOTTOM}
<li> {@link Titanium.UI.Android#property-TRANSITION_SLIDE_LEFT}
<li> {@link Titanium.UI.Android#property-TRANSITION_NONE}
</ul></p>
* @platform android 5.2.0
*/
/**
* @property [activitySharedElementExitTransition=Defaults to android platform's [move](https://github.com/android/platform_frameworks_base/blob/lollipop-release/core/res/res/transition/move.xml) transition.
]
* @type Number
* @creationOnly
* <p>The type of exit transition used when animating shared elements between two activities.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>Activity A's shared element exit transition animates shared elements before they transition from A to B
Applicable for Android 5.0 and above. This value will be ignored if <code>animated</code> is set to false.
See "Material design activity transitions in Android" in the main description of Titanium.UI.Window
for more information.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_BOUNDS}
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_CLIP_BOUNDS}
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_TRANSFORM}
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_IMAGE_TRANSFORM}
<li> {@link Titanium.UI.Android#property-TRANSITION_NONE}
</ul></p>
* @platform android 5.2.0
*/
/**
* @property [activitySharedElementEnterTransition=Defaults to android platform's [move](https://github.com/android/platform_frameworks_base/blob/lollipop-release/core/res/res/transition/move.xml) transition.
]
* @type Number
* @creationOnly
* <p>The type of enter transition used when animating shared elements between two activities.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>Activity B's shared element enter transition determines how shared elements animate from A to B.
Applicable for Android 5.0 and above. This value will be ignored if <code>animated</code> is set to false.
See "Material design activity transitions in Android" in the main description of Titanium.UI.Window
for more information.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_BOUNDS}
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_CLIP_BOUNDS}
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_TRANSFORM}
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_IMAGE_TRANSFORM}
<li> {@link Titanium.UI.Android#property-TRANSITION_NONE}
</ul></p>
* @platform android 5.2.0
*/
/**
* @property [activitySharedElementReturnTransition=Defaults to android platform's [move](https://github.com/android/platform_frameworks_base/blob/lollipop-release/core/res/res/transition/move.xml) transition.
]
* @type Number
* @creationOnly
* <p>The type of return transition used when animating shared elements between two activities.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>Activity B's shared element return transition determines how shared elements animate from B to A.
Applicable for Android 5.0 and above. This value will be ignored if <code>animated</code> is set to false.
See "Material design activity transitions in Android" in the main description of Titanium.UI.Window
for more information.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_BOUNDS}
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_CLIP_BOUNDS}
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_TRANSFORM}
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_IMAGE_TRANSFORM}
<li> {@link Titanium.UI.Android#property-TRANSITION_NONE}
</ul></p>
* @platform android 5.2.0
*/
/**
* @property [activitySharedElementReenterTransition=Defaults to android platform's [move](https://github.com/android/platform_frameworks_base/blob/lollipop-release/core/res/res/transition/move.xml) transition.
]
* @type Number
* @creationOnly
* <p>The type of reenter transition used when animating shared elements between two activities.</p>
* <p> <b>Requires:</b>
Android 5 and later
</p>
* @description <p>Activity A's shared element reenter transition animates shared elements after they have transitioned from B to A.
Applicable for Android 5.0 and above. This value will be ignored if <code>animated</code> is set to false.
See "Material design activity transitions in Android" in the main description of Titanium.UI.Window
for more information.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_BOUNDS}
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_CLIP_BOUNDS}
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_TRANSFORM}
<li> {@link Titanium.UI.Android#property-TRANSITION_CHANGE_IMAGE_TRANSFORM}
<li> {@link Titanium.UI.Android#property-TRANSITION_NONE}
</ul></p>
* @platform android 5.2.0
*/
/**
* @property [exitOnClose=true if this is the first window launched else false; prior to Release 3.3.0, the
default was always false.
]
* @type Boolean
* <p>Boolean value indicating if the application should exit when the Android
Back button is pressed while the window is being shown or when the window
is closed programmatically.</p>
* @description <p>Starting in 3.4.2 you can set this property at any time. In earlier releases you can only set this as a createWindow({...}) option.</p>
* @platform android 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property [fullscreen=false]
* @type Boolean
* <p>Boolean value indicating if the window is fullscreen.</p>
* @description <p>A fullscreen window occupies all of the screen space, hiding the status bar. Must be specified
at creation time or in the <code>options</code> dictionary passed to the {@link Titanium.UI.Window#method-open Window.open} method.</p>
<p>On iOS the behavior of this property has changed. Starting from 3.1.3, if this property is undefined
then the property is set to the value for UIStatusBarHidden defined in tiapp.xml.
If that is not defined it is treated as <strong>explicit false</strong>. On earlier versions, opening a window with this property
undefined would not effect the status bar appearance.</p>
<p>On Android, setting this property forces the creation of a heavyweight window before Titanium 3.2.0.
See "Android Heavyweight and Lightweight Windows" in the main description of this class for more
information.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform windowsphone 4.1.0
*/
/**
* @property title
* @type String
* <p>Title of the window.</p>
*/
/**
* @property titleid
* @type String
* <p>Key identifying a string from the locale file to use for the window title.</p>
* @description <p>Only one of <code>title</code> or <code>titleid</code> should be specified.</p>
*/
/**
* @class openWindowParams
* @platform android 2.0.0
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Window.yml
* <p>Dictionary of options for the {@link Titanium.UI.Window#method-open} method.</p>
*/
/**
* @property [animated=true]
* @type Boolean
* <p>Determines whether to use an animated effect when the window is shown.</p>
* @description <p>On Android, this property supports animated transitions on heavyweight windows
except for modal windows (<code>modal:true</code>). See "Android Heavyweight and Lightweight
Windows" in the main description of Titanium.UI.Window for more information. The
transitions are on by default, but you can disable this behavior by setting this value
to <code>false</code>.</p>
<p>On iOS, only use this property to disable animated transitions on modal windows.
This property has unintended side effects on non-modal windows if it is defined. </p>
*/
/**
* @property [bottom=0]
* @type Number/String
* <p>Window's bottom position, in platform-specific units.</p>
* @description <p>On Android, this property only works with lightweight windows.
See "Android Heavyweight and Lightweight Windows" in the main description
of Titanium.UI.Window for more information.</p>
*/
/**
* @property [fullscreen=false]
* @type Boolean
* <p>Determines if the window is fullscreen.</p>
*/
/**
* @property height
* @type Number/String
* <p>Window's height, in platform-specific units.</p>
* @description <p>On Android, before Titanium 3.2.0, this property only works with lightweight windows.
See "Android Heavyweight and Lightweight Windows" in the main description
of Titanium.UI.Window for more information.
On Windows Phone 8.1 and Windows 10 Mobile, this property does not take any effect.
On Windows 10 Store App, resizing Window takes no effect in following cases
according to <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.viewmanagement.applicationview.tryresizeview">Windows Runtime API document</a>.
* The requested size is larger than the available work area.
* The requested size is less than the view's minimum size.
* The smallest allowed minimum size is 192 x 48 effective pixels.
* The largest allowed minimum size is 500 x 500 effective pixels.</p>
*/
/**
* @property [left=0]
* @type Number/String
* <p>Window's left position, in platform-specific units.</p>
* @description <p>On Android, this property only works with lightweight windows.
See "Android Heavyweight and Lightweight Windows" in the main description
of Titanium.UI.Window for more information.</p>
*/
/**
* @property [modal=false]
* @type Boolean
* <p>Determines whether to open the window modal in front of other windows.</p>
*/
/**
* @property [modalStyle={@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FULLSCREEN}]
* @type Number
* <p>Presentation style of this modal window.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_CURRENT_CONTEXT}
<li> {@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FORMSHEET}
<li> {@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FULLSCREEN}
<li> {@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_PAGESHEET}
</ul></p>
* @platform iphone 2.0.0
* @platform ipad 2.0.0
*/
/**
* @property [modalTransitionStyle={@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_COVER_VERTICAL}]
* @type Number
* <p>Transition style of this modal window.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_COVER_VERTICAL}
<li> {@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_CROSS_DISSOLVE}
<li> {@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL}
<li> {@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_PARTIAL_CURL}
</ul></p>
* @platform iphone 2.0.0
* @platform ipad 2.0.0
*/
/**
* @property [navBarHidden=false]
* @type Boolean
* <p>For modal windows, hides the nav bar (<code>true</code>) or shows the nav bar (<code>false</code>).</p>
* @description <p>On iOS, beginning with <strong>Release 3.1.3</strong>, this is no longer a valid parameter passed to the {@link Titanium.UI.Window#method-open Window.open} method.</p>
*/
/**
* @property [right=0]
* @type Number/String
* <p>Window's right position, in platform-specific units.</p>
* @description <p>On Android, this property only works with lightweight windows.
See "Android Heavyweight and Lightweight Windows" in the main description
of Titanium.UI.Window for more information.</p>
*/
/**
* @property [top=0]
* @type Number/String
* <p>Window's top position, in platform-specific units.</p>
* @description <p>On Android, this property only works with lightweight windows.
See "Android Heavyweight and Lightweight Windows" in the main description
of Titanium.UI.Window for more information.</p>
*/
/**
* @property [transition={@link Titanium.UI.iPhone.AnimationStyle#property-NONE}]
* @type Number
* <p>Transition style of this non-modal window.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iPhone.AnimationStyle#property-CURL_DOWN}
<li> {@link Titanium.UI.iPhone.AnimationStyle#property-CURL_UP}
<li> {@link Titanium.UI.iPhone.AnimationStyle#property-FLIP_FROM_LEFT}
<li> {@link Titanium.UI.iPhone.AnimationStyle#property-FLIP_FROM_RIGHT}
<li> {@link Titanium.UI.iPhone.AnimationStyle#property-NONE}
</ul></p>
* @platform iphone 2.0.0
* @platform ipad 2.0.0
*/
/**
* @property width
* @type Number/String
* <p>Window's width, in platform-specific units.</p>
* @description <p>On Android, before Titanium 3.2.0, this property only works with lightweight windows.
See "Android Heavyweight and Lightweight Windows" in the main description
of Titanium.UI.Window for more information.
On Windows Phone 8.1 and Windows 10 Mobile, this property does not take any effect.
On Windows 10 Store App, resizing Window takes no effect in following cases
according to <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.viewmanagement.applicationview.tryresizeview">Windows Runtime API document</a>.
* The requested size is larger than the available work area.
* The requested size is less than the view's minimum size.
* The smallest allowed minimum size is 192 x 48 effective pixels.
* The largest allowed minimum size is 500 x 500 effective pixels.
* This method is called while in while the app is running in Tablet Mode.</p>
*/
/**
* @property activityEnterAnimation
* @type Number
* <p>Animation resource to run on the activity (heavyweight window) being opened.</p>
* @description <p>This value will be ignored if <code>animated</code> is set to false.
See "Heavyweight Window Transitions in Android" in the main description of Titanium.UI.Window
for more information.</p>
* <h3>Examples</h3>
<h4>Sliding in a new Window</h4>
<pre><code>var win2 = Ti.UI.createWindow({fullscreen:false});
win2.open({
activityEnterAnimation: Ti.Android.R.anim.slide_in_left,
activityExitAnimation: Ti.Android.R.anim.slide_out_right
});</code></pre>
* @platform android 3.1.0
*/
/**
* @property activityExitAnimation
* @type Number
* <p>Animation resource to run on the activity that is being put in background as a heavyweight window is being opened above it.</p>
* @description <p>This value will be ignored if <code>animated</code> is set to false.
See "Heavyweight Window Transitions in Android" in the main description of Titanium.UI.Window
for more information.</p>
* @platform android 3.1.0
*/
/**
* @class windowToolbarParam
* @platform iphone 3.1.3
* @platform ipad 3.1.3
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Window.yml
* <p>Dictionary of options for the {@link Titanium.UI.Window#method-setToolbar} method.</p>
*/
/**
* @property [translucent=true on iOS 7 and above, false otherwise.]
* @type Boolean
* <p>Defines if the toolbar is translucent.</p>
*/
/**
* @property [animated=true if the window has toolbar items, false otherwise.]
* @type Boolean
* <p>Defines if the toolbar appearance is animated.</p>
*/
/**
* @property barColor
* @type String
* <p>Background color for the toolbar, as a color name or hex triplet.</p>
*/
/**
* @property tintColor
* @type String
* <p>The tintColor to apply to the tool bar. Applicable on iOS 7 and above.</p>
*/
/**
* @class closeWindowParams
* @platform android 3.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Window.yml
* <p>Dictionary of options for the {@link Titanium.UI.Window#method-close} method.</p>
*/
/**
* @property [animated=true]
* @type Boolean
* <p>Determines whether to use an animated effect when the window is closed.</p>
* @description <p>This property supports animated transitions on heavyweight windows
except for modal windows (<code>modal:true</code>). See "Android Heavyweight and Lightweight
Windows" in the main description of Titanium.UI.Window for more information. The
transitions are on by default, but you can disable this behavior by setting this value
to <code>false</code>.</p>
*/
/**
* @property activityEnterAnimation
* @type Number
* <p>Animation resource to use for the incoming activity.</p>
* @description <p>This value will be ignored if <code>animated</code> is set to false.
See "Heavyweight Window Transitions in Android" in the main description of Titanium.UI.Window
for more information.</p>
*/
/**
* @property activityExitAnimation
* @type Number
* <p>Animation resource to use for the outgoing activity (heavyweight window).</p>
* @description <p>This value will be ignored if <code>animated</code> is set to false.
See "Heavyweight Window Transitions in Android" in the main description of Titanium.UI.Window
for more information.</p>
* <h3>Examples</h3>
<h4>Fading out a Window</h4>
<pre><code>win2.close({
activityEnterAnimation: Ti.Android.R.anim.fade_in,
activityExitAnimation: Ti.Android.R.anim.fade_out
});</code></pre>
*/
/**
* @class titleAttributesParams
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Window.yml
* <p>Dictionary of options for the {@link Titanium.UI.Window#property-titleAttributes} property.</p>
* <h3>Examples</h3>
<h4>Simple Example</h4>
<pre><code>var win = Titanium.UI.createWindow({
title: 'Title',
barColor: 'yellow',
titleAttributes: {
color:'blue',
font: {fontFamily:'Snell Roundhand', fontSize:36},
shadow:{color:'gray', offset:{width:1,height:1}}
}
});
var nav = Titanium.UI.iOS.createNavigationWindow({window: win});
nav.open();</code></pre>
*/
/**
* @property color
* @type String
* <p>Color of the window title, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property font
* @type Font
* <p>Font to use for the window title.</p>
*/
/**
* @property shadow
* @type shadowDict
* <p>Shadow color and offset for the window title.</p>
*/
/**
* @class shadowDict
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Window.yml
* <p>Dictionary describing the shadow effect for text.</p>
*/
/**
* @property blurRadius
* @type Number
* <p>Specifies the blur radius of the shadow.</p>
* @description <p>Supported on iOS 7 and later.</p>
<p><code>0</code> means no blur.</p>
*/
/**
* @property color
* @type String
* <p>Color name or hex triplet specifying the color of the shadow.</p>
*/
/**
* @property offset
* @type Dictionary
* <p>Dictionary with the properties <code>width</code> and <code>height</code> used as the horizontal
and vertical offset of the shadow, respectively.</p>
*/
/**
* @class Titanium.UI.iOS.3DMatrix
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/3DMatrix.yml
* <p>The 3D Matrix is an object for holding values for a 3D affine transform.</p>
* @removed 6.0.0 Use <Titanium.UI.3DMatrix> instead.
* @description <p>The 3DMatrix is created by {@link Titanium.UI.iOS#method-create3DMatrix}. A 3D transform is
used to rotate, scale, translate, or skew the objects in three-dimensional
space. A 3D transform is represented by a 4 by 4 matrix. </p>
<p>You create an <code>identity matrix</code> by creating a 3D Matrix with an empty
constructor.</p>
<p>See {@link Titanium.UI.3DMatrix} for sample usage.</p>
*/
/**
* @method invert
* <p>Returns a matrix constructed by inverting an existing matrix.</p>
* @returns {Titanium.UI.3DMatrix}
*/
/**
* @method multiply
* <p>Returns a matrix constructed by combining two existing matrices.</p>
* @param {Titanium.UI.3DMatrix} t2
<p>The second matrix. This matrix is concatenated to the matrix instance against which the
function is invoked. The result of this function is the first matrix multiplied by the
second matrix. You might perform several multiplications in order to create a single
matrix that contains the cumulative effects of several transformations. </p>
<p>Note that matrix operations are not commutative - the order in which you concatenate
matrices is important. That is, the result of multiplying matrix t1 by matrix t2 does
not necessarily equal the result of multiplying matrix t2 by matrix t1.</p>
* @returns {Titanium.UI.3DMatrix}
*/
/**
* @method rotate
* <p>Returns a matrix constructed by rotating an existing matrix.</p>
* @param {Number} angle
<p>The angle, in degrees, by which to rotate the matrix. A positive value specifies
counterclockwise rotation and a negative value specifies clockwise rotation.</p>
* @param {Number} x
<p>The x coordinate of the vector about which to rotate.</p>
* @param {Number} y
<p>The y coordinate of the vector about which to rotate.</p>
* @param {Number} z
<p>The z coordinate of the vector about which to rotate.</p>
* @returns {Titanium.UI.3DMatrix}
*/
/**
* @method scale
* <p>Returns a matrix constructed by scaling an existing matrix.</p>
* @param {Number} sx
<p>The value by which to scale x values of the matrix.</p>
* @param {Number} sy
<p>The value by which to scale y values of the matrix.</p>
* @param {Number} sz
<p>The value by which to scale z values of the matrix.</p>
* @returns {Titanium.UI.3DMatrix}
*/
/**
* @method translate
* <p>Returns a matrix constructed by translating an existing matrix.</p>
* @param {Number} tx
<p>The value by which to move x values with the matrix.</p>
* @param {Number} ty
<p>The value by which to move y values with the matrix. Negative values move the target
up the display whereas towards the user and negative values away from the user.</p>
* @param {Number} tz
<p>The value by which to move z values with the matrix. Negative values move the target
towards the user whereas negative values away from the user.</p>
* @returns {Titanium.UI.3DMatrix}
*/
/**
* @method getM11
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m11} property.</p>
* @returns {Number}
*/
/**
* @method setM11
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m11} property.</p>
* @param {Number} m11
<p>New value for the property.</p>
*/
/**
* @method getM12
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m12} property.</p>
* @returns {Number}
*/
/**
* @method setM12
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m12} property.</p>
* @param {Number} m12
<p>New value for the property.</p>
*/
/**
* @method getM13
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m13} property.</p>
* @returns {Number}
*/
/**
* @method setM13
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m13} property.</p>
* @param {Number} m13
<p>New value for the property.</p>
*/
/**
* @method getM14
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m14} property.</p>
* @returns {Number}
*/
/**
* @method setM14
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m14} property.</p>
* @param {Number} m14
<p>New value for the property.</p>
*/
/**
* @method getM21
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m21} property.</p>
* @returns {Number}
*/
/**
* @method setM21
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m21} property.</p>
* @param {Number} m21
<p>New value for the property.</p>
*/
/**
* @method getM22
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m22} property.</p>
* @returns {Number}
*/
/**
* @method setM22
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m22} property.</p>
* @param {Number} m22
<p>New value for the property.</p>
*/
/**
* @method getM23
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m23} property.</p>
* @returns {Number}
*/
/**
* @method setM23
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m23} property.</p>
* @param {Number} m23
<p>New value for the property.</p>
*/
/**
* @method getM24
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m24} property.</p>
* @returns {Number}
*/
/**
* @method setM24
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m24} property.</p>
* @param {Number} m24
<p>New value for the property.</p>
*/
/**
* @method getM31
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m31} property.</p>
* @returns {Number}
*/
/**
* @method setM31
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m31} property.</p>
* @param {Number} m31
<p>New value for the property.</p>
*/
/**
* @method getM32
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m32} property.</p>
* @returns {Number}
*/
/**
* @method setM32
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m32} property.</p>
* @param {Number} m32
<p>New value for the property.</p>
*/
/**
* @method getM33
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m33} property.</p>
* @returns {Number}
*/
/**
* @method setM33
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m33} property.</p>
* @param {Number} m33
<p>New value for the property.</p>
*/
/**
* @method getM34
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m34} property.</p>
* @returns {Number}
*/
/**
* @method setM34
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m34} property.</p>
* @param {Number} m34
<p>New value for the property.</p>
*/
/**
* @method getM41
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m41} property.</p>
* @returns {Number}
*/
/**
* @method setM41
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m41} property.</p>
* @param {Number} m41
<p>New value for the property.</p>
*/
/**
* @method getM42
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m42} property.</p>
* @returns {Number}
*/
/**
* @method setM42
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m42} property.</p>
* @param {Number} m42
<p>New value for the property.</p>
*/
/**
* @method getM43
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m43} property.</p>
* @returns {Number}
*/
/**
* @method setM43
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m43} property.</p>
* @param {Number} m43
<p>New value for the property.</p>
*/
/**
* @method getM44
* <p>Gets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m44} property.</p>
* @returns {Number}
*/
/**
* @method setM44
* <p>Sets the value of the {@link Titanium.UI.iOS.3DMatrix#property-m44} property.</p>
* @param {Number} m44
<p>New value for the property.</p>
*/
/**
* @property m11
* @type Number
* <p>The entry at position [1,1] in the matrix.</p>
*/
/**
* @property m12
* @type Number
* <p>The entry at position [1,2] in the matrix.</p>
*/
/**
* @property m13
* @type Number
* <p>The entry at position [1,3] in the matrix.</p>
*/
/**
* @property m14
* @type Number
* <p>The entry at position [1,4] in the matrix.</p>
*/
/**
* @property m21
* @type Number
* <p>The entry at position [2,1] in the matrix.</p>
*/
/**
* @property m22
* @type Number
* <p>The entry at position [2,2] in the matrix.</p>
*/
/**
* @property m23
* @type Number
* <p>The entry at position [2,3] in the matrix.</p>
*/
/**
* @property m24
* @type Number
* <p>The entry at position [2,4] in the matrix.</p>
*/
/**
* @property m31
* @type Number
* <p>The entry at position [3,1] in the matrix.</p>
*/
/**
* @property m32
* @type Number
* <p>The entry at position [3,2] in the matrix.</p>
*/
/**
* @property m33
* @type Number
* <p>The entry at position [3,3] in the matrix.</p>
*/
/**
* @property m34
* @type Number
* <p>The entry at position [3,4] in the matrix.</p>
*/
/**
* @property m41
* @type Number
* <p>The entry at position [4,1] in the matrix.</p>
*/
/**
* @property m42
* @type Number
* <p>The entry at position [4,2] in the matrix.</p>
*/
/**
* @property m43
* @type Number
* <p>The entry at position [4,3] in the matrix.</p>
*/
/**
* @property m44
* @type Number
* <p>The entry at position [4,4] in the matrix.</p>
*/
/**
* @class Titanium.UI.iOS.AdView
* @platform iphone 1.4
* @platform ipad 1.4
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/AdView.yml
* <p>The AdView is a view for display Apple iAds.</p>
* @description <p>The Ad view is created by the {@link Titanium.UI.iOS#method-createAdView} method or <strong><code><AdView></code></strong> Alloy element.</p>
*/
/**
* @event action
* <p>Fired when a banner action is performed.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event error
* <p>Fired when a banner could not be loaded.</p>
* @param {Boolean} success
<p>Indicates a successful operation. Returns <code>false</code>.</p>
* @param {String} error
<p>Error message, if any returned. May be undefined.</p>
* @param {Number} code
<p>Error code.
If the error was generated by the operating system, that system's error value
is used. Otherwise, this value will be -1.</p>
* @param {String} message
<p>Error message. Use the error property instead.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event load
* <p>Fired when a banner is loaded and displayed.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method cancelAction
* <p>Cancel a banner to uncover the user interface.</p>
* @description <p>A banner view action can cover your application's user interface. However, your application
continues to run, and receives events normally. If your application receives an event that
requires the user's attention, it can programmatically cancel the action and uncover its
interface by calling cancelAction. Canceling actions frequently can cause a loss of revenue
for your application.</p>
*/
/**
* @method getAdSize
* <p>Gets the value of the {@link Titanium.UI.iOS.AdView#property-adSize} property.</p>
* @returns {String}
* @platform iphone 2.0.0
* @platform ipad 2.0.0
*/
/**
* @method setAdSize
* <p>Sets the value of the {@link Titanium.UI.iOS.AdView#property-adSize} property.</p>
* @param {String} adSize
<p>New value for the property.</p>
* @platform iphone 2.0.0
* @platform ipad 2.0.0
*/
/**
* @property adSize
* @type String
* <p>Size of the advertisement when minimized.</p>
* @description <p>Apple only allows setting ads as specific sizes, meaning that traditional view sizing does
not affect ads. Ads always display in full-screen mode when a user clicks on them. </p>
<p>Should be set to either {@link Titanium.UI.iOS#property-AD_SIZE_PORTRAIT AD_SIZE_PORTRAIT} or
{@link Titanium.UI.iOS#property-AD_SIZE_LANDSCAPE AD_SIZE_LANDSCAPE}. Attempting to set this property to
any other value will cause an exception. </p>
<p>Users are still allowed to set the view's {@link Titanium.UI.View#property-width width} and
{@link Titanium.UI.View#property-height height}, but this does not affect the size of the ad itself. It is
recommended that the <code>auto</code> value is used for these properties instead, to compute the
view's size from the adSize.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-AD_SIZE_PORTRAIT}
<li> {@link Titanium.UI.iOS#property-AD_SIZE_LANDSCAPE}
</ul></p>
* @platform iphone 2.0.0
* @platform ipad 2.0.0
*/
/**
* @class Titanium.UI.iOS.AlertDialogStyle
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/AlertDialogStyle.yml
* <p>A set of constants for the style that can be used for the <code>style</code> property of
{@link Titanium.UI.AlertDialog}.</p>
*/
/**
* @property DEFAULT
* @type Number
* @readonly
* <p>A standard alert dialog. This is the default value.</p>
*/
/**
* @property PLAIN_TEXT_INPUT
* @type Number
* @readonly
* <p>An alert dialog that allows the user to enter text.</p>
*/
/**
* @property SECURE_TEXT_INPUT
* @type Number
* @readonly
* <p>An alert dialog that allows the user to enter text. The text field is obscured.</p>
*/
/**
* @property LOGIN_AND_PASSWORD_INPUT
* @type Number
* @readonly
* <p>An alert dialog that allows the user to enter login identifier and password.</p>
*/
/**
* @class Titanium.UI.iOS.AnchorAttachmentBehavior
* @platform iphone 3.2
* @platform ipad 3.2
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/AnchorAttachmentBehavior.yml
* <p>Dynamic behavior to support connections between an anchor point and an item.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>The following APIs are supported on iOS 7 and later.</p>
<p>An anchor attachment behavior creates a dynamic connection between an anchor point and an item.
To define an anchor attachment behavior:</p>
<ol>
<li>Use the {@link Titanium.UI.iOS#method-createAnchorAttachmentBehavior} method to create a behavior.</li>
<li>Set the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-anchor anchor} and
{@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-item item} properties.</li>
<li>Add the behavior to the {@link Titanium.UI.iOS.Animator Animator object}.</li>
</ol>
<p>To create a dynamic connection between two items, use {@link Titanium.UI.iOS.ViewAttachmentBehavior}.</p>
* <h3>Examples</h3>
<h4>Simple Example</h4>
<p>The following example creates a red block and anchors it to a point near the top-center of
the window. Using a gravitational force, the red block swings like a pendulum.</p>
<p><img src="images/animator/anchorattachment.gif" height="200" style="border:1px solid black"/></p>
<pre><code>var win = Ti.UI.createWindow({backgroundColor: 'white', fullscreen: true});
// Create an Animator object using the window as the coordinate system
var animator = Ti.UI.iOS.createAnimator({referenceView: win});
// Create a red block to animate
var redBlock = Ti.UI.createView({
backgroundColor: 'red',
width: 25,
height: 25,
top: 10,
left: 25
});
var WIDTH = Ti.Platform.displayCaps.platformWidth;
// Anchor the red block to a point near the top-center
var anchor = Ti.UI.iOS.createAnchorAttachmentBehavior({
anchor: {x: WIDTH/2, y: 10},
item: redBlock
});
animator.addBehavior(anchor);
// Simulate Earth's gravity to allow the pendulum to swing
var gravity = Ti.UI.iOS.createGravityBehavior({
gravityDirection: {x: 0.0, y: 1.0}
});
gravity.addItem(redBlock);
animator.addBehavior(gravity);
// Start the animation when the window opens
win.addEventListener('open', function(e){
animator.startAnimator();
});
win.add(redBlock);
win.open();
</code></pre>
*/
/**
* @method getAnchor
* <p>Gets the value of the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-anchor} property.</p>
* @returns {Point}
*/
/**
* @method setAnchor
* <p>Sets the value of the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-anchor} property.</p>
* @param {Point} anchor
<p>New value for the property.</p>
*/
/**
* @method getDamping
* <p>Gets the value of the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-damping} property.</p>
* @returns {Number}
*/
/**
* @method setDamping
* <p>Sets the value of the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-damping} property.</p>
* @param {Number} damping
<p>New value for the property.</p>
*/
/**
* @method getDistance
* <p>Gets the value of the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-distance} property.</p>
* @returns {Number}
*/
/**
* @method setDistance
* <p>Sets the value of the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-distance} property.</p>
* @param {Number} distance
<p>New value for the property.</p>
*/
/**
* @method getFrequency
* <p>Gets the value of the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-frequency} property.</p>
* @returns {Number}
*/
/**
* @method setFrequency
* <p>Sets the value of the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-frequency} property.</p>
* @param {Number} frequency
<p>New value for the property.</p>
*/
/**
* @method getItem
* <p>Gets the value of the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-item} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setItem
* <p>Sets the value of the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-item} property.</p>
* @param {Titanium.UI.View} item
<p>New value for the property.</p>
*/
/**
* @method getOffset
* <p>Gets the value of the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-offset} property.</p>
* @returns {Point}
*/
/**
* @method setOffset
* <p>Sets the value of the {@link Titanium.UI.iOS.AnchorAttachmentBehavior#property-offset} property.</p>
* @param {Point} offset
<p>New value for the property.</p>
*/
/**
* @property [anchor=(0,0)]
* @type Point
* <p>Anchor point for the attachment behavior relative to the animator's coordinate system.</p>
*/
/**
* @property [damping=0]
* @type Number
* <p>Amount of damping to apply to the attachment behavior.</p>
*/
/**
* @property [distance=0]
* @type Number
* <p>Distance, in points, between the two attachment points.</p>
*/
/**
* @property [frequency=0]
* @type Number
* <p>Frequency of oscillation for the behavior.</p>
*/
/**
* @property item
* @type Titanium.UI.View
* <p>Item to connect to use the attachment behavior.</p>
*/
/**
* @property [offset=(0,0)]
* @type Point
* <p>Offset from the center point of the item for the attachment.</p>
*/
/**
* @class Titanium.UI.iOS.AnimationStyle
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/AnimationStyle.yml
* <p>A set of constants for the animation styles used for view transitions.</p>
*/
/**
* @property CURL_DOWN
* @type Number
* @readonly
* <p>Curl downwards during a transition animation.</p>
* @description <p>Used with the {@link Titanium.UI.Animation#property-transition} property.</p>
<p>One of the group of animation style constants
{@link Titanium.UI.iOS.AnimationStyle#property-CURL_DOWN CURL_DOWN},
{@link Titanium.UI.iOS.AnimationStyle#property-CURL_UP CURL_UP},
{@link Titanium.UI.iOS.AnimationStyle#property-FLIP_FROM_LEFT FLIP_FROM_LEFT},
{@link Titanium.UI.iOS.AnimationStyle#property-FLIP_FROM_RIGHT FLIP_FROM_RIGHT},
and {@link Titanium.UI.iOS.AnimationStyle#property-NONE NONE}.</p>
*/
/**
* @property CURL_UP
* @type Number
* @readonly
* <p>Curl upwards during a transition animation.</p>
* @description <p>Used with the {@link Titanium.UI.Animation#property-transition} property.</p>
<p>One of the group of animation style constants
{@link Titanium.UI.iOS.AnimationStyle#property-CURL_DOWN CURL_DOWN},
{@link Titanium.UI.iOS.AnimationStyle#property-CURL_UP CURL_UP},
{@link Titanium.UI.iOS.AnimationStyle#property-FLIP_FROM_LEFT FLIP_FROM_LEFT},
{@link Titanium.UI.iOS.AnimationStyle#property-FLIP_FROM_RIGHT FLIP_FROM_RIGHT},
and {@link Titanium.UI.iOS.AnimationStyle#property-NONE NONE}.</p>
*/
/**
* @property FLIP_FROM_LEFT
* @type Number
* @readonly
* <p>Flip from left to right during a transition animation.</p>
* @description <p>Used with the {@link Titanium.UI.Animation#property-transition} property.</p>
<p>One of the group of animation style constants
{@link Titanium.UI.iOS.AnimationStyle#property-CURL_DOWN CURL_DOWN},
{@link Titanium.UI.iOS.AnimationStyle#property-CURL_UP CURL_UP},
{@link Titanium.UI.iOS.AnimationStyle#property-FLIP_FROM_LEFT FLIP_FROM_LEFT},
{@link Titanium.UI.iOS.AnimationStyle#property-FLIP_FROM_RIGHT FLIP_FROM_RIGHT},
and {@link Titanium.UI.iOS.AnimationStyle#property-NONE NONE}.</p>
*/
/**
* @property FLIP_FROM_RIGHT
* @type Number
* @readonly
* <p>Flip from right to left during a transition animation.</p>
* @description <p>Used with the {@link Titanium.UI.Animation#property-transition} property.</p>
<p>One of the group of animation style constants
{@link Titanium.UI.iOS.AnimationStyle#property-CURL_DOWN CURL_DOWN},
{@link Titanium.UI.iOS.AnimationStyle#property-CURL_UP CURL_UP},
{@link Titanium.UI.iOS.AnimationStyle#property-FLIP_FROM_LEFT FLIP_FROM_LEFT},
{@link Titanium.UI.iOS.AnimationStyle#property-FLIP_FROM_RIGHT FLIP_FROM_RIGHT},
and {@link Titanium.UI.iOS.AnimationStyle#property-NONE NONE}.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>No animation.</p>
* @description <p>Used with the {@link Titanium.UI.Animation#property-transition} property.</p>
<p>One of the group of animation style constants
{@link Titanium.UI.iOS.AnimationStyle#property-CURL_DOWN CURL_DOWN},
{@link Titanium.UI.iOS.AnimationStyle#property-CURL_UP CURL_UP},
{@link Titanium.UI.iOS.AnimationStyle#property-FLIP_FROM_LEFT FLIP_FROM_LEFT},
{@link Titanium.UI.iOS.AnimationStyle#property-FLIP_FROM_RIGHT FLIP_FROM_RIGHT},
and {@link Titanium.UI.iOS.AnimationStyle#property-NONE NONE}.</p>
*/
/**
* @class Titanium.UI.iOS.Animator
* @platform iphone 3.2
* @platform ipad 3.2
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/Animator.yml
* <p>Provides support for the built-in iOS dynamic animations</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>The following APIs are supported on iOS 7 and later.</p>
<p>The animator provides physics-related capabilities and animations using the iOS physics engine.
Each animator is independent of other animators you create. An animator is comprised of
behaviors and items. Behaviors define the rules of the animation, while items are the
view objects to be animated. An item in the animator can be given
multiple behaviors as long as those behaviors belong to the same animator.</p>
<p>To use these dynamic animations, first create the items to animate, then:</p>
<p><strong>1.</strong> Create an animator using the {@link Titanium.UI.iOS#method-createAnimator} method. </p>
<p><strong>2.</strong> Set the {@link Titanium.UI.iOS.Animator#property-referenceView referenceView} property to establish the
coordinate system for the animations.</p>
<p><strong>3.</strong> Create and add items to one or more of the following behaviors:</p>
<ul>
<li>{@link Titanium.UI.iOS.AnchorAttachmentBehavior}</li>
<li>{@link Titanium.UI.iOS.CollisionBehavior}</li>
<li>{@link Titanium.UI.iOS.DynamicItemBehavior}</li>
<li>{@link Titanium.UI.iOS.GravityBehavior}</li>
<li>{@link Titanium.UI.iOS.PushBehavior}</li>
<li>{@link Titanium.UI.iOS.SnapBehavior}</li>
<li>{@link Titanium.UI.iOS.ViewAttachmentBehavior}</li>
</ul>
<p><strong>4.</strong> Add these behaviors to the animator with the {@link Titanium.UI.iOS.Animator#method-addBehavior addBehavior} method.</p>
<p><strong>5.</strong> Start the animator with {@link Titanium.UI.iOS.Animator#method-startAnimator startAnimator} method.</p>
<p>Once all items are at rest, the animator automatically pauses, and resumes if a behavior
parameter changes, or a behavior or item is added or removed.</p>
<p>See the behaviors listed above for examples of animating items.</p>
<h4>Reference View</h4>
<p>The Titanium view object set to the Animator's {@link Titanium.UI.iOS.Animator#property-referenceView referenceView}
property establishes the coordinate system for the animation behaviors and items. Each item that
needs to be animated must be a child of the reference view.</p>
<p>By default, when you create a collision behavior, the behavior uses the edge's of the reference
view as its boundary, so any item within this view cannot be pushed out of it.</p>
<p>Use the following lists as references when specifying your animation behaviors.</p>
<p><strong>Points</strong></p>
<p>The following list notes the location of notable points in the coordinate system, where WIDTH and
HEIGHT are the width and height of the reference view, respectively.</p>
<ul>
<li>Top-left corner: (0,0)</li>
<li>Top-right corner: (WIDTH, 0)</li>
<li>Center: (WIDTH/2, HEIGHT/2)</li>
<li>Bottom-left corner: (0, HEIGHT)</li>
<li>Bottom-right corner: (WIDTH, HEIGHT)</li>
</ul>
<p>Note that on iOS a point is equivalent to a display pixel.</p>
<p><strong>Vectors</strong></p>
<p>Gravity and push forces may be specified as vectors with the <code>gravityDirection</code> and
<code>pushDirection</code> properties, respectively. The following list notes the direction and its
corresponding vector:</p>
<ul>
<li>Left: (-x,0)</li>
<li>Right: (+x,0)</li>
<li>Up: (0,-y)</li>
<li>Down: (0,+y)</li>
</ul>
<p><strong>Angles</strong></p>
<p>Gravity and push forces may be specified with the <code>angle</code> and <code>magnitude</code> properties.
Specify all angle values as radians (360 degrees = 2 * pi radians). The following list notes
the direction and its corresponding angle:</p>
<ul>
<li>Right: 0 or 2 * pi</li>
<li>Down: pi / 2</li>
<li>Left: pi</li>
<li>Up: pi / 2 * 3</li>
</ul>
*/
/**
* @event pause
* <p>Fired when the animator paused its animations.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event resume
* <p>Fired when the animator resumes its animations.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method addBehavior
* <p>Adds a dynamic behavior to the animator.</p>
* @description <p>Specify an instance of one of the following Titanium behavior proxies:</p>
<ul>
<li>{@link Titanium.UI.iOS.AnchorAttachmentBehavior}</li>
<li>{@link Titanium.UI.iOS.CollisionBehavior}</li>
<li>{@link Titanium.UI.iOS.DynamicItemBehavior}</li>
<li>{@link Titanium.UI.iOS.GravityBehavior}</li>
<li>{@link Titanium.UI.iOS.PushBehavior}</li>
<li>{@link Titanium.UI.iOS.SnapBehavior}</li>
<li>{@link Titanium.UI.iOS.ViewAttachmentBehavior}</li>
</ul>
* @param {Titanium.Proxy} behavior
<p>Behavior to add to the animator.</p>
*/
/**
* @method removeAllBehaviors
* <p>Removes all behaviors from this animator.</p>
*/
/**
* @method removeBehavior
* <p>Removes the specified behavior from the animator.</p>
* @description <p>Specifiy an instance of one of the following Titanium behavior proxies:</p>
<ul>
<li>{@link Titanium.UI.iOS.AnchorAttachmentBehavior}</li>
<li>{@link Titanium.UI.iOS.CollisionBehavior}</li>
<li>{@link Titanium.UI.iOS.DynamicItemBehavior}</li>
<li>{@link Titanium.UI.iOS.GravityBehavior}</li>
<li>{@link Titanium.UI.iOS.PushBehavior}</li>
<li>{@link Titanium.UI.iOS.SnapBehavior}</li>
<li>{@link Titanium.UI.iOS.ViewAttachmentBehavior}</li>
</ul>
* @param {Titanium.Proxy} behavior
<p>Behavior to remove from the animator.</p>
*/
/**
* @method startAnimator
* <p>Starts the animation behaviors.</p>
*/
/**
* @method stopAnimator
* <p>Stops the animation behaviors.</p>
*/
/**
* @method updateItemUsingCurrentState
* <p>Updates the animator's state information with the current state of the specified item.</p>
* @description <p>When an item is first added to the animator, the animator reads the initial state of the
item, then takes responsibility for updating it. If you actively make changes to the item's properties,
such as changing its position or dimensions, use this method to update the item's new state.</p>
* @param {Titanium.UI.View} item
<p>Item to update with new state information.</p>
*/
/**
* @method getBehaviors
* <p>Gets the value of the {@link Titanium.UI.iOS.Animator#property-behaviors} property.</p>
* @returns {Titanium.Proxy[]}
*/
/**
* @method setBehaviors
* <p>Sets the value of the {@link Titanium.UI.iOS.Animator#property-behaviors} property.</p>
* @param {Array<Titanium.Proxy>} behaviors
<p>New value for the property.</p>
*/
/**
* @method getReferenceView
* <p>Gets the value of the {@link Titanium.UI.iOS.Animator#property-referenceView} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setReferenceView
* <p>Sets the value of the {@link Titanium.UI.iOS.Animator#property-referenceView} property.</p>
* @param {Titanium.UI.View} referenceView
<p>New value for the property.</p>
*/
/**
* @method getRunning
* <p>Gets the value of the {@link Titanium.UI.iOS.Animator#property-running} property.</p>
* @returns {Boolean}
*/
/**
* @property behaviors
* @type Titanium.Proxy[]
* <p>Behaviors associated with this animator.</p>
*/
/**
* @property referenceView
* @type Titanium.UI.View
* <p>Titanium View object to initialize as the reference view for the animator.</p>
* @description <p>When adding behavior and dynamic items to the animator, the animator bases its
coordindate system on the reference view.</p>
*/
/**
* @property running
* @type Boolean
* @readonly
* <p>Returns <code>true</code> if the animator is running else <code>false</code>.</p>
*/
/**
* @class Titanium.UI.iOS.ApplicationShortcuts
* @platform iphone 5.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/ApplicationShortcuts.yml
* <p>The Home screen quick actions API is for adding shortcuts to your app icon that anticipate and accelerate a
user's interaction with your app.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>3D Touch gives iOS 9 users an additional interaction dimension. On supported devices, people can quickly choose
app-specific actions from the Home screen by pressing on the app icon. The pressing of an application shortcut
will then fire the <code>shortcutitemclick</code> {@link Titanium.App.iOS} event.</p>
<p>There are static and dynamic shortcuts to differentiate:
* Static: Can be set in the <code><ios></code> section of the <code>tiapp.xml</code> before launching the app.
* Dynamic: Can be set in the app to offer a dynamic behavior at runtime.</p>
<p>Here is an example how to create static application shortcuts in the <code>tiapp.xml</code>:</p>
<pre><code><ti:app>
...
<ios>
<plist>
<dict>
<key>UIApplicationShortcutItems</key>
<array>
<dict>
<key>UIApplicationShortcutItemIconType</key>
<string>UIApplicationShortcutIconTypeSearch</string>
<key>UIApplicationShortcutItemTitle</key>
<string>My title</string>
<key>UIApplicationShortcutItemSubtitle</key>
<string>My subtitle</string>
<key>UIApplicationShortcutItemType</key>
<string>my_identifier</string>
<key>UIApplicationShortcutItemUserInfo</key>
<dict/>
</dict>
</array>
</dict>
</plist>
</ios>
...
</ti:app>
</code></pre>
<p>Static shortcuts can be translated in the <code>i18n/<language>/app.xml</code> file. Dynamic shortcuts can be translated by using the
methods described <a href="https://wiki.appcelerator.org/display/guides2/Internationalization">in the Wiki</a>.</p>
<p>To use this feature make sure you have a 3D Touch compatible device running iOS 9 or later. To
check for the feature, use the {@link Titanium.UI.iOS#property-forceTouchSupported} property.
You cannot test 3D touch on the iOS simulator.</p>
* <h3>Examples</h3>
<h4>Full example (get shortcuts, add shortcuts, remove shortcuts, check shortcuts).</h4>
<pre><code>Ti.App.iOS.addEventListener("shortcutitemclick", function(e){
Ti.API.info("shortcutitemclick Event Fired");
Ti.API.info("event payload:" + JSON.stringify(e));
});
var win = Titanium.UI.createWindow({
title:'Test', backgroundColor:'#fff', layout:"vertical"
});
var btn1 = Ti.UI.createButton({
top: 50, height:45, title:"Add Contact Us Application Shortcut"
});
win.add(btn1);
btn1.addEventListener("click",function(){
var appShortcuts = Ti.UI.iOS.createApplicationShortcuts();
appShortcuts.addDynamicShortcut({
itemtype:"contact_us",
title:"Contact Us",
subtitle:"Tap to reach us",
icon: Ti.UI.iOS.SHORTCUT_ICON_TYPE_ADD,
userInfo:{
infoKey:"contact_us"
}
});
});
var btn2 = Ti.UI.createButton({
top: 10, height:45, title:"Remove Contact Us Application Shortcut"
});
win.add(btn2);
btn2.addEventListener("click",function(){
var appShortcuts = Ti.UI.iOS.createApplicationShortcuts();
appShortcuts.removeDynamicShortcut("contact_us");
});
var btn3 = Ti.UI.createButton({
top: 10, height:45, title:"Count Dynamic App Shortcuts"
});
win.add(btn3);
btn3.addEventListener("click",function(){
var appShortcuts = Ti.UI.iOS.createApplicationShortcuts();
var shortcuts = appShortcuts.listDynamicShortcuts();
Ti.API.info("Dynamic App Shortcut count:" + shortcuts.length);
Ti.API.info("Dynamic App Shortcut as JSON:" + JSON.stringify(shortcuts));
});
var btn4 = Ti.UI.createButton({
top: 10, height:45, title:"Count Static App Shortcuts"
});
win.add(btn4);
btn4.addEventListener("click",function(){
var appShortcuts = Ti.UI.iOS.createApplicationShortcuts();
var shortcuts = appShortcuts.listStaticShortcuts();
Ti.API.info("Static App Shortcut count:" + shortcuts.length);
Ti.API.info("Static App Shortcut as JSON:" + JSON.stringify(shortcuts));
});
var btn5 = Ti.UI.createButton({
top: 10, height:45, title:"Dynamic Shortcut Exists?"
});
win.add(btn5);
btn5.addEventListener("click",function(){
var appShortcuts = Ti.UI.iOS.createApplicationShortcuts();
var exists = appShortcuts.dynamicShortcutExists("contact_us");
var msg = (exists) ? "Icon exists" : "Sorry isn't there";
alert(msg);
});
var btn6 = Ti.UI.createButton({
top: 10, height:45, title:"Remove All Dynamic Shortcuts"
});
win.add(btn6);
btn6.addEventListener("click",function(){
var appShortcuts = Ti.UI.iOS.createApplicationShortcuts();
appShortcuts.removeAllDynamicShortcuts();
});
var btn7 = Ti.UI.createButton({
top: 10, height:45, title:"Get shortcut by itemtype \"contact_us\""
});
win.add(btn7);
btn7.addEventListener("click",function(){
var appShortcuts = Ti.UI.iOS.createApplicationShortcuts();
var shortcut = appShortcuts.getDynamicShortcut("contact_us");
alert(shortcut);
});
win.open();</code></pre><h4>Add a Titanium.Contact.Person as icon.</h4>
<p>Example:</p>
<pre><code>Ti.App.iOS.addEventListener("shortcutitemclick", function(e){
Ti.API.info("shortcutitemclick Event Fired");
Ti.API.info("person:" + JSON.stringify(e.userInfo.person));
});
var win = Titanium.UI.createWindow({
title:'Test', backgroundColor:'#fff', layout:"vertical"
});
var btn1 = Ti.UI.createButton({
top: 50, height:45, title:"Add Ti.Contacts Application Shortcut"
});
win.add(btn1);
btn1.addEventListener("click", function() {
if(!Ti.Contacts.hasContactsPermissions()) {
Ti.Contacts.requestContactsPermissions(function(e) {
if(e.success) {
createShortcut();
}
})
} else {
createShortcut();
}
});
var btn2 = Ti.UI.createButton({
top: 10, height:45, title:"Remove Ti.Contacts Application Shortcut"
});
win.add(btn2);
btn2.addEventListener("click", function(){
var appShortcuts = Ti.UI.iOS.createApplicationShortcuts();
appShortcuts.removeDynamicShortcut("contact_us");
});
function createShortcut() {
Ti.Contacts.showContacts({
selectedPerson: function(e) {
var person = e.person;
var appShortcuts = Ti.UI.iOS.createApplicationShortcuts();
appShortcuts.addDynamicShortcut({
itemtype:"contact_us",
title: person.fullName,
subtitle: "Tap to call",
icon: person,
userInfo: {
person: {
firstName: person.firstName,
lastName: person.lastName
}
}
});
}
});
}
win.open();
</code></pre>
*/
/**
* @method listDynamicShortcuts
* <p>Returns an array of the application shortcuts created dynamically.</p>
* @returns {ShortcutParams[]}
*/
/**
* @method listStaticShortcuts
* <p>Returns an array of the application shortcuts listed in your tiapp.xml file.</p>
* @returns {ShortcutParams[]}
*/
/**
* @method removeAllDynamicShortcuts
* <p>Removes all dynamically created application shortcuts.</p>
*/
/**
* @method dynamicShortcutExists
* <p>Returns true or false depending if the provided shortcut object already exists.</p>
* @param {String} itemtype
<p>Checks if the dynamic application shortcut item identified by the <code>itemtype</code> exists.</p>
* @returns {Boolean}
*/
/**
* @method addDynamicShortcut
* <p>Creates a new dynamic application shortcut item.</p>
* @param {ShortcutParams} params
<p>The parameters used when creating a dynamic shortcut.</p>
*/
/**
* @method removeDynamicShortcut
* <p>Removes the dynamic application shortcut item identified by the <code>itemtype</code>.</p>
* @param {String} itemtype
<p>Use the <code>itemtype</code> property to determine which shortcut should be removed.</p>
*/
/**
* @method getDynamicShortcut
* <p>Gets the dynamic application shortcut item identified by the <code>itemtype</code>.</p>
* @param {String} itemtype
<p>Use the <code>itemtype</code> property to determine which shortcut should be returned.</p>
*/
/**
* @class ShortcutParams
* @platform iphone 5.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/ApplicationShortcuts.yml
* <p>Object of options for {@link Titanium.UI.iOS.ApplicationShortcuts#method-addDynamicShortcut}.</p>
* @description <p>The parameters used when creating and receiving a shortcut. When used for creation, it must include
at least the <code>itemtype</code> and <code>title</code> properties.</p>
*/
/**
* @property itemtype
* @type String
* <p>The unique key for the application shortcut.</p>
*/
/**
* @property title
* @type String
* <p>The title of the application shortcut.</p>
* @description <p>The title can be localized, see <a href="https://wiki.appcelerator.org/display/guides2/Internationalization">here</a>
for more infos. </p>
*/
/**
* @property subtitle
* @type String
* <p>The subtitle displayed on the application shortcut.</p>
* @description <p>The subtitle can be localized, see <a href="https://wiki.appcelerator.org/display/guides2/Internationalization">here</a>
for more infos. </p>
*/
/**
* @property icon
* @type Number/String/Titanium.Contacts.Person
* <p>The icon to be displayed on the application shortcut. You can either use one of the constants like
{@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_COMPOSE}, a local image specified by the image path or a reference to a
{@link Titanium.Contacts.Person}.</p>
* @description <p>If you are using one of the pre-defined constants, you can reference to the list of icons from Apple <a href="https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIApplicationShortcutIcon_Class/index.html#//apple_ref/c/tdef/UIApplicationShortcutIconType">here</a>.</p>
<p>If you are using an image file, enable slicing (adding the image to an asset catalog) for
the project. To enable slicing, add the <code>use-app-thinning</code> element to the <code>ios</code> element in the
<code>tiapp.xml</code> file and set the value to <code>true</code>. If you do not enable slicing, the image will
not be displayed.</p>
<pre><code><ti:app>
<ios>
<use-app-thinning>true</use-app-thinning>
</ios>
</ti:app>
</code></pre>
<p>The recommended size for image files is 35dp (@2px: 70dp, @3x: 105dp). Also check the <a href="https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIApplicationShortcutIcon_Class/index.html">Apple documentation</a> <br>
for more information on shortcut icons.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_COMPOSE}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_PLAY}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_PAUSE}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_ADD}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_LOCATION}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_SEARCH}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_SHARE}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_PROHIBIT}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_CONTACT}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_HOME}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_MARK_LOCATION}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_FAVORITE}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_LOVE}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_CLOUD}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_INVITATION}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_CONFIRMATION}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_MAIL}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_MESSAGE}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_DATE}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_TIME}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_CAPTURE_PHOTO}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_CAPTURE_VIDEO}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_TASK}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_TASK_COMPLETED}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_ALARM}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_BOOKMARK}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_SHUFFLE}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_AUDIO}
<li> {@link Titanium.UI.iOS#property-SHORTCUT_ICON_TYPE_UPDATE}
</ul></p>
*/
/**
* @property userInfo
* @type Object
* <p>The userInfo of the application shortcut.</p>
* @description <p>The userInfo is an object containing information about the shortcut like an ID or details about it.</p>
*/
/**
* @class Titanium.UI.iOS.Attribute
* @platform iphone 3.2
* @platform ipad 3.2
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/Attribute.yml
* <p>An abstract datatype for specifying an attributed string attribute.</p>
* @removed 6.0.0 Use <Attribute> instead.
* @description <p>Attributes are added to the {@link Titanium.UI.iOS.AttributedString} object to create
styled text. The attribute is a JavaScript Object containing three properties:
<code>type</code>, <code>value</code> and <code>range</code>.</p>
<p>For examples of using Attributed Strings, see the
<a href="http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.AttributedString">Attributed Strings guide</a>.</p>
*/
/**
* @method getType
* <p>Gets the value of the {@link Titanium.UI.iOS.Attribute#property-type} property.</p>
* @returns {Number}
*/
/**
* @method setType
* <p>Sets the value of the {@link Titanium.UI.iOS.Attribute#property-type} property.</p>
* @param {Number} type
<p>New value for the property.</p>
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.UI.iOS.Attribute#property-value} property.</p>
* @returns {Number}
*/
/**
* @method setValue
* <p>Sets the value of the {@link Titanium.UI.iOS.Attribute#property-value} property.</p>
* @param {Number} value
<p>New value for the property.</p>
*/
/**
* @method getRange
* <p>Gets the value of the {@link Titanium.UI.iOS.Attribute#property-range} property.</p>
* @returns {Number[]}
*/
/**
* @method setRange
* <p>Sets the value of the {@link Titanium.UI.iOS.Attribute#property-range} property.</p>
* @param {Array<Number>} range
<p>New value for the property.</p>
*/
/**
* @property type
* @type Number
* <p>Attribute to apply to the text.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_FONT}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_FOREGROUND_COLOR}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_BACKGROUND_COLOR}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_LIGATURE}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_KERN}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_STYLE}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINES_STYLE}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_STROKE_COLOR}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_STROKE_WIDTH}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_SHADOW}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_TEXT_EFFECT}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_LINK}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_BASELINE_OFFSET}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_COLOR}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_COLOR}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_OBLIQUENESS}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_EXPANSION}
</ul></p>
*/
/**
* @property value
* @type Number
* <p>Attribute value.</p>
* @description <p>The <code>value</code> parameter depends on the <code>type</code> parameter. For example, to
use the foreground color on the text you would use {@link Titanium.UI.iOS#property-ATTRIBUTE_FOREGROUND_COLOR}
for the <code>type</code> and a color value for the <code>value</code>:</p>
<pre><code>{
type: Titanium.UI.iOS.ATTRIBUTE_FOREGROUND_COLOR,
value: '#DDD',
range: [0, 100]
}
</code></pre>
<p>If you use {@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINES_STYLE} or {@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_COLOR},
you must use one or more of these constants:</p>
<ul>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_STYLE_NONE}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_STYLE_SINGLE}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_STYLE_THICK}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_STYLE_DOUBLE}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_PATTERN_SOLID}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_PATTERN_DOT}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_PATTERN_DASH}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_PATTERN_DASH_DOT}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_PATTERN_DASH_DOT_DOT}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_BY_WORD}</li>
</ul>
<p>These can be combined:</p>
<pre><code>{
type: Titanium.UI.iOS.ATTRIBUTE_UNDERLINES_STYLE,
value: Titanium.UI.iOS.ATTRIBUTE_UNDERLINE_STYLE_SINGLE | Titanium.UI.iOS.ATTRIBUTE_UNDERLINE_PATTERN_DASH,
range: [0, 100]
}
</code></pre>
<p>If you use the {@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION}, you must use one or more of
these constants:</p>
<ul>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION_EMBEDDING}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION_OVERRIDE}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION_NATURAL}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION_LEFT_TO_RIGHT}</li>
<li>{@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION_RIGHT_TO_LEFT}</li>
</ul>
<p>These can also be combined the same way as the underline styles.</p>
<p>If you use the {@link Titanium.UI.iOS#property-ATTRIBUTE_SHADOW}, the <code>value</code> must be a JavaScript object containing
any of the <code>offset</code>, <code>blurRadius</code> or <code>color</code> properties:</p>
<pre><code>{
offset: {
width: 10,
height: 10
},
blurRadius: 10,
color: 'red'
}
</code></pre>
<p>If you use the {@link Titanium.UI.iOS#property-ATTRIBUTE_TEXT_EFFECT}, you must use the only supported iOS 7 constant
{@link Titanium.UI.iOS#property-ATTRIBUTE_LETTERPRESS_STYLE}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_STYLE_NONE}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_STYLE_SINGLE}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_STYLE_THICK}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINE_STYLE_DOUBLE}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION_EMBEDDING}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION_OVERRIDE}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION_NATURAL}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION_LEFT_TO_RIGHT}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION_RIGHT_TO_LEFT}
<li> {@link Titanium.UI.iOS#property-ATTRIBUTE_LETTERPRESS_STYLE}
</ul></p>
*/
/**
* @property range
* @type Number[]
* <p>Attribute range.</p>
* @description <p>This specifies the range of text to apply the property to, as an array of two numbers: <code>[from, length]</code>.</p>
*/
/**
* @class Titanium.UI.iOS.AttributedString
* @platform iphone 3.2
* @platform ipad 3.2
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/AttributedString.yml
* <p>An attributed string proxy manages character strings and associated sets of attributes (for example,
font and kerning) that apply to individual characters or ranges of characters in the string.</p>
* @removed 6.0.0 Use <Titanium.UI.AttributedString> instead.
* @description <p>The AttributedString proxy is created with the {@link Titanium.UI.iOS#method-createAttributedString} method.</p>
<p>The <code>text</code> property must be set initially in the constructor when creating an attributed string.
The {@link Titanium.UI.iOS.AttributedString#property-attributes attributes} can either be set in the constructor or after it has been created.</p>
<p>For examples of using Attributed Strings, see the
<a href="http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.AttributedString">Attributed Strings guide</a>.</p>
* <h3>Examples</h3>
<h4>Adds an array of attributes to a label</h4>
<p>Creates an AttributedString proxy, adds some attributes to it, and applies them
to a {@link Titanium.UI.Label}.</p>
<pre><code>var win = Titanium.UI.createWindow({
backgroundColor: '#ddd',
});
win.open();
var text = 'Bacon ipsum dolor Appcelerator Titanium rocks! sit amet fatback leberkas salami sausage tongue strip steak.';
var attr = Titanium.UI.iOS.createAttributedString({
text: text,
attributes: [
// Underlines text
{
type: Titanium.UI.iOS.ATTRIBUTE_UNDERLINES_STYLE,
value: Titanium.UI.iOS.ATTRIBUTE_UNDERLINE_STYLE_SINGLE,
range: [0, text.length]
},
// Sets a background color
{
type: Titanium.UI.iOS.ATTRIBUTE_BACKGROUND_COLOR,
value: "red",
range: [text.indexOf('Appcelerator'), ('Appcelerator').length]
},
{
type: Titanium.UI.iOS.ATTRIBUTE_BACKGROUND_COLOR,
value: "blue",
range: [text.indexOf('Titanium'), ('Titanium').length]
},
{
type: Titanium.UI.iOS.ATTRIBUTE_BACKGROUND_COLOR,
value: "yellow",
range: [text.indexOf('rocks!'), ('rocks!').length]
},
// Sets a foreground color
{
type: Titanium.UI.iOS.ATTRIBUTE_FOREGROUND_COLOR,
value: "orange",
range: [0, text.length]
},
{
type: Titanium.UI.iOS.ATTRIBUTE_FOREGROUND_COLOR,
value: "black",
range: [text.indexOf('rocks!'), ('rocks!').length]
}
]
});
var label = Titanium.UI.createLabel({
left: 20,
right: 20,
height: Titanium.UI.SIZE,
attributedString: attr
});
win.add(label);
</code></pre><h4>Adds attributes, one by one.</h4>
<pre><code>var win = Titanium.UI.createWindow({
backgroundColor: '#ddd',
});
win.open();
var text = 'Bacon ipsum dolor Appcelerator Titanium rocks! sit amet fatback leberkas salami sausage tongue strip steak.';
var attr = Titanium.UI.iOS.createAttributedString({
text: text
});
// Underlines text
attr.addAttribute({
type: Titanium.UI.iOS.ATTRIBUTE_UNDERLINES_STYLE,
value: Titanium.UI.iOS.ATTRIBUTE_UNDERLINE_STYLE_SINGLE,
range: [0, text.length]
});
var label = Titanium.UI.createLabel({
left: 20,
right: 20,
height: Titanium.UI.SIZE,
attributedString: attr
});
win.add(label);</code></pre>
*/
/**
* @method addAttribute
* <p>Adds an {@link Attribute attribute} with the given name and value to the characters in the specified range.</p>
* @param {Attribute} attribute
<p>An attribute object.</p>
*/
/**
* @method getText
* <p>Gets the value of the {@link Titanium.UI.iOS.AttributedString#property-text} property.</p>
* @returns {String}
*/
/**
* @method setText
* <p>Sets the value of the {@link Titanium.UI.iOS.AttributedString#property-text} property.</p>
* @param {String} text
<p>New value for the property.</p>
*/
/**
* @method getAttributes
* <p>Gets the value of the {@link Titanium.UI.iOS.AttributedString#property-attributes} property.</p>
* @returns {Attribute[]}
*/
/**
* @method setAttributes
* <p>Sets the value of the {@link Titanium.UI.iOS.AttributedString#property-attributes} property.</p>
* @param {Array<Attribute>} attributes
<p>New value for the property.</p>
*/
/**
* @property text
* @type String
* <p>The text applied to the attributed string.</p>
* @description <p>The <code>text</code> property must be set in the constructor and cannot be changed.</p>
*/
/**
* @property attributes
* @type Attribute[]
* <p>An array of attributes to add.</p>
* @description <p>Internally, this calls the {@link Titanium.UI.iOS.AttributedString#method-addAttribute addAttribute}
method for each of the attributes passed in.</p>
*/
/**
* @class Titanium.UI.iOS.BlurView
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/BlurView.yml
* <p>A {@link Titanium.UI.iOS.BlurView} object gives you an easy way implement some complex visual effects.
The blur effect is applied to every view the blur view is added to by default. You can also place the
blur view above other views and all visible views layered under the blur view are blurred as well.</p>
<p>For more information on BlurView, please refer to the official <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIVisualEffectView/">Apple documentation</a>.
Note: Apple introduced two new constants {@link Titanium.UI.iOS#property-BLUR_EFFECT_STYLE_REGULAR} and {@link Titanium.UI.iOS#property-BLUR_EFFECT_STYLE_PROMINENT} in
iOS 10. These are internally mapped to {@link Titanium.UI.iOS#property-BLUR_EFFECT_STYLE_LIGHT} and {@link Titanium.UI.iOS#property-BLUR_EFFECT_STYLE_EXTRA_LIGHT}.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* <h3>Examples</h3>
<h4>Basic Blur View</h4>
<p>The following example shows how to create a simple blur view:</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: "#fff"
});
// Reference image (or view)
var img = Ti.UI.createImageView({
image: "/default_app_logo.png",
top: 100,
width: 300,
height: 300
});
// Blur view
var blur = Ti.UI.iOS.createBlurView({
width: Ti.UI.FILL,
height: Ti.UI.FILL
});
img.add(blur);
// Effect controls
var tabs = Ti.UI.iOS.createTabbedBar({
labels: ["Extra light", "Light", "Dark"],
bottom: 100
});
// Available blur effects
var effects = [
Ti.UI.iOS.BLUR_EFFECT_STYLE_EXTRA_LIGHT,
Ti.UI.iOS.BLUR_EFFECT_STYLE_LIGHT,
Ti.UI.iOS.BLUR_EFFECT_STYLE_DARK,
];
tabs.addEventListener("click", function(e) {
blur.setEffect(effects[e.index]);
});
win.add(tabs);
win.add(img);
win.open();
</code></pre>
*/
/**
* @method getEffect
* <p>Gets the value of the {@link Titanium.UI.iOS.BlurView#property-effect} property.</p>
* @returns {Number}
*/
/**
* @method setEffect
* <p>Sets the value of the {@link Titanium.UI.iOS.BlurView#property-effect} property.</p>
* @param {Number} effect
<p>New value for the property.</p>
*/
/**
* @property [effect=undefined (no effect is applied)]
* @type Number
* <p>The effect you provide for the view.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-BLUR_EFFECT_STYLE_EXTRA_LIGHT}
<li> {@link Titanium.UI.iOS#property-BLUR_EFFECT_STYLE_LIGHT}
<li> {@link Titanium.UI.iOS#property-BLUR_EFFECT_STYLE_DARK}
<li> {@link Titanium.UI.iOS#property-BLUR_EFFECT_STYLE_REGULAR}
<li> {@link Titanium.UI.iOS#property-BLUR_EFFECT_STYLE_PROMINENT}
</ul></p>
*/
/**
* @class Titanium.UI.iOS.CollisionBehavior
* @platform iphone 3.2
* @platform ipad 3.2
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/CollisionBehavior.yml
* <p>Dynamic behavior to support collisions between items and boundaries.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>The following APIs are supported on iOS 7 and later.</p>
<p>A collision behavior specifies the behavior when items collide with each other and boundaries.
To define a collision behavior:</p>
<ol>
<li>Use the {@link Titanium.UI.iOS#method-createCollisionBehavior} method to create and define the behavior.</li>
<li>Use the {@link Titanium.UI.iOS.CollisionBehavior#method-addItem addItem} method to add items to the behavior.</li>
<li>Use the {@link Titanium.UI.iOS.CollisionBehavior#method-addBoundary addBoundary} method to add custom
boundaries for the item to collide with. By default, the behavior uses the Animator
object's reference view as the boundary.</li>
<li>Add the behavior to an {@link Titanium.UI.iOS.Animator Animator object}.</li>
</ol>
* <h3>Examples</h3>
<h4>Simple Example</h4>
<p>The following example creates many blocks scattered across the top of the window, which
start falling after the window opens. The item and boundary collisions are reported to the
console.</p>
<p><img src="images/animator/collision.gif" height="455" style="border:1px solid black"/></p>
<pre><code>var win = Ti.UI.createWindow({backgroundColor: 'white', fullscreen: true});
// Create an Animator object using the window as the coordinate system
var animator = Ti.UI.iOS.createAnimator({referenceView: win});
// Create a default collision behavior, using the window edges as boundaries
var collision = Ti.UI.iOS.createCollisionBehavior();
// Listen for collisions
function report(e) {
Ti.API.info(JSON.stringify(e.type));
};
collision.addEventListener('itemcollision', report);
collision.addEventListener('boundarycollision', report);
// Simulate Earth's gravity
var gravity = Ti.UI.iOS.createGravityBehavior({
gravityDirection: {x: 0.0, y: 1.0}
});
var WIDTH = Ti.Platform.displayCaps.platformWidth;
var HEIGHT = Ti.Platform.displayCaps.platformHeight;
// Create a bunch of random blocks; add to the window and behaviors
var blocks = [];
for (var i = 0; i < 25; i++) {
var r = Math.round(Math.random() * 255);
var g = Math.round(Math.random() * 255);
var b = Math.round(Math.random() * 255);
var rgb = 'rgb(' + r +"," + g + "," + b + ")";
blocks[i] = Ti.UI.createView({
width: 25,
height: 25,
top: Math.round(Math.random() * (HEIGHT / 4) + 25),
left: Math.round(Math.random() * (WIDTH - 25) + 25),
backgroundColor: rgb
});
win.add(blocks[i]);
collision.addItem(blocks[i]);
gravity.addItem(blocks[i]);
}
animator.addBehavior(collision);
animator.addBehavior(gravity);
// Start the animation when the window opens
win.addEventListener('open', function(e){
animator.startAnimator();
});
win.open();
</code></pre>
*/
/**
* @event boundarycollision
* <p>Fired when an item collides with a boundary.</p>
* @param {Titanium.UI.View} item
<p>Item that collided with the boundary.</p>
* @param {String} identifier
<p>Identifier of the boundary the item collided with.</p>
* @param {Point} point
<p>Point of the collision when it started. Only returned when <code>start</code> is <code>true</code>.</p>
* @param {Boolean} start
<p>Returns <code>true</code> if the collision started else <code>false</code>.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event itemcollision
* <p>Fired when two items collide.</p>
* @param {Titanium.UI.View} item1
<p>Item that collided with <code>item2</code>.</p>
* @param {Titanium.UI.View} item2
<p>Item that collided with <code>item1</code>.</p>
* @param {Point} point
<p>Point of the collision when it started. Only returned when <code>start</code> is <code>true</code>.</p>
* @param {Boolean} start
<p>Returns <code>true</code> if the collision started else <code>false</code>.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method addBoundary
* <p>Adds a boundary to this behavior.</p>
* @param {BoundaryIdentifier} boundary
<p>Boundary to add to the behavior.</p>
*/
/**
* @method addItem
* <p>Adds an item to this behavior.</p>
* @param {Titanium.UI.View} item
<p>View object to add to the behavior.</p>
*/
/**
* @method removeAllBoundaries
* <p>Removes all boundaries from this behavior.</p>
*/
/**
* @method removeBoundary
* <p>Removes the specified boundary from this behavior.</p>
* @param {BoundaryIdentifier} boundary
<p>Boundary to remove.</p>
*/
/**
* @method removeItem
* <p>Removes the specified item from this behavior.</p>
* @param {Titanium.UI.View} item
<p>Item to remove.</p>
*/
/**
* @method getBoundaryIdentifiers
* <p>Gets the value of the {@link Titanium.UI.iOS.CollisionBehavior#property-boundaryIdentifiers} property.</p>
* @returns {BoundaryIdentifier[]}
*/
/**
* @method getCollisionMode
* <p>Gets the value of the {@link Titanium.UI.iOS.CollisionBehavior#property-collisionMode} property.</p>
* @returns {Number}
*/
/**
* @method setCollisionMode
* <p>Sets the value of the {@link Titanium.UI.iOS.CollisionBehavior#property-collisionMode} property.</p>
* @param {Number} collisionMode
<p>New value for the property.</p>
*/
/**
* @method getItems
* <p>Gets the value of the {@link Titanium.UI.iOS.CollisionBehavior#property-items} property.</p>
* @returns {Titanium.UI.View[]}
*/
/**
* @method getReferenceInsets
* <p>Gets the value of the {@link Titanium.UI.iOS.CollisionBehavior#property-referenceInsets} property.</p>
* @returns {ReferenceInsets}
*/
/**
* @method setReferenceInsets
* <p>Sets the value of the {@link Titanium.UI.iOS.CollisionBehavior#property-referenceInsets} property.</p>
* @param {ReferenceInsets} referenceInsets
<p>New value for the property.</p>
*/
/**
* @method getTreatReferenceAsBoundary
* <p>Gets the value of the {@link Titanium.UI.iOS.CollisionBehavior#property-treatReferenceAsBoundary} property.</p>
* @returns {Boolean}
*/
/**
* @method setTreatReferenceAsBoundary
* <p>Sets the value of the {@link Titanium.UI.iOS.CollisionBehavior#property-treatReferenceAsBoundary} property.</p>
* @param {Boolean} treatReferenceAsBoundary
<p>New value for the property.</p>
*/
/**
* @property boundaryIdentifiers
* @type BoundaryIdentifier[]
* @readonly
* <p>Boundary identfiers added to this behavior.</p>
*/
/**
* @property [collisionMode={@link Titanium.UI.iOS#property-COLLISION_MODE_ALL}]
* @type Number
* <p>Specifies the collision behavior.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-COLLISION_MODE_ALL}
<li> {@link Titanium.UI.iOS#property-COLLISION_MODE_BOUNDARY}
<li> {@link Titanium.UI.iOS#property-COLLISION_MODE_ITEM}
</ul></p>
*/
/**
* @property items
* @type Titanium.UI.View[]
* @readonly
* <p>Items added to this behavior.</p>
*/
/**
* @property [referenceInsets=All insets are zero.]
* @type ReferenceInsets
* <p>Insets to apply when using the animator's reference view as the boundary.</p>
* @description <p>The <code>treatReferenceAsBoundary</code> property needs to be set to <code>true</code> to use this property.</p>
*/
/**
* @property [treatReferenceAsBoundary=true]
* @type Boolean
* <p>Use the animator's reference view as the boundary.</p>
* @description <p>Set to <code>true</code> to enable this behavior or <code>false</code> to disable it.</p>
*/
/**
* @class BoundaryIdentifier
* @platform iphone 3.2
* @platform ipad 3.2
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/CollisionBehavior.yml
* <p>Dictionary to specify a boundary identifier for {@link Titanium.UI.iOS.CollisionBehavior#method-addBoundary}.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
*/
/**
* @property identifier
* @type String
* <p>Arbitrary identifier for the boundary</p>
*/
/**
* @property point1
* @type Point
* <p>Start point for the boundary</p>
*/
/**
* @property point2
* @type Point
* <p>End point for the boundary</p>
*/
/**
* @class ReferenceInsets
* @platform iphone 3.2
* @platform ipad 3.2
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/CollisionBehavior.yml
* <p>Dictionary to specify edge insets for {@link Titanium.UI.iOS.CollisionBehavior#property-referenceInsets}.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
*/
/**
* @property top
* @type Number
* <p>Top inset.</p>
*/
/**
* @property left
* @type Number
* <p>Left inset.</p>
*/
/**
* @property right
* @type Number
* <p>Right inset.</p>
*/
/**
* @property bottom
* @type Number
* <p>Bottom inset.</p>
*/
/**
* @class Titanium.UI.iOS.CoverFlowView
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/CoverFlowView.yml
* <p>The cover flow view is a container showing animated three-dimensional images in a style
consistent with the cover flow presentation style used for iPod, iTunes, and file browsing.</p>
* @description <p>The cover flow view is created by the {@link Titanium.UI.iOS#method-createCoverFlowView} method or
<strong><code><CoverFlowView></code></strong> element in an Alloy application.</p>
* <h3>Examples</h3>
<h4>Simple 3 image cover flow example</h4>
<p>Create a simple cover flow view.</p>
<pre><code>var view = Titanium.UI.iOS.createCoverFlowView({
backgroundColor:'#000',
images:['a.png','b.png','c.png']
});
window.add(view);
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<pre><code><Alloy>
<Window id="window">
<CoverFlowView id="view" platform="ios" backgroundColor="#000">
<!-- The Images tag sets the CoverFlowView.images property. -->
<Images>
<!-- Assign the image by node text or the image attribute. -->
<!-- Can also specify the width and height attributes. -->
<Image>a.png</Image>
<Image>b.png</Image>
<Image>c.png</Image>
</Images>
<!-- Place additional views for the CoverFlowView here. -->
</CoverFlowView>
</Window>
</Alloy>
</code></pre>
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 1.8.0
* @platform ipad 1.8.0
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event click
* <p>Fired when the user clicks on the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} index
<p>Index of the image that is now visible.</p>
* @param {Number} previous
<p>Index of the previously-visible image.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event change
* <p>Fired when the user changes the image using a gesture.</p>
* @param {Number} index
<p>Index of the image that is now visible.</p>
* @param {Number} previous
<p>Index of the previously-visible image.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method setImage
* <p>Changes the image for a specified index.</p>
* @description <p>To specify a size for the image, you may pass the image as a simple dictionary, as defined
in {@link CoverFlowImageType}. If you specify a size, the size must be exact, not a
percentage size. </p>
<p>If the image is passed as a <code>File</code> object or file path, the filename is checked. If the
filename includes the '@2x' or '@3x' string used to identify high-resolution images for the Retina (HD)
display, the image is treated accordingly.</p>
* @param {Number} index
<p>Index to add the image at.</p>
* @param {String/Titanium.Blob/Titanium.Filesystem.File/CoverFlowImageType} image
<p>Image to add at this index.</p>
*/
/**
* @method getImages
* <p>Gets the value of the {@link Titanium.UI.iOS.CoverFlowView#property-images} property.</p>
* @returns {String[]/Titanium.Blob[]/Titanium.Filesystem.File[]/CoverFlowImageType[]}
*/
/**
* @method setImages
* <p>Sets the value of the {@link Titanium.UI.iOS.CoverFlowView#property-images} property.</p>
* @param {Array<String>/Array<Titanium.Blob>/Array<Titanium.Filesystem.File>/Array<CoverFlowImageType>} images
<p>New value for the property.</p>
*/
/**
* @method getSelected
* <p>Gets the value of the {@link Titanium.UI.iOS.CoverFlowView#property-selected} property.</p>
* @returns {Number}
*/
/**
* @method setSelected
* <p>Sets the value of the {@link Titanium.UI.iOS.CoverFlowView#property-selected} property.</p>
* @param {Number} selected
<p>New value for the property.</p>
*/
/**
* @property images
* @type String[]/Titanium.Blob[]/Titanium.Filesystem.File[]/CoverFlowImageType[]
* <p>Images to display in the view.</p>
* @description <p>In an Alloy application, you can use a <code><Images></code> element.</p>
*/
/**
* @property selected
* @type Number
* <p>Index to make selected.</p>
*/
/**
* @class CoverFlowImageType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/CoverFlowView.yml
* <p>Simple object for defining a single image in a cover flow view.</p>
* @description <p>If supplied, the <code>width</code> and <code>height</code> values must be exact values, not a percentage size.</p>
<p>If the size specified is different to the size of the image, the image is cropped and/or scaled
to fit the specified size.</p>
*/
/**
* @property image
* @type String/Titanium.Blob/Titanium.Filesystem.File
* <p>Image to use, as a local file URL, <code>Blob</code>, or <code>File</code>.</p>
*/
/**
* @property width
* @type Number
* <p>Display width for the image, in Apple points.</p>
*/
/**
* @property height
* @type Number
* <p>Display height of the image, in Apple points.</p>
*/
/**
* @class Titanium.UI.iOS.DocumentViewer
* @platform iphone 2.1.1
* @platform ipad 2.1.1
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/DocumentViewer.yml
* <p>A DocumentViewer provides in-app support for managing user interactions with files on the
local system.</p>
* @description <p>The DocumentViewer is created by the {@link Titanium.UI.iOS#method-createDocumentViewer} method.</p>
<p>Use this class to present an user interface for previewing files,
such as an e-mail program that previews attachments.</p>
<p>The DocumentViewer displays previews for the following document types:</p>
<ul>
<li>Microsoft Office (DOC, XLS, PPT) (Office 97-2004), the XML versions are not supported</li>
<li>Portable Document Format files (PDF)</li>
<li>Images (JPEG, GIF, PNG)</li>
<li>Rich Text Format files (RTF)</li>
<li>HTML and XML files</li>
<li>Plain text files</li>
<li>Comma-separated value files (CSV)</li>
</ul>
<p>Note: Using HTML content in the DocumentViewer is not recommended, since it does not support
all HTML-capabilities. Please use {@link Titanium.UI.WebView} to display complex HTML files.</p>
<p>You can launch the document either in the document viewer or with another application with the
options menu. To use the options menu, you need to specify a view with the <code>show</code> method to
anchor the options menu to.</p>
<p>In the document viewer, click the <strong>Done</strong> button to dismiss the document viewer or click the
right navigation button to open the options menu to perform another action with the document,
such as printing the document or opening the document in another application.</p>
* <h3>Examples</h3>
<h4>Document Viewer Example</h4>
<p>In the example below, the navigation bar's right button opens the options menu,
while the window button immediately launches the document in the document viewer.</p>
<pre><code>var win = Ti.UI.createWindow();
// Use a NavigationWindow to create a navigation bar for the window
var navWin = Ti.UI.iOS.createNavigationWindow({window: win});
var navButton = Titanium.UI.createButton({title:'Launch'});
win.RightNavButton = navButton;
var winButton = Titanium.UI.createButton({
title:'Launch',
height:40,
width:200,
top:270
});
win.add(winButton);
// Create a document viewer to preview a PDF file
docViewer = Ti.UI.iOS.createDocumentViewer({url:'Example.pdf'});
// Opens the options menu and when the user clicks on 'Quick Look'
// the document viewer launches with an animated transition
navButton.addEventListener('click', function(){
docViewer.show({view:navButton, animated: true});
});
// The document viewer immediately launches without an animation
winButton.addEventListener('click', function(){docViewer.show()});
navWin.open();
</code></pre>
*/
/**
* @event load
* <p>Fires when the document is previewed.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
* @event menu
* <p>Fires when the options menu appears before the document is previewed.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event unload
* <p>Fires when the document is dismissed.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method hide
* <p>Dismisses the document viewer.</p>
* @param {DocumentViewerOptions} options (optional)
<p>Animation options.</p>
*/
/**
* @method show
* <p>Displays the document viewer over the current view.</p>
* @description <p>To show the options menu, set the <code>view</code> key of the options object.</p>
* @param {DocumentViewerOptions} options (optional)
<p>Display options.</p>
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.UI.iOS.DocumentViewer#property-name} property.</p>
* @returns {String}
*/
/**
* @method getUrl
* <p>Gets the value of the {@link Titanium.UI.iOS.DocumentViewer#property-url} property.</p>
* @returns {String}
*/
/**
* @method setUrl
* <p>Sets the value of the {@link Titanium.UI.iOS.DocumentViewer#property-url} property.</p>
* @param {String} url
<p>New value for the property.</p>
*/
/**
* @property name
* @type String
* @readonly
* <p>Name of the file (without the path).</p>
* @description <p>Only returns a value after the document has been previewed.</p>
*/
/**
* @property url
* @type String
* <p>URL of the document being previewed.</p>
*/
/**
* @class DocumentViewerOptions
* @platform iphone 2.1.1
* @platform ipad 2.1.1
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/DocumentViewer.yml
* <p>A simple object for specifying options when showing or dismissing a {@link Titanium.UI.iOS.DocumentViewer}.</p>
* @description <p>The <code>view</code> property does not apply to the <code>hide</code> method.</p>
*/
/**
* @property [animated=false]
* @type Boolean
* <p>Indicates whether to animate the transition.</p>
*/
/**
* @property view
* @type Titanium.UI.View
* <p>Anchors the options menu to the specified view.</p>
* @description <p>Only used with the <code>show</code> method.</p>
<p>Currently, this property can only be set to a button in the {@link Titanium.UI.iOS.Toolbar},
or the window's <code>leftNavButton</code> or <code>rightNavButton</code> property.</p>
<p>If this property is not specified, the <code>show</code> method launches the document in the viewer
without showing the options menu.</p>
*/
/**
* @class Titanium.UI.iOS.DynamicItemBehavior
* @platform iphone 3.2
* @platform ipad 3.2
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/DynamicItemBehavior.yml
* <p>Base dynamic configuration for an item.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>The following APIs are supported on iOS 7 and later.</p>
<p>A dynamic item behavior configures the physics attributes for one or more items. These
attributes, such as density and resistance, affects the behavior of the object when other behaviors,
such as push forces or collisions, are applied to it. To define a dynamic behavior for an item:</p>
<ol>
<li>Use the {@link Titanium.UI.iOS#method-createDynamicItemBehavior} method to create and define the behavior.</li>
<li>Use the {@link Titanium.UI.iOS.DynamicItemBehavior#method-addItem addItem} method to add items to the behavior.</li>
<li>Add the behavior to an {@link Titanium.UI.iOS.Animator Animator object}.</li>
</ol>
* <h3>Examples</h3>
<h4>Simple Example</h4>
<p>The following example create two blocks, which are pushed towards each other. Because the
red block is more dense and has higher resistance than the blue block, the red block moves
steadily to the left, while the blue block spins around unpredictably.</p>
<p><img src="images/animator/dynamicitem.gif" height="455" style="border:1px solid black"/></p>
<pre><code>var win = Ti.UI.createWindow({backgroundColor: 'white', fullscreen: true});
// Create an Animator object using the window as the coordinate system
var animator = Ti.UI.iOS.createAnimator({referenceView: win});
// Create a red block
var redBlock = Ti.UI.createView({
backgroundColor: 'red',
width: 25,
height: 25,
top: 25,
left: 25
});
// Change the physics attributes of the red block
var redDynamic = Ti.UI.iOS.createDynamicItemBehavior({
density: 20.0,
angularResistance: 1.0,
friction: 1.0,
resistance: 1.0,
allowsRotation: false
});
redDynamic.addItem(redBlock);
// Apply a left push to the red block
var redPush = Ti.UI.iOS.createPushBehavior({
pushDirection: {x: 2.0, y: 0.0}
});
redPush.addItem(redBlock);
// Create a blue block
var blueBlock = Ti.UI.createView({
backgroundColor: 'blue',
width: 50,
height: 50,
top: 25,
right: 25
});
// Change the physics attributes of the blue block
var blueDynamic = Ti.UI.iOS.createDynamicItemBehavior({
elasticity: 1.0,
});
blueDynamic.addItem(blueBlock);
// Apply a right push to the blue block
var bluePush = Ti.UI.iOS.createPushBehavior({
pushDirection: {x: -2.0, y: 0.0}
});
bluePush.addItem(blueBlock);
// Create the collision behavior so the items can collide
var collision = Ti.UI.iOS.createCollisionBehavior();
collision.addItem(redBlock);
collision.addItem(blueBlock);
animator.addBehavior(redDynamic);
animator.addBehavior(redPush);
animator.addBehavior(blueDynamic);
animator.addBehavior(bluePush);
animator.addBehavior(collision);
// Start the animation when the window opens
win.addEventListener('open', function(e){
animator.startAnimator();
});
win.add(redBlock);
win.add(blueBlock);
win.open();
</code></pre>
*/
/**
* @method addAngularVelocityForItem
* <p>Adds a specified angular velocity for the item.</p>
* @param {Titanium.UI.View} item
<p>Item to add the velocity for.</p>
* @param {Number} velocity
<p>Velocity to add or subtract in radians per second. If the current velocity is positive,
the item spins clockwise. A negative value means the item spins counter-clockwise.</p>
*/
/**
* @method addItem
* <p>Adds an item to this behavior.</p>
* @param {Titanium.UI.View} item
<p>View object to add to the behavior.</p>
*/
/**
* @method addLinearVelocityForItem
* <p>Adds a specified linear velocity for the item.</p>
* @param {Titanium.UI.View} item
<p>Item to add the velocity for.</p>
* @param {Point} velocity
<p>Velocity to add or substract in points per second in the x and y directions.</p>
*/
/**
* @method angularVelocityForItem
* <p>Returns the angular velocity of the item.</p>
* @param {Titanium.UI.View} item
<p>Item to retrieve the velocity of.</p>
* @returns {Number}
*/
/**
* @method linearVelocityForItem
* <p>Returns the linear velocity of the item.</p>
* @param {Titanium.UI.View} item
<p>Item to retrieve the velocity of.</p>
* @returns {Point}
*/
/**
* @method removeItem
* <p>Removes the specified item from this behavior.</p>
* @param {Titanium.UI.View} item
<p>Item to remove.</p>
*/
/**
* @method getAllowsRotation
* <p>Gets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-allowsRotation} property.</p>
* @returns {Boolean}
*/
/**
* @method setAllowsRotation
* <p>Sets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-allowsRotation} property.</p>
* @param {Boolean} allowsRotation
<p>New value for the property.</p>
*/
/**
* @method getAngularResistance
* <p>Gets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-angularResistance} property.</p>
* @returns {Number}
*/
/**
* @method setAngularResistance
* <p>Sets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-angularResistance} property.</p>
* @param {Number} angularResistance
<p>New value for the property.</p>
*/
/**
* @method getDensity
* <p>Gets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-density} property.</p>
* @returns {Number}
*/
/**
* @method setDensity
* <p>Sets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-density} property.</p>
* @param {Number} density
<p>New value for the property.</p>
*/
/**
* @method getElasticity
* <p>Gets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-elasticity} property.</p>
* @returns {Number}
*/
/**
* @method setElasticity
* <p>Sets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-elasticity} property.</p>
* @param {Number} elasticity
<p>New value for the property.</p>
*/
/**
* @method getFriction
* <p>Gets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-friction} property.</p>
* @returns {Number}
*/
/**
* @method setFriction
* <p>Sets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-friction} property.</p>
* @param {Number} friction
<p>New value for the property.</p>
*/
/**
* @method getItems
* <p>Gets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-items} property.</p>
* @returns {Titanium.UI.View[]}
*/
/**
* @method getResistance
* <p>Gets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-resistance} property.</p>
* @returns {Number}
*/
/**
* @method setResistance
* <p>Sets the value of the {@link Titanium.UI.iOS.DynamicItemBehavior#property-resistance} property.</p>
* @param {Number} resistance
<p>New value for the property.</p>
*/
/**
* @property [allowsRotation=true]
* @type Boolean
* <p>Specifies if this item can rotate.</p>
* @description <p>Set to <code>true</code> to enable this behavior or <code>false</code> to disable.</p>
*/
/**
* @property [angularResistance=0]
* @type Number
* <p>Specifies the angular resistance of this item.</p>
* @description <p>The greater the value, the greater the angular damping and rotation slows to a stop faster.</p>
*/
/**
* @property [density=1]
* @type Number
* <p>Specifies the relative mass density of this item.</p>
* @description <p>An item's density along with its size determines its effective mass and affects its dynamic
behavior.</p>
*/
/**
* @property [elasticity=0]
* @type Number
* <p>Specifies the elasticity applied to collisions for this item.</p>
* @description <p>A value of 0.0 indicates no bounce upon collision, while 1.0 indicates a completely elastic
collision.</p>
*/
/**
* @property [friction=0]
* @type Number
* <p>Specifies the linear resistance of the item when it slides against another item.</p>
* @description <p>A value of 0.0 indicates no friction, while 1.0 indicates strong friction. Use higher
numbers to apply even higher friction.</p>
*/
/**
* @property items
* @type Titanium.UI.View[]
* @readonly
* <p>Items added to this behavior.</p>
*/
/**
* @property [resistance=0]
* @type Number
* <p>Specifies the linear resistance of this item which reduces linear velocity over time.</p>
* @description <p>A value of 0.0 indicates no velocity damping.</p>
*/
/**
* @class Titanium.UI.iOS.FeedbackGenerator
* @platform iphone 6.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/FeedbackGenerator.yml
* <p>The feedback generator API is introduced in iOS 10 to handle the haptic feedback when using an iPhone 7 or
later devices.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @description <p>On supported devices, haptics provide a way to physically engage users with tactile feedback that gets attention and
reinforces actions. Some system-provided interface elements, such as pickers, switches, and sliders, automatically provide
haptic feedback as users interact with them. Your app can also ask the system to generate different types of haptic feedback.
iOS manages the strength and behavior of this feedback.</p>
<p>There are three different kind of feedback generators that can be used for different interaction scenarios:
1. <strong>Selection feedback</strong>: Indicates that a task or action, such as depositing a check or unlocking a vehicle, has completed,
failed, or produced a warning of some kind.. This feedback type can be used when specifying the
{@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_TYPE_SELECTION} constant in the <code>type</code> property of the feedback generator.</p>
<ol>
<li><p><strong>Impact feedback</strong>: Provides a physical metaphor that complements the visual experience. For example, the user might feel
a thud when a view slides into place or two objects collide. This feedback type can be used when specifying the
{@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_TYPE_IMPACT} constant in the <code>type</code> property of the feedback generator. Note that if you use
this generator type, you also have to specify the <code>style</code> property that can be one of the
{@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_IMPACT_STYLE_LIGHT}, {@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_IMPACT_STYLE_MEDIUM} or
{@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_IMPACT_STYLE_HEAVY} constant.</p></li>
<li><p><strong>Notification feedback</strong>: Indicates that the selection is actively changing. For example, the user feels light taps while
scrolling a picker wheel. This feedback is intended for communicating movement through a series of discrete values, not
making or confirming a selection. This feedback type can be used when using the {@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_TYPE_NOTIFICATION}
constant in the <code>type</code> property of the feedback generator.</p>
<p>See also:</p>
<ul><li><a href="https://developer.apple.com/ios/human-interface-guidelines/interaction/feedback/">iOS Developer Library: Haptic Feedback</a></li></ul></li>
</ol>
*/
/**
* @method prepare
* <p>Used to prepare the haptic sensor for the upcoming interaction with it.</p>
* @description <p>Apple recommends to use this method before calling one of the <code>selectionChanged</code>,
<code>impactOccurred</code> or <code>notificationOccurred</code> methods to reduce a possible latency. </p>
*/
/**
* @method selectionChanged
* <p>Used to trigger a haptic feedback after a selection has been made.</p>
* @description <p>Note that this method can only be used if the feeback generator type is set to
{@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_TYPE_SELECTION}.</p>
*/
/**
* @method impactOccurred
* <p>Used to trigger a haptic feedback after an impact occurred.</p>
* @description <p>Note that this method can only be used if the feeback generator type is set to
{@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_TYPE_IMPACT}.</p>
*/
/**
* @method notificationOccurred
* <p>Used to trigger a haptic feedback after a notification has been received.</p>
* @description <p>Note that this method can only be used if the feeback generator type is set to
{@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_TYPE_NOTIFICATION}. The single argument provided is one of the</p>
* @param {String} notificationType
<p>The type of the notification to manage the peculiarity of the haptic feedback. If this
parameter is not specified, an error will be thrown.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_NOTIFICATION_TYPE_SUCCESS}
<li> {@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_NOTIFICATION_TYPE_WARNING}
<li> {@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_NOTIFICATION_TYPE_ERROR}
</ul></p>
*/
/**
* @method getType
* <p>Gets the value of the {@link Titanium.UI.iOS.FeedbackGenerator#property-type} property.</p>
* @returns {Number}
*/
/**
* @method setType
* <p>Sets the value of the {@link Titanium.UI.iOS.FeedbackGenerator#property-type} property.</p>
* @param {Number} type
<p>New value for the property.</p>
*/
/**
* @property type
* @type Number
* @creationOnly
*
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_TYPE_SELECTION}
<li> {@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_TYPE_IMPACT}
<li> {@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_TYPE_NOTIFICATION}
</ul></p>
*/
/**
* @class Titanium.UI.iOS.GravityBehavior
* @platform iphone 3.2
* @platform ipad 3.2
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/GravityBehavior.yml
* <p>Gravitational force to apply to an item.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>The following APIs are supported on iOS 7 and later.</p>
<p>A gravity behavior configures the gravity vector of one or more items. To define a gravity
behavior:</p>
<ol>
<li>Use the {@link Titanium.UI.iOS#method-createGravityBehavior} method to create and define the behavior.</li>
<li>To define a gravity vector, either set the
{@link Titanium.UI.iOS.GravityBehavior#property-angle angle} and
{@link Titanium.UI.iOS.GravityBehavior#property-magnitude magnitude} properties, or set the
{@link Titanium.UI.iOS.GravityBehavior#property-gravityDirection gravityDirection} property.</li>
<li>Use the {@link Titanium.UI.iOS.GravityBehavior#method-addItem addItem} method to add items to the behavior.</li>
<li>Add the behavior to an {@link Titanium.UI.iOS.Animator Animator object}.</li>
</ol>
<p>You can only define one gravity behavior per animator.</p>
* <h3>Examples</h3>
<h4>Simple Example</h4>
<p>The following example creates many random blocks. The initial gravitational force pulls the
blocks downward. Clicking on the <code>Change</code> button generates a new random gravity vector,
which pulls the blocks in a random direction.</p>
<p><img src="images/animator/gravity.gif" height="455" style="border:1px solid black"/></p>
<pre><code>var win = Ti.UI.createWindow({backgroundColor: 'white', fullscreen: true});
// Create an Animator object using the window as the coordinate system
var animator = Ti.UI.iOS.createAnimator({referenceView: win});
// Create a default collision behavior, using the window edges as boundaries
var collision = Ti.UI.iOS.createCollisionBehavior();
// Simulate Earth's gravity
var gravity = Ti.UI.iOS.createGravityBehavior({
gravityDirection: {x: 0.0, y: 1.0}
});
var WIDTH = Ti.Platform.displayCaps.platformWidth;
var HEIGHT = Ti.Platform.displayCaps.platformHeight;
// Create a bunch of random blocks; add to the window and behaviors
var blocks = [];
for (var i = 0; i < 20; i++) {
var r = Math.round(Math.random() * 255);
var g = Math.round(Math.random() * 255);
var b = Math.round(Math.random() * 255);
var rgb = 'rgb(' + r +"," + g + "," + b + ")";
blocks[i] = Ti.UI.createView({
width: 25,
height: 25,
top: Math.round(Math.random() * (HEIGHT - 25) + 25),
left: Math.round(Math.random() * (WIDTH - 25) + 25),
backgroundColor: rgb
});
win.add(blocks[i]);
collision.addItem(blocks[i]);
gravity.addItem(blocks[i]);
}
animator.addBehavior(collision);
animator.addBehavior(gravity);
// Start the animation when the window opens
win.addEventListener('open', function(e){
animator.startAnimator();
});
// Change the gravity vector when the button is clicked
var button = Ti.UI.createButton({title: 'Change'});
button.addEventListener('click', function(e){
gravity.gravityDirection = {
x: (1 - Math.random() * 2),
y: (1 - Math.random() * 2)
};
Ti.API.info('gravity vector: ' + JSON.stringify(gravity.gravityDirection));
});
win.add(button);
win.open();
</code></pre>
*/
/**
* @method addItem
* <p>Adds an item to this behavior.</p>
* @param {Titanium.UI.View} item
<p>View object to add to the behavior.</p>
*/
/**
* @method removeItem
* <p>Removes the specified item from this behavior.</p>
* @param {Titanium.UI.View} item
<p>Item to remove.</p>
*/
/**
* @method getAngle
* <p>Gets the value of the {@link Titanium.UI.iOS.GravityBehavior#property-angle} property.</p>
* @returns {Number}
*/
/**
* @method setAngle
* <p>Sets the value of the {@link Titanium.UI.iOS.GravityBehavior#property-angle} property.</p>
* @param {Number} angle
<p>New value for the property.</p>
*/
/**
* @method getGravityDirection
* <p>Gets the value of the {@link Titanium.UI.iOS.GravityBehavior#property-gravityDirection} property.</p>
* @returns {Point}
*/
/**
* @method setGravityDirection
* <p>Sets the value of the {@link Titanium.UI.iOS.GravityBehavior#property-gravityDirection} property.</p>
* @param {Point} gravityDirection
<p>New value for the property.</p>
*/
/**
* @method getItems
* <p>Gets the value of the {@link Titanium.UI.iOS.GravityBehavior#property-items} property.</p>
* @returns {Titanium.UI.View[]}
*/
/**
* @method getMagnitude
* <p>Gets the value of the {@link Titanium.UI.iOS.GravityBehavior#property-magnitude} property.</p>
* @returns {Number}
*/
/**
* @method setMagnitude
* <p>Sets the value of the {@link Titanium.UI.iOS.GravityBehavior#property-magnitude} property.</p>
* @param {Number} magnitude
<p>New value for the property.</p>
*/
/**
* @property [angle=0]
* @type Number
* <p>Specifies the angle of the gravity vector in radians.</p>
* @description <p>To configure the gravity vector, you need to also specify the
{@link Titanium.UI.iOS.GravityBehavior#property-magnitude magnitude} property.</p>
*/
/**
* @property [gravityDirection=(0, 0)]
* @type Point
* <p>Specifies the direction of the gravity vector as an x, y pair.</p>
* @description <p>For example, specifiying <code>{x: 0.0, y: 1.0}</code> indicates a downward gravity force of 1000
points per second squared.</p>
*/
/**
* @property items
* @type Titanium.UI.View[]
* @readonly
* <p>Items added to this behavior.</p>
*/
/**
* @property [magnitude=0]
* @type Number
* <p>Specifies the magnitude of the gravity vector.</p>
* @description <p>A value of 1.0 represents an acceleration of 1000 points per second squared.</p>
<p>To configure the gravity vector, you need to also specify the
{@link Titanium.UI.iOS.GravityBehavior#property-angle angle} property.</p>
*/
/**
* @class Titanium.UI.iOS.ListViewCellSelectionStyle
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/ListViewCellSelectionStyle.yml
* <p>A set of constants for the style that can be used for the <code>selectionStyle</code> property of a
ListItem, which is set in the <code>properties</code> dictionary of either the {@link ListDataItem} or
{@link ItemTemplate}.</p>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.ListViewCellSelectionStyle#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.ListViewCellSelectionStyle#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
/**
* @property BLUE
* @type Number
* @readonly
* <p>The cell when selected has a blue background. This is the default value.</p>
*/
/**
* @property GRAY
* @type Number
* @readonly
* <p>The cell when selected has a gray background.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>The cell has no distinct style for when it is selected.</p>
*/
/**
* @class Titanium.UI.iOS.ListViewScrollPosition
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/ListViewScrollPosition.yml
* <p>A set of constants for the position value that can be used for the <code>position</code> property of
<ListViewAnimationProperties> when invoking the ListView's <code>scrollToItem</code>, <code>appendSection</code>,
<code>deleteSectionAt</code>, <code>insertSectionAt</code> and <code>replaceSectionAt</code> methods.</p>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.ListViewScrollPosition#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.ListViewScrollPosition#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
/**
* @property BOTTOM
* @type Number
* @readonly
* <p>The list view scrolls the row of interest to the bottom of the visible list view.</p>
*/
/**
* @property MIDDLE
* @type Number
* @readonly
* <p>The list view scrolls the row of interest to the middle of the list table view.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>The table view scrolls the row of interest to be fully visible with a minimal movement.
If the row is already fully visible, no scrolling occurs. For example, if the row is above the
visible area, the behavior is identical to that specified by <code>TOP</code>. This is the default.</p>
*/
/**
* @property TOP
* @type Number
* @readonly
* <p>The list view scrolls the row of interest to the top of the visible list view.</p>
*/
/**
* @class Titanium.UI.iOS.ListViewStyle
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/ListViewStyle.yml
* <p>A set of constants for the style that can be used for the <code>style</code> property of
{@link Titanium.UI.ListView}.</p>
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.ListViewStyle#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.ListViewStyle#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
/**
* @property GROUPED
* @type Number
* @readonly
* <p>A list view whose sections present distinct groups of rows. The section headers and footers
do not float.</p>
*/
/**
* @property PLAIN
* @type Number
* @readonly
* <p>A plain list view. Any section headers or footers are displayed as inline separators and
float when the list view is scrolled.</p>
*/
/**
* @class Titanium.UI.iOS.LivePhoto
* @platform android 5.2.0
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @platform mobileweb 5.2.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/LivePhoto.yml
* <p>Abstract object representing a live photo used in {@link Titanium.UI.iOS.LivePhotoView}.</p>
* @description <p>Use the {@link Titanium.UI.iOS#method-createLivePhotoView} to assign the <code>livePhoto</code> property.
You can receive a LivePhoto by using the {@link Titanium.Media#method-openPhotoGallery openPhotoGallery} method.
iOS 9.1 only allows to select existing photos from the gallery, capturing new live photos is not
supported by the iOS public API, yet.</p>
<p>Note: This object only represents the proxy to hold a live photo and can not be created manually.</p>
*/
/**
* @class Titanium.UI.iOS.LivePhotoView
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/LivePhotoView.yml
* <p>A view to display a {@link Titanium.UI.iOS.LivePhoto} object introduced in iOS 9.1.</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>Use the {@link Titanium.UI.iOS#method-createLivePhotoView} method to create an new <code>LivePhotoView</code>.</p>
<p>Specifying either a <code>width</code> or <code>height</code> property for this view will scale its <code>livePhoto</code> with
the aspect ratio maintained, up to a maximum size that does not exceed its parent view.</p>
<p>For more infos on Live Photo's, refer to the official <a href="https://developer.apple.com/library/prerelease/ios/documentation/PhotosUI/Reference/PHLivePhotoView_Class/index.html">Apple documentation</a>.</p>
* <h3>Examples</h3>
<h4>Basic LivePhotoView</h4>
<p>The following example shows how to create a simple Ti.UI.iOS.LivePhotoView:</p>
<pre><code>var window = Ti.UI.createWindow({
backgroundColor: "white"
});
var btn1 = Ti.UI.createButton({
title: "Select live photo!",
top: 30
});
btn1.addEventListener("click", openGallery);
window.add(btn1);
window.open();
function openGallery() {
Ti.Media.openPhotoGallery({
mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO, Ti.Media.MEDIA_TYPE_LIVEPHOTO],
success: function(e) {
var livePhoto = e.livePhoto // Live photo of type Ti.UI.iOS.LivePhoto
if (livePhoto) {
var livePhotoView = Ti.UI.iOS.createLivePhotoView({
livePhoto: livePhoto,
muted: true,
width: 300
});
livePhotoView.addEventListener("start", function(e) {
Ti.API.warn("-- Start playback --");
Ti.API.warn(e);
});
livePhotoView.addEventListener("stop", function(e) {
Ti.API.warn("-- Stop playback --");
Ti.API.warn(e);
});
window.add(livePhotoView);
}
}
});
}
</code></pre>
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event click
* @hide
* <p>Fired when the device detects a click against the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event postlayout
* @hide
* <p>Fired when a layout cycle is finished.</p>
* @description <p>This event is fired when the view and its ancestors have been laid out.
The {@link Titanium.UI.View#property-rect rect} and {@link Titanium.UI.View#property-size size} values
should be usable when this event is fired.</p>
<p>This event is typically triggered by either changing layout
properties or by changing the orientation of the device. Note that changing the
layout of child views or ancestors can also trigger a relayout of this view.
On Mobile Web, this event can also be triggered by resizing the browser window.</p>
<p>Note that altering any properties that affect layout from the <code>postlayout</code> callback
may result in an endless loop.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event start
* <p>Fired when the Live Photo playback starts.</p>
* @param {Number} playbackStyle
<p>Returns the <code>playbackStyle</code> that was provided to start the playback.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event stop
* <p>Fired when the Live Photo playback stops.</p>
* @param {Number} playbackStyle
<p>Returns the <code>playbackStyle</code> that was provided to start the playback.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method startPlaybackWithStyle
* <p>Begins playback of Live Photo content in the view.</p>
* @description <p>Use the <code>playbackStyle</code> parameter to choose whether to play the full motion and sound content of the
Live Photo or only a brief section.</p>
<p>Typically, an app does not need to directly control playback, because a Live Photo view provides interactive
playback control. Use this method only when non-interactive playback is appropriate-for example, to briefly
animate the content to indicate that a view contains a Live Photo rather than a still image.</p>
* @param {Number} playbackStyle
<p>An option for how much of the Live Photo's motion and sound content to play.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-LIVEPHOTO_PLAYBACK_STYLE_FULL}
<li> {@link Titanium.UI.iOS#property-LIVEPHOTO_PLAYBACK_STYLE_HINT}
</ul></p>
*/
/**
* @method stopPlayback
* <p>Ends playback of Live Photo content in the view.</p>
*/
/**
* @method getLivePhoto
* <p>Gets the value of the {@link Titanium.UI.iOS.LivePhotoView#property-livePhoto} property.</p>
* @returns {Titanium.UI.iOS.LivePhoto}
*/
/**
* @method setLivePhoto
* <p>Sets the value of the {@link Titanium.UI.iOS.LivePhotoView#property-livePhoto} property.</p>
* @param {Titanium.UI.iOS.LivePhoto} livePhoto
<p>New value for the property.</p>
*/
/**
* @method getMuted
* <p>Gets the value of the {@link Titanium.UI.iOS.LivePhotoView#property-muted} property.</p>
* @returns {Boolean}
*/
/**
* @method setMuted
* <p>Sets the value of the {@link Titanium.UI.iOS.LivePhotoView#property-muted} property.</p>
* @param {Boolean} muted
<p>New value for the property.</p>
*/
/**
* @property livePhoto
* @type Titanium.UI.iOS.LivePhoto
* <p>The Live Photo displayed in the view.</p>
* @description <p>You receive a new live photo object by selecting an existing photo from the photo gallery.
Note: iOS 9.1 only allows to select existing photos from the gallery, capturing new live
photos is not supported by the iOS public API, yet.</p>
*/
/**
* @property [muted=false]
* @type Boolean
* <p>A Boolean value that determines whether the view plays the audio content of its Live Photo.</p>
* @description <p>The default value is <code>false</code>, indicating that the view plays audio content along with the motion
content of its Live Photo. Change this value to <code>true</code> to play motion content but not audio content.</p>
*/
* @class Titanium.UI.iOS.MenuPopup
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/MenuPopup.yml
* <p>A menu popup provides the ability to create custom tooltip options using the <code>items</code> property
covering the native <code>UIMenuController</code> class.</p>
<p>See also:</p>
<ul>
<li><a href="https://developer.apple.com/library/prerelease/ios/documentation/iPhone/Reference/UIMenuController_Class/index.html">iOS Developer Library: UIMenuController</a></li>
</ul>
* <h3>Examples</h3>
<h4>Example using multiple `items` and a `click` event.</h4>
<p>The example below creates a new menu popup and shows it when the user clicks on the button.</p>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: "#fff",
});
var button = Ti.UI.createButton({
title: "Show options"
});
win.add(button);
var menu = Ti.UI.iOS.createMenuPopup({
items: ["Option 1", "Option 2"]
});
menu.addEventListener("click", function(e) {
alert(e);
});
button.addEventListener("click", function() {
menu.show({
view: button
});
});
win.open();
</code></pre>
*/
* @event click
* <p>Fired when the user clicks at one of the menu popup items.</p>
* @description <p>This event provides the properties <code>title</code> and <code>index</code> which relate to the name and position
of the clicked item inside the <code>items</code> property.</p>
* @param {Number} index
<p>The index of the clicked item.</p>
* @param {String} title
<p>The title of the clicked item.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
* @method show
* <p>Shows the menu popup.</p>
* @param {MenuPopupShowParams} params
<p>Includes options how the menu popup should be shown.</p>
*/
* @method hide
* <p>Hides the menu popup.</p>
* @param {MenuPopupHideParams} params (optional)
<p>Includes options how the menu popup should be hidden.</p>
*/
* @method isVisible
* <p>Indicates whether the menu popup is currently visible.</p>
*/
* @method getItems
* <p>Gets the value of the {@link Titanium.UI.iOS.MenuPopup#property-items} property.</p>
* @returns {String}
*/
* @method setItems
* <p>Sets the value of the {@link Titanium.UI.iOS.MenuPopup#property-items} property.</p>
* @param {String} items
<p>New value for the property.</p>
*/
* @property items
* @type String
* <p>The items of the menu popup.</p>
* @description <p>The items will be shown as soon in the menu popup when the <code>show</code> method is called.
To hide them again, use the <code>hide</code> method in conjunction.</p>
*/
* @class MenuPopupShowParams
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/MenuPopup.yml
* <p>Dictionary of options for showing a menu popup with {@link Titanium.UI.iOS.MenuPopup#method-show}.</p>
* @description <p>The parameters used when showing a menu popup. Must include the <code>view</code> property to tell the menu popup
at which view it should be shown. Also set the <code>animated</code> property to <code>false</code> if you want to show the
menu popup without an animation.</p>
*/
* @property view
* @type Titanium.UI.View
* <p>The view where the menu pop is shown at.</p>
*/
* @property [animated=true]
* @type Boolean
* <p>Determines whether the menu popup should be opened or closed animated.</p>
*/
* @property arrowDirection
* @type Number
* <p>Indicates the arrow direction of the menu popup.</p>
* @description <p>Use this property to indicate the menu popups arrow to use.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-MENU_POPUP_ARROW_DIRECTION_UP}
<li> {@link Titanium.UI.iOS#property-MENU_POPUP_ARROW_DIRECTION_DOWN}
<li> {@link Titanium.UI.iOS#property-MENU_POPUP_ARROW_DIRECTION_LEFT}
<li> {@link Titanium.UI.iOS#property-MENU_POPUP_ARROW_DIRECTION_RIGHT}
<li> {@link Titanium.UI.iOS#property-MENU_POPUP_ARROW_DIRECTION_DEFAULT}
</ul></p>
*/
* @class MenuPopupHideParams
* @platform iphone 5.2.0
* @platform ipad 5.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/MenuPopup.yml
* <p>Dictionary of options for hiding a menu popup with {@link Titanium.UI.iOS.MenuPopup#method-hide}.</p>
* @description <p>Set the <code>animated</code> property to <code>false</code> if you want to hide the menu popup without an animation.</p>
*/
* @property [animated=true]
* @type Boolean
* <p>Determines whether the menu popup should be opened or closed animated.</p>
*/
/**
* @class Titanium.UI.iOS.NavigationWindow
* @platform iphone 3.1.3
* @platform ipad 3.1.3
* @extends Titanium.UI.Window
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/NavigationWindow.yml
* <p>A <code>NavigationWindow</code> implements a specialized view that manages the navigation of hierarchical
content. </p>
* @description <p>You create a <code>NavigationWindow</code> with the {@link Titanium.UI.iOS#method-createNavigationWindow} factory method, or
a <code><NavigationWindow></code> Alloy element.</p>
<p>All <code>NavigationWindow</code> objects must have at least one root window that cannot be removed. When
creating a <code>NavigationWindow</code> with the factory method, you must set its <code>window</code> property to the
root level window. Equivalently, in an Alloy application, insert a <code><Window></code> element as a child of the
<code><NavigationWindow></code> element. See examples below.</p>
<p>This object is not meant to be added to other windows. However, it can be used within a {@link Titanium.UI.iPad.SplitWindow}.</p>
* <h3>Examples</h3>
<h4>Simple Navigation Window</h4>
<p>Creates a navigation window with the first window colored red.
Press the button to open the blue window.
Use the back button to return to the red root window.</p>
<pre><code>var win2 = Titanium.UI.createWindow({
backgroundColor: 'red',
title: 'Red Window'
});
var win1 = Titanium.UI.iOS.createNavigationWindow({
window: win2
});
var win3 = Titanium.UI.createWindow({
backgroundColor: 'blue',
title: 'Blue Window'
});
var button = Titanium.UI.createButton({
title: 'Open Blue Window'
});
button.addEventListener('click', function(){
win1.openWindow(win3, {animated:true});
});
win2.add(button);
var button2 = Titanium.UI.createButton({
title: 'Close Blue Window'
});
button2.addEventListener('click', function(){
win1.closeWindow(win3, {animated:false}); //win3.close() will also work!!
});
win3.add(button2);
win1.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as two Alloy view-controllers. Requires Alloy 1.2.2 and later.</p>
<p>app/views/index.xml:</p>
<pre><code><Alloy>
<NavigationWindow id="win1" platform="ios">
<Window id="win2" title="Red Window" backgroundColor="red">
<Button id="button" onClick="openBlueWindow">Open Blue Window</Button>
</Window>
</NavigationWindow>
</Alloy>
</code></pre>
<p>app/controllers/index.js:</p>
<pre><code>function openBlueWindow(e) {
var win3 = Alloy.createController('bluewin').getView();
$.win1.openWindow(win3);
}
$.win1.open();
</code></pre>
<p>app/views/bluewin.xml:</p>
<pre><code><Alloy>
<Window id="win3" title="Blue Window" backgroundColor="blue">
<Button onClick="closeWindow">Close Window</Button>
</Window>
</Alloy>
</code></pre>
<p>app/controllers/bluewin.js:</p>
<pre><code>function closeWindow(){
$.win3.close();
}
</code></pre>
*/
/**
* @method hideTabBar
* @hide
* <p>Hides the tab bar. Must be called before opening the window.</p>
* @description <p>To hide the tab bar when opening a window as a child of a tab, call
<code>hideTabBar</code> or set <code>tabBarHidden</code> to <code>true</code> <strong>before</strong> opening the window.</p>
<p>If the window is not a child of a tab, this method has no effect.</p>
*/
/**
* @method setToolbar
* @hide
* <p>Sets the array of items to show in the window's toolbar.</p>
* @param {Array<Object>} items
<p>Array of button objects to show in the window's toolbar.</p>
* @param {windowToolbarParam} params (optional)
<p>Parameters to control the toolbar appearance.</p>
*/
/**
* @method closeWindow
* <p>Closes a window and removes it from the navigation window.</p>
* @param {Titanium.UI.Window} window
<p>Window to close.</p>
* @param {Dictionary} options
<p>Options supporting a single <code>animated</code> boolean property to determine whether the window
will be animated (default) while being closed (default: true).</p>
*/
/**
* @method openWindow
* <p>Opens a window within the navigation window.</p>
* @param {Titanium.UI.Window} window
<p>Window to open.</p>
* @param {Dictionary} options
<p>Options supporting a single <code>animated</code> boolean property to determine whether the window
will be animated (default) while being opened (default: true).</p>
*/
/**
* @method popToRootWindow
* <p>Closes all windows that are currently opened inside the navigation window.</p>
* @description <p>Note that only the <code>close</code> event of the most recently opened window is fired.</p>
* @param {Dictionary} options
<p>Options supporting a single <code>animated</code> boolean property to determine whether the windows
will be animated (default) while being closed (default: false).</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method getBackButtonTitle
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-backButtonTitle} property.</p>
* @returns {String}
*/
/**
* @method setBackButtonTitle
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-backButtonTitle} property.</p>
* @param {String} backButtonTitle
<p>New value for the property.</p>
*/
/**
* @method getBackButtonTitleImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-backButtonTitleImage} property.</p>
* @returns {String/Titanium.Blob}
*/
/**
* @method setBackButtonTitleImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-backButtonTitleImage} property.</p>
* @param {String/Titanium.Blob} backButtonTitleImage
<p>New value for the property.</p>
*/
/**
* @method getBarColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-barColor} property.</p>
* @returns {String}
*/
/**
* @method setBarColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-barColor} property.</p>
* @param {String} barColor
<p>New value for the property.</p>
*/
/**
* @method getBarImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-barImage} property.</p>
* @returns {String}
*/
/**
* @method setBarImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-barImage} property.</p>
* @param {String} barImage
<p>New value for the property.</p>
*/
/**
* @method getHideShadow
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-hideShadow} property.</p>
* @returns {Boolean}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setHideShadow
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-hideShadow} property.</p>
* @param {Boolean} hideShadow
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getLeftNavButton
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-leftNavButton} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setLeftNavButton
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-leftNavButton} property.</p>
* @param {Titanium.UI.View} leftNavButton
<p>New value for the property.</p>
*/
/**
* @method getNavBarHidden
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-navBarHidden} property.</p>
* @returns {Boolean}
*/
/**
* @method setNavBarHidden
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-navBarHidden} property.</p>
* @param {Boolean} navBarHidden
<p>New value for the property.</p>
*/
/**
* @method getNavTintColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-navTintColor} property.</p>
* @returns {String}
*/
/**
* @method setNavTintColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-navTintColor} property.</p>
* @param {String} navTintColor
<p>New value for the property.</p>
*/
/**
* @method getRightNavButton
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-rightNavButton} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setRightNavButton
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-rightNavButton} property.</p>
* @param {Titanium.UI.View} rightNavButton
<p>New value for the property.</p>
*/
/**
* @method getShadowImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-shadowImage} property.</p>
* @returns {String}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setShadowImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-shadowImage} property.</p>
* @param {String} shadowImage
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getSwipeToClose
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-swipeToClose} property.</p>
* @returns {Boolean}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setSwipeToClose
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-swipeToClose} property.</p>
* @param {Boolean} swipeToClose
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getTabBarHidden
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-tabBarHidden} property.</p>
* @returns {Boolean}
*/
/**
* @method setTabBarHidden
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-tabBarHidden} property.</p>
* @param {Boolean} tabBarHidden
<p>New value for the property.</p>
*/
/**
* @method getTitleControl
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-titleControl} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setTitleControl
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-titleControl} property.</p>
* @param {Titanium.UI.View} titleControl
<p>New value for the property.</p>
*/
/**
* @method getTitleImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-titleImage} property.</p>
* @returns {String}
*/
/**
* @method setTitleImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-titleImage} property.</p>
* @param {String} titleImage
<p>New value for the property.</p>
*/
/**
* @method getTitlePrompt
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-titlePrompt} property.</p>
* @returns {String}
*/
/**
* @method setTitlePrompt
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-titlePrompt} property.</p>
* @param {String} titlePrompt
<p>New value for the property.</p>
*/
/**
* @method getTitlepromptid
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-titlepromptid} property.</p>
* @returns {String}
*/
/**
* @method setTitlepromptid
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-titlepromptid} property.</p>
* @param {String} titlepromptid
<p>New value for the property.</p>
*/
/**
* @method getToolbar
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-toolbar} property.</p>
* @returns {Object[]}
*/
/**
* @method setToolbar
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-toolbar} property.</p>
* @param {Array<Object>} toolbar
<p>New value for the property.</p>
*/
/**
* @method getTransitionAnimation
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-transitionAnimation} property.</p>
* @returns {Titanium.Proxy}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method setTransitionAnimation
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-transitionAnimation} property.</p>
* @param {Titanium.Proxy} transitionAnimation
<p>New value for the property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method getTranslucent
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-translucent} property.</p>
* @returns {Boolean}
*/
/**
* @method setTranslucent
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-translucent} property.</p>
* @param {Boolean} translucent
<p>New value for the property.</p>
*/
/**
* @method getUrl
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-url} property.</p>
* @removed 6.0.0
* @returns {String}
*/
/**
* @method setUrl
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-url} property.</p>
* @removed 6.0.0
* @param {String} url
<p>New value for the property.</p>
*/
/**
* @method getTitle
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getTitleid
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-titleid} property.</p>
* @returns {String}
*/
/**
* @method setTitleid
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-titleid} property.</p>
* @param {String} titleid
<p>New value for the property.</p>
*/
/**
* @method getWindow
* <p>Gets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-window} property.</p>
* @returns {Titanium.UI.Window}
*/
/**
* @method setWindow
* <p>Sets the value of the {@link Titanium.UI.iOS.NavigationWindow#property-window} property.</p>
* @param {Titanium.UI.Window} window
<p>New value for the property.</p>
*/
/**
* @property backButtonTitle
* @hide
* @type String
* <p>Title for the back button. This is only valid when the window is a child of a tab.</p>
*/
/**
* @property backButtonTitleImage
* @hide
* @type String/Titanium.Blob
* <p>The image to show as the back button. This is only valid when the window is a child of a tab.</p>
*/
/**
* @property barColor
* @hide
* @type String
* <p>Background color for the nav bar, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property barImage
* @hide
* @type String
* <p>Background image for the nav bar, specified as a URL to a local image.</p>
* @description <p>The behavior of this API on iOS has changed from version 3.2.0. Previous versions
of the SDK created a custom image view and inserted it as a child of the navigation bar.
The titanium sdk now uses the native call to set the background image of the navigation bar.
You can set it to a 1px transparent png to use a combination of <code>barColor</code> and <code>hideShadow:true</code>.</p>
*/
/**
* @property [hideShadow=false]
* @hide
* @type Boolean
* <p>Set this to true to hide the shadow image of the navigation bar.</p>
* @description <p>This property is only honored if a valid value is specified for the {@link Titanium.UI.Window#property-barImage barImage} property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property leftNavButton
* @hide
* @type Titanium.UI.View
* <p>View to show in the left nav bar area.</p>
* @description <p>In an Alloy application you can specify this property with a <code><LeftNavButton></code> element inside the
<code><Window></code> element, for example:</p>
<pre><code><Alloy>
<TabGroup>
<Tab>
<Window class="container">
<LeftNavButton platform=ios>
<Button title="Back" onClick="closeWindow" />
</LeftNavButton>
</Window>
</Tab>
</TabGroup>
</Alloy>
</code></pre>
*/
/**
* @property [navBarHidden=false]
* @hide
* @type Boolean
* <p>Hides the nav bar (<code>true</code>) or shows the nav bar (<code>false</code>).</p>
* @description <p>Must be specified at creation time or in the <code>options</code> dictionary passed to the
{@link Titanium.UI.Window#method-open Window.open} method.</p>
<h4>Android Platform Notes</h4>
<p>Since Release 3.3.0, due to changes to support the appcompat library, this property has no
effect. By default, the action bar is always displayed. To hide the action bar, see the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Android_Action_Bar">Android Action Bar guide</a>.</p>
<p>Prior to Release 3.2.0, setting this property forces the creation of a heavyweight window. See "Android
Heavyweight and Lightweight Windows" in the main description of this class for more
information. Setting this property to true disables the Action Bar since it is part of the navigation title bar.</p>
<h4>iOS Platform Notes</h4>
<p>Since Release 3.1.3, this is no longer a valid parameter passed to the {@link Titanium.UI.Window#method-open Window.open} method.
Modal windows on iOS no longer have a navigation controller and hence <strong>do not</strong> have a nav bar.</p>
*/
/**
* @property [navTintColor=]
* @hide
* @type String
* <p>The tintColor to apply to the navigation bar. This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of NavigationBar on iOS.</p>
*/
/**
* @property rightNavButton
* @hide
* @type Titanium.UI.View
* <p>View to show in the right nav bar area.</p>
* @description <p>In an Alloy application you can specify this property with a <code><RightNavButton></code> element in the
<code><Window></code> element, for example:</p>
<pre><code><Alloy>
<TabGroup>
<Tab>
<Window class="container">
<RightNavButton platform=ios>
<Button title="Back" onClick="closeWindow" />
</RightNavButton>
</Window>
</Tab>
</TabGroup>
</Alloy>
</code></pre>
*/
/**
* @property shadowImage
* @hide
* @type String
* <p>Shadow image for the navigation bar, specified as a URL to a local image..</p>
* @description <p>This property is only honored if a valid value is specified for the {@link Titanium.UI.Window#property-barImage barImage} property.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [swipeToClose=true]
* @hide
* @type Boolean
* <p>Boolean value indicating if the user should be able to close a window using a swipe gesture.</p>
* @description <p>If <code>false</code> the user will not be able to swipe from the left edge of the window to close it.
Note: This property is only used for a window being embedded in a {@link Titanium.UI.Tab Ti.UI.Tab} or
{@link Titanium.UI.iOS.NavigationWindow Ti.UI.iOS.NavigationWindow}. It is enabled by default.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property tabBarHidden
* @hide
* @type Boolean
* <p>Boolean value indicating if the tab bar should be hidden. </p>
* @description <p><code>tabBarHidden</code> must be set <strong>before</strong> opening the window.</p>
<p>This property is only valid when the window is the child of a tab.</p>
*/
/**
* @property titleControl
* @hide
* @type Titanium.UI.View
* <p>View to show in the title area of the nav bar.</p>
* @description <p>In an Alloy application you can specify this property using a <code><TitleControl></code> element inside
<code><Window></code>, for example:</p>
<pre><code><Alloy>
<Window>
<RightNavButton>
<Button title="Back" />
</RightNavButton>
<LeftNavButton>
<Button title="Back" />
</LeftNavButton>
<TitleControl>
<View backgroundColor="blue" height="100%" width="100%"></View>
</TitleControl>
</Window>
</Alloy>
</code></pre>
*/
/**
* @property titleImage
* @hide
* @type String
* <p>Image to show in the title area of the nav bar, specified as a local file path or URL.</p>
*/
/**
* @property titlePrompt
* @hide
* @type String
* <p>Title prompt for the window.</p>
*/
/**
* @property titlepromptid
* @hide
* @type String
* <p>Key identifying a string from the locale file to use for the window title prompt.</p>
* @description <p>Only one of <code>titlePrompt</code> or <code>titlepromptid</code> should be specified.</p>
*/
/**
* @property toolbar
* @hide
* @type Object[]
* <p>Array of button objects to show in the window's toolbar.</p>
* @description <p>The toolbar is only shown when the window is inside a {@link Titanium.UI.iOS.NavigationWindow}.
To display a toolbar when a window is not inside a NavigationWindow, add an instance of a
{@link Titanium.UI.iOS.Toolbar} to the window.</p>
<p>To customize the toolbar, use the {@link Titanium.UI.Window#method-setToolbar setToolbar()} method.</p>
<p>Since Alloy 1.6.0, you can specify this property using the <code><WindowToolbar></code> element as a
child of a <code><Window></code> element, for example:</p>
<pre><code><Alloy>
<NavigationWindow>
<Window>
<WindowToolbar>
<Button id="send" title="Send" style="Ti.UI.iPhone.SystemButtonStyle.DONE" />
<FlexSpace/>
<Button id="camera" systemButton="Ti.UI.iPhone.SystemButton.CAMERA" />
<FlexSpace/>
<Button id="cancel" systemButton="Ti.UI.iPhone.SystemButton.CANCEL" />
</WindowToolbar>
</Window>
</NavigationWindow>
</Alloy>
</code></pre>
*/
/**
* @property transitionAnimation
* @hide
* @type Titanium.Proxy
* <p>Use a transition animation when opening or closing windows in a
{@link Titanium.UI.iOS.NavigationWindow} or {@link Titanium.UI.Tab}.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Create the transition animation using the {@link Titanium.UI.iOS#method-createTransitionAnimation}
method.</p>
<p>Supported on iOS 7 and later.</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property [translucent=true on iOS7 and above, false otherwise.]
* @hide
* @type Boolean
* <p>Boolean value indicating if the nav bar is translucent.</p>
*/
/**
* @property url
* @hide
* @type String
* @creationOnly
* <p>Loads a JavaScript file from a local URL.</p>
* @removed 6.0.0
* @description <p><strong>Note:</strong> The recommended way of creating windows with their own context is to either use the
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Framework">Alloy Framework</a> or a
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/CommonJS_Modules_in_Titanium">CommonJS module</a>
than using this property. One benefit of using a CommonJS module is that it consumes less
resources.</p>
<p>Use this property to have Windows load a JavaScript file in its own subcontext and thread,
separate from the <code>app.js</code> global context.
Reference a file relative to your project's <code>Resources</code> folder for classic Titanium
projects or <code>app/lib</code> folder for Alloy projects.</p>
<p>Note that Titanium will refuse to load JavaScript files from a remote URL. Loading
remote JavaScript from a URL and providing it with the full capabilities of the Titanium
API would be very dangerous.</p>
<p>When loading JavaScript files using this property, the special property
{@link Titanium.UI#property-currentWindow} is available inside a multi-context
application that points to the JavaScript instance by reference in the global context.</p>
*/
/**
* @property title
* @hide
* @type String
* <p>Title of the window.</p>
*/
/**
* @property titleid
* @hide
* @type String
* <p>Key identifying a string from the locale file to use for the window title.</p>
* @description <p>Only one of <code>title</code> or <code>titleid</code> should be specified.</p>
*/
/**
* @property window
* @type Titanium.UI.Window
* @creationOnly
* <p>Window to add to this navigation window.</p>
*/
/**
* @class Titanium.UI.iOS.PreviewAction
* @platform iphone 5.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/PreviewAction.yml
* <p>A PreviewAction provides options to configure actions used by the iOS 9 3D-Touch "Peek and Pop"
feature.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The PreviewAction is created by the {@link Titanium.UI.iOS#method-createPreviewAction} method. Set the
<code>title</code> property when creating a PreviewAction object.</p>
<p>Use this class to configure preview actions used in the {@link Titanium.UI.iOS.PreviewContext}. The actions
can also be part of the {@link Titanium.UI.iOS.PreviewActionGroup#property-actions} property.</p>
<p>For an example, see {@link Titanium.UI.iOS.PreviewContext}.</p>
<p>See also:</p>
<ul>
<li><a href="https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/Adopting3DTouchOniPhone/3DTouchAPIs.html">iOS Developer Library: Adopting 3D Touch on iPhone</a></li>
</ul>
*/
/**
* @event click
* <p>Fired when the device detects a click against a preview action.</p>
* @description <p>This event provides different properties depending on the view the {@link Titanium.UI.iOS.PreviewContext}
is assigned to. Every event has the <code>index</code> property to identify the clicked action. If the {@link Titanium.UI.iOS.PreviewContext}
is assigned to a {@link Titanium.UI.ListView}, the event provides the additional properties <code>itemIndex</code>, <code>sectionIndex</code>
and <code>itemId</code> to identify the previewed row and section, respectively.</p>
* @param {Number} index
<p>The index of the clicked action.</p>
* @param {Number} itemIndex
<p>The index of the clicked row, if the <code>previewContext</code> property of the {@link Titanium.UI.iOS.PreviewContext}
is a {@link Titanium.UI.ListView}.</p>
* @param {Number} sectionIndex
<p>The index of the clicked section, if the <code>previewContext</code> property of the {@link Titanium.UI.iOS.PreviewContext}
is a {@link Titanium.UI.ListView}.</p>
* @param {String} itemId
<p>The item ID of cell, if the <code>previewContext</code> property of the {@link Titanium.UI.iOS.PreviewContext}
is a {@link Titanium.UI.ListView}.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.iOS.PreviewAction#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.iOS.PreviewAction#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.UI.iOS.PreviewAction#property-style} property.</p>
* @returns {Number}
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.UI.iOS.PreviewAction#property-style} property.</p>
* @param {Number} style
<p>New value for the property.</p>
*/
/**
* @property title
* @type String
* <p>The title of the action.</p>
* @description <p>Provides a title to be shown when "peeking" a view referenced in the {@link Titanium.UI.iOS.PreviewContext}.</p>
*/
/**
* @property [style=Titanium.UI.iOS.PREVIEW_ACTION_STYLE_DEFAULT]
* @type Number
* <p>The style of the action.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-PREVIEW_ACTION_STYLE_DEFAULT}
<li> {@link Titanium.UI.iOS#property-PREVIEW_ACTION_STYLE_SELECTED}
<li> {@link Titanium.UI.iOS#property-PREVIEW_ACTION_STYLE_DESTRUCTIVE}
</ul></p>
*/
/**
* @class Titanium.UI.iOS.PreviewActionGroup
* @platform iphone 5.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/PreviewActionGroup.yml
* <p>A PreviewActionGroup provides options to configure a group of actions used by the iOS9 3D-Touch
feature "Peek and Pop".</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The PreviewActionGroup is created by the {@link Titanium.UI.iOS#method-createPreviewActionGroup} method. You
need to set the <code>title</code> property when creating a PreviewActionGroup object.</p>
<p>Use this class to configure a group of preview actions used in the {@link Titanium.UI.iOS.PreviewContext}.
The actions are of the type {@link Titanium.UI.iOS.PreviewAction}.</p>
<p>For an example, see {@link Titanium.UI.iOS.PreviewContext}.</p>
<p>See also:</p>
<ul>
<li><a href="https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/Adopting3DTouchOniPhone/3DTouchAPIs.html">iOS Developer Library: Adopting 3D Touch on iPhone</a></li>
</ul>
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.iOS.PreviewActionGroup#property-title} property.</p>
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.iOS.PreviewActionGroup#property-title} property.</p>
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.UI.iOS.PreviewActionGroup#property-style} property.</p>
* @returns {Number}
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.UI.iOS.PreviewActionGroup#property-style} property.</p>
* @param {Number} style
<p>New value for the property.</p>
*/
/**
* @method getActions
* <p>Gets the value of the {@link Titanium.UI.iOS.PreviewActionGroup#property-actions} property.</p>
* @returns {Titanium.UI.iOS.PreviewAction[]}
*/
/**
* @method setActions
* <p>Sets the value of the {@link Titanium.UI.iOS.PreviewActionGroup#property-actions} property.</p>
* @param {Array<Titanium.UI.iOS.PreviewAction>} actions
<p>New value for the property.</p>
*/
/**
* @property title
* @type String
* <p>The title of the action group.</p>
* @description <p>Provides a title to be shown when "peeking" a view referenced in the {@link Titanium.UI.iOS.PreviewContext}.</p>
*/
/**
* @property [style=Titanium.UI.iOS.PREVIEW_ACTION_STYLE_DEFAULT]
* @type Number
* <p>The style of the action group.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-PREVIEW_ACTION_STYLE_DEFAULT}
<li> {@link Titanium.UI.iOS#property-PREVIEW_ACTION_STYLE_SELECTED}
<li> {@link Titanium.UI.iOS#property-PREVIEW_ACTION_STYLE_DESTRUCTIVE}
</ul></p>
*/
/**
* @property actions
* @type Titanium.UI.iOS.PreviewAction[]
* <p>The preview actions assigned to this preview action group.</p>
* @description <p>Provides an array with elements of the type {@link Titanium.UI.iOS.PreviewAction Titanium.UI.iOS.PreviewAction}.
Note: Apple does not allow adding a preview group to another preview group, so only
one hirarchie level is allowed.</p>
*/
/**
* @class Titanium.UI.iOS.PreviewContext
* @platform iphone 5.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/PreviewContext.yml
* <p>A PreviewContext provides options to configure the iOS 9 3D-Touch "Peek and Pop" feature.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>The PreviewContext is created by the {@link Titanium.UI.iOS#method-createPreviewContext} method. You must set
the <code>pop</code> and <code>preview</code> properties when creating a <code>PreviewContext</code> object.</p>
<p>Use this class to configure the previewing context which is displayed while "peeking" a view.</p>
<p>Note: This feature requires iOS 9 and a 3D-Touch capable device (such as iPhone 6S or iPhone 6S Plus).
You cannot test 3D touch on the iOS simulator.
To check if the current device supports 3D touch, use the {@link Titanium.UI.iOS#property-forceTouchSupported}
property and consider using the <code>longpress</code> event to provide a fallback to your users on
non-3D-touch devices.</p>
<p>See also:</p>
<ul>
<li><a href="https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/Adopting3DTouchOniPhone/3DTouchAPIs.html">iOS Developer Library: Adopting 3D Touch on iPhone</a></li>
</ul>
* <h3>Examples</h3>
<h4>PreviewContext example using a Button as receiver.</h4>
<p>The example below creates a new preview context and assigns a <code>window</code>, <code>actions</code> and a <code>contentHeight</code>.
After that, we assign the preview context to a view which will trigger the "peeking" of it. Note, that this
is independent from the click event of the view itself.</p>
<pre><code>var actions = [];
var win = Ti.UI.createWindow({
backgroundColor: "white"
});
// The view to be previewed while popping.
var previewView = Ti.UI.createView({
backgroundColor: "blue"
});
// The window to be opened after popping the preview.
var detailWindow = Ti.UI.createWindow({
backgroundColor: "yellow"
});
detailWindow.add(Ti.UI.createLabel({
text: "You made it!"
}));
// The actions to be added to the preview context.
var action = Ti.UI.iOS.createPreviewAction({
title: "Preview Action",
style: Ti.UI.iOS.PREVIEW_ACTION_STYLE_DEFAULT
});
action.addEventListener("click", function(e) {
alert("Title: " + e.title + " / Style: " + e.style+" / Index: " + e.index);
});
var subAction = Ti.UI.iOS.createPreviewAction({
title: "Preview Subaction"
})
subAction.addEventListener("click", function(e) {
alert("Title: " + e.title + " / Style: " + e.style+" / Subindex: " + e.index);
});
var actionGroup = Ti.UI.iOS.createPreviewActionGroup({
title: "More actions...",
style: Ti.UI.iOS.PREVIEW_ACTION_STYLE_DESTRUCTIVE,
actions: [subAction]
});
actions.push(action);
actions.push(actionGroup);
// Create the preview context
var context = Ti.UI.iOS.createPreviewContext({
preview: previewView,
actions: actions, // Can have both Ti.UI.iOS.PreviewAction + Ti.UI.iOS.PreviewActionGroup
contentHeight: 300 // When unspecified, we use the available height
});
// Fired after popping the preview
context.addEventListener("pop", function(e) {
detailWindow.open();
});
// Assign the preview context
var button = Ti.UI.createButton({
previewContext: context, // Will be ignored on unsupported devices
title : "Open Window!",
backgroundColor: "#A6171C",
width: 200,
height: 50,
tintColor: "#fff"
});
win.add(button);
win.open();
</code></pre><h4>PreviewContext example using a ListView as receiver.</h4>
<pre><code>var actions = [];
var win = Ti.UI.createWindow({
backgroundColor: "white"
});
// The view to be previewed while popping.
var previewView = Ti.UI.createView({
backgroundColor: "blue"
});
// The window to be opened after popping the preview.
var detailWindow = Ti.UI.createWindow({
backgroundColor: "yellow"
});
detailWindow.add(Ti.UI.createLabel({
text: "You made it!"
}));
// The actions to be added to the preview context.
var action = Ti.UI.iOS.createPreviewAction({
title: "Preview Action",
style: Ti.UI.iOS.PREVIEW_ACTION_STYLE_DEFAULT
});
action.addEventListener("click", function(e) {
alert(
"Title: " + e.title +
"\nStyle: " + e.style +
"\nIndex: " + e.index +
"\nSectionIndex: " + e.sectionIndex +
"\nItemIndex: " + e.itemIndex
);
});
actions.push(action);
// Create the preview context
var context = Ti.UI.iOS.createPreviewContext({
preview: previewView,
actions: actions, // Can have both Ti.UI.iOS.PreviewAction + Ti.UI.iOS.PreviewActionGroup
contentHeight: 300 // When unspecified, we use the available height
});
// Fired after peeking the preview
// Use this event to configure the preview depending on the sectionIndex / itemIndex
context.addEventListener("peek", function(e) {
Ti.API.warn("sectionIndex: " + e.sectionIndex);
Ti.API.warn("itemIndex: " + e.itemIndex);
});
// Fired after popping the preview
context.addEventListener("pop", function(e) {
detailWindow.open();
});
// Assign the preview context
var listView = Ti.UI.createListView({
previewContext: context, // Will be ignored on unsupported devices
});
var section1 = Ti.UI.createListSection({
headerTitle: "Section 1"
});
var section2 = Ti.UI.createListSection({
headerTitle: "Section 2"
});
var items = [];
for(var i = 1; i <= 5; i++) {
items.push({
properties: {
title: "Cell #" + i
}
});
}
section1.setItems(items);
section2.setItems(items);
listView.setSections([section1, section2]);
win.add(listView);
win.open();</code></pre>
*/
/**
* @event peek
* <p>Fired when the user peeks the preview. You can configure the preview</p>
* @description <p>You can configure the preview in this event before it is displayed. If the preview context is assigned to a
normal view like a {@link Titanium.UI.Button} the <code>preview</code> property can be received here to change the content of it
before displaying. If the preview context is assigned to a {@link Titanium.UI.ListView}, you can also receive the
properties <code>sectionIndex</code>, <code>itemIndex</code> and <code>itemId</code> here to access item-specific data to display. </p>
<p>Note: Don't do asynchronous operations like HTTP requests here, since the preview will not wait for the
operations to complete.</p>
* @param {Titanium.UI.View} preview
<p>The view to be previewed.</p>
* @param {Number} sectionIndex
<p>The section index of the ListView to identify the selected section.
Note: This property is only available if the preview context is assigned to a {@link Titanium.UI.ListView}.</p>
* @param {Number} itemIndex
<p>The item index of the ListView to identify the selected item.
Note: This property is only available if the preview context is assigned to a {@link Titanium.UI.ListView}.</p>
* @param {String} itemId
<p>The item ID bound to the list item that generated the event.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event pop
* <p>Fired when the user pop the preview. You will most likely open a fullscreen window here.</p>
* @description <p>You can open a window here or update your current UI. If the preview context is assigned to a
normal view like a {@link Titanium.UI.Button} the <code>preview</code> property can be received here to change the content of it
before displaying. If the preview context is assigned to a {@link Titanium.UI.ListView}, you can also receive the
properties <code>sectionIndex</code>, <code>itemIndex</code> and <code>itemId</code> here to access item-specific data to display. </p>
<p>Note: Don't do asynchronous operations like HTTP requests here, since the preview will not wait for the
operations to complete.</p>
* @param {Titanium.UI.View} preview
<p>The view to be previewed.</p>
* @param {Number} sectionIndex
<p>The section index of the ListView to identify the selected section.
Note: This property is only available if the preview context is assigned to a {@link Titanium.UI.ListView}.</p>
* @param {Number} itemIndex
<p>The item index of the ListView to identify the selected item.
Note: This property is only available if the preview context is assigned to a {@link Titanium.UI.ListView}.</p>
* @param {String} itemId
<p>The item ID bound to the list item that generated the event.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method getActions
* <p>Gets the value of the {@link Titanium.UI.iOS.PreviewContext#property-actions} property.</p>
* @returns {Titanium.UI.iOS.PreviewAction[]}
*/
/**
* @method setActions
* <p>Sets the value of the {@link Titanium.UI.iOS.PreviewContext#property-actions} property.</p>
* @param {Array<Titanium.UI.iOS.PreviewAction>} actions
<p>New value for the property.</p>
*/
/**
* @method getContentHeight
* <p>Gets the value of the {@link Titanium.UI.iOS.PreviewContext#property-contentHeight} property.</p>
* @returns {Number}
*/
/**
* @method setContentHeight
* <p>Sets the value of the {@link Titanium.UI.iOS.PreviewContext#property-contentHeight} property.</p>
* @param {Number} contentHeight
<p>New value for the property.</p>
*/
/**
* @method getPreview
* <p>Gets the value of the {@link Titanium.UI.iOS.PreviewContext#property-preview} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setPreview
* <p>Sets the value of the {@link Titanium.UI.iOS.PreviewContext#property-preview} property.</p>
* @param {Titanium.UI.View} preview
<p>New value for the property.</p>
*/
/**
* @property actions
* @type Titanium.UI.iOS.PreviewAction[]
* <p>The preview actions and preview action groups.</p>
* @description <p>Provides an array with elements of the type {@link Titanium.UI.iOS.PreviewAction Titanium.UI.iOS.PreviewAction}
and {@link Titanium.UI.iOS.PreviewActionGroup Ti.UI.iOS.PreviewActionGroup}. Both can be used together.</p>
*/
/**
* @property [contentHeight=The available height of the screen.]
* @type Number
* <p>The height of the preview.</p>
* @description <p>Specified the height of the preview which will be shown during "peeking".</p>
*/
/**
* @property preview
* @type Titanium.UI.View
* <p>The preview view.</p>
* @description <p>Provides the preview for "peeking". This view is independent from the window which can be openend after
"popping" the preview to give you the ability to provide different layouts for the preview and the full
window. If you want to adjust the preview inside the <code>peek</code> event, change the view assigned to this property.</p>
*/
/**
* @class Titanium.UI.iOS.ProgressBarStyle
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/ProgressBarStyle.yml
* <p>A set of constants for the bar styles used on the <code>style</code> property of {@link Titanium.UI.ProgressBar}.</p>
*/
/**
* @property BAR
* @type Number
* @readonly
* <p>The style of progress view that is used in a toolbar.</p>
*/
/**
* @property DEFAULT
* @type Number
* @readonly
* <p>he standard progress-view style. This is the default.</p>
*/
/**
* @property PLAIN
* @type Number
* @readonly
* <p>The standard progress-view style. Same as <code>DEFAULT</code>.</p>
*/
/**
* @class Titanium.UI.iOS.PushBehavior
* @platform iphone 3.2
* @platform ipad 3.2
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/PushBehavior.yml
* <p>Continuous or instantaneous force to apply to an item.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>The following APIs are supported on iOS 7 and later.</p>
<p>A push behavior configures the continuous or instaneous force to apply to one or more items. To
define a push behavior:</p>
<ol>
<li>Use the {@link Titanium.UI.iOS#method-createPushBehavior} method to create and define the behavior.</li>
<li>To define a force vector, either set the
{@link Titanium.UI.iOS.PushBehavior#property-angle angle} and
{@link Titanium.UI.iOS.PushBehavior#property-magnitude magnitude} properties, or set the
{@link Titanium.UI.iOS.PushBehavior#property-pushDirection pushDiretion} property.</li>
<li>Use the {@link Titanium.UI.iOS.PushBehavior#method-addItem addItem} method to add items to the behavior.</li>
<li>Add the behavior to an {@link Titanium.UI.iOS.Animator Animator object}.</li>
</ol>
* <h3>Examples</h3>
<h4>Simple Example</h4>
<p>The following example generates a random push force on the block when it stops.</p>
<p><img src="images/animator/pushforce.gif" height="455" style="border:1px solid black"/></p>
<pre><code>var win = Ti.UI.createWindow({backgroundColor: 'white', fullscreen: true});
// Create an Animator object using the window as the coordinate system
var animator = Ti.UI.iOS.createAnimator({referenceView: win});
var block = Ti.UI.createView({
width: 100,
height: 100,
backgroundColor: 'blue',
transform: Ti.UI.create2DMatrix({ rotate: 45 })
});
// Create a default collision behavior, using the window edges as boundaries
var collision = Ti.UI.iOS.createCollisionBehavior();
collision.addItem(block);
animator.addBehavior(collision);
// Push the block down when the application first starts
var push = Ti.UI.iOS.createPushBehavior({
pushDirection: {x: 0.0, y: 1.0},
pushMode: Ti.UI.iOS.PUSH_MODE_INSTANTANEOUS
});
push.addItem(block);
animator.addBehavior(push);
// Apply a new push behavior when the item stops
animator.addEventListener('pause', function(e){
push.angle = 2 * Math.PI * Math.random();
push.magnitude = Math.random() * 5 + 5;
push.active = true;
});
animator.addEventListener('resume', function(e){
Ti.API.info(JSON.stringify(
'push force: ' + push.magnitude * 100 + " points/s^2 @ "
+ (push.angle * 360 / (2 * Math.PI)) + " degrees")
);
});
// Start the animation when the window opens
win.addEventListener('open', function(e){
animator.startAnimator();
});
win.add(block);
win.open();
</code></pre>
*/
/**
* @method addItem
* <p>Adds an item to this behavior.</p>
* @param {Titanium.UI.View} item
<p>View object to add to the behavior.</p>
*/
/**
* @method removeItem
* <p>Removes the specified item from this behavior.</p>
* @param {Titanium.UI.View} item
<p>Item to remove.</p>
*/
/**
* @method getActive
* <p>Gets the value of the {@link Titanium.UI.iOS.PushBehavior#property-active} property.</p>
* @returns {Boolean}
*/
/**
* @method setActive
* <p>Sets the value of the {@link Titanium.UI.iOS.PushBehavior#property-active} property.</p>
* @param {Boolean} active
<p>New value for the property.</p>
*/
/**
* @method getAngle
* <p>Gets the value of the {@link Titanium.UI.iOS.PushBehavior#property-angle} property.</p>
* @returns {Number}
*/
/**
* @method setAngle
* <p>Sets the value of the {@link Titanium.UI.iOS.PushBehavior#property-angle} property.</p>
* @param {Number} angle
<p>New value for the property.</p>
*/
/**
* @method getItems
* <p>Gets the value of the {@link Titanium.UI.iOS.PushBehavior#property-items} property.</p>
* @returns {Titanium.UI.View[]}
*/
/**
* @method getMagnitude
* <p>Gets the value of the {@link Titanium.UI.iOS.PushBehavior#property-magnitude} property.</p>
* @returns {Number}
*/
/**
* @method setMagnitude
* <p>Sets the value of the {@link Titanium.UI.iOS.PushBehavior#property-magnitude} property.</p>
* @param {Number} magnitude
<p>New value for the property.</p>
*/
/**
* @method getPushDirection
* <p>Gets the value of the {@link Titanium.UI.iOS.PushBehavior#property-pushDirection} property.</p>
* @returns {Point}
*/
/**
* @method setPushDirection
* <p>Sets the value of the {@link Titanium.UI.iOS.PushBehavior#property-pushDirection} property.</p>
* @param {Point} pushDirection
<p>New value for the property.</p>
*/
/**
* @method getPushMode
* <p>Gets the value of the {@link Titanium.UI.iOS.PushBehavior#property-pushMode} property.</p>
* @returns {Number}
*/
/**
* @method setPushMode
* <p>Sets the value of the {@link Titanium.UI.iOS.PushBehavior#property-pushMode} property.</p>
* @param {Number} pushMode
<p>New value for the property.</p>
*/
/**
* @property [active=true]
* @type Boolean
* <p>State of the push behavior's force.</p>
* @description <p>Set to <code>true</code> to activate the force or <code>false</code> to deactivate it. Use this property rather
than removing and re-adding the behavior to the animator.</p>
*/
/**
* @property [angle=0]
* @type Number
* <p>Specifies the angle of the force vector in radians.</p>
* @description <p>To configure the force vector, you need to also specify the
{@link Titanium.UI.iOS.PushBehavior#property-magnitude magnitude} property.</p>
*/
/**
* @property items
* @type Titanium.UI.View[]
* @readonly
* <p>Items added to this behavior.</p>
*/
/**
* @property [magnitude=0]
* @type Number
* <p>Specifies the magnitude of the force vector.</p>
* @description <p>A value of 1.0 represents an acceleration of 100 points per second squared if the item is
100 x 100 points with a <code>density</code> of 1.0.</p>
<p>To configure the push vector, you need to also specify the
{@link Titanium.UI.iOS.PushBehavior#property-angle angle} property.</p>
*/
/**
* @property [pushDirection=(0,0)]
* @type Point
* <p>Specifies the direction of the force vector as an x, y pair.</p>
* @description <p>For example, specifiying <code>{x: 0.0, y: 1.0}</code> indicates a positive upward force of 100
points per second squared if the item is 100 x 100 points with a <code>density</code> of 1.0.</p>
<p>Specifiying a negative value reverses the direction of the force.</p>
*/
/**
* @property [pushMode={@link Titanium.UI.iOS#property-PUSH_MODE_CONTINUOUS}]
* @type Number
* <p>Specifies the push mode.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS#property-PUSH_MODE_CONTINUOUS}
<li> {@link Titanium.UI.iOS#property-PUSH_MODE_INSTANTANEOUS}
</ul></p>
*/
/**
* @class Titanium.UI.iOS.RowAnimationStyle
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/RowAnimationStyle.yml
* <p>A set of constants for the Animation Styles used for transition on table view rows.</p>
*/
/**
* @property BOTTOM
* @type Number
* @readonly
* <p>The inserted row or rows slides in from the bottom; the deleted row or rows slides out
toward the bottom.</p>
*/
/**
* @property FADE
* @type Number
* @readonly
* <p>The inserted or deleted row or rows fades into or out of the table view.</p>
*/
/**
* @property LEFT
* @type Number
* @readonly
* <p>The inserted row or rows slides in from the left; the deleted row or rows slides out to the
left.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>No animation is performed. The new cell value appears as if the cell had just been reloaded.</p>
*/
/**
* @property RIGHT
* @type Number
* @readonly
* <p>The inserted row or rows slides in from the right; the deleted row or rows slides out to
the right.</p>
*/
/**
* @property TOP
* @type Number
* @readonly
* <p>The inserted row or rows slides in from the top; the deleted row or rows slides out toward
the top.</p>
*/
/**
* @class Titanium.UI.iOS.ScrollIndicatorStyle
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/ScrollIndicatorStyle.yml
* <p>A set of constants for the styles available for scrollbars used with {@link Titanium.UI.ScrollView#property-scrollIndicatorStyle} and {@link Titanium.UI.TableView#property-scrollIndicatorStyle} properties.</p>
*/
/**
* @property BLACK
* @type Number
* @readonly
* <p>A style of indicator which is black smaller than the default style. This style is good
against a white content background.</p>
*/
/**
* @property DEFAULT
* @type Number
* @readonly
* <p>The default style of scroll indicator, which is black with a white border. This style is
good against any content background.</p>
*/
/**
* @property WHITE
* @type Number
* @readonly
* <p>A style of indicator is white and smaller than the default style. This style is good against
a black content background.</p>
*/
/**
* @class Titanium.UI.iOS.SnapBehavior
* @platform iphone 3.2
* @platform ipad 3.2
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/SnapBehavior.yml
* <p>Dynamic behavior defining an item's movement to a specific point.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>The following APIs are supported on iOS 7 and later.</p>
<p>A snap behavior specifies how an item moves towards a specified point with a spring-like
effect, ending with an oscillation.</p>
<ol>
<li>Use the {@link Titanium.UI.iOS#method-createSnapBehavior} method to create the behavior.</li>
<li>Set the {@link Titanium.UI.iOS.SnapBehavior#property-item item} and
{@link Titanium.UI.iOS.SnapBehavior#property-snapPoint snapPoint} properties.</li>
<li>Add the behavior to an {@link Titanium.UI.iOS.Animator Animator object}.</li>
</ol>
* <h3>Examples</h3>
<h4>Simple Example</h4>
<p>The following example snaps the block to the location of a click on the window.</p>
<p><img src="images/animator/snapbehavior.gif" height="455" style="border:1px solid black"/></p>
<pre><code>var win = Ti.UI.createWindow({backgroundColor: 'white', fullscreen: true});
// Create an Animator object using the window as the coordinate system
var animator = Ti.UI.iOS.createAnimator({referenceView: win});
var block = Ti.UI.createView({
width: 100,
height: 100,
backgroundColor: 'blue'
});
// Snap to the top-left corner when the app starts
var snap = Ti.UI.iOS.createSnapBehavior({
item: block,
snapPoint: {x: 0, y: 0},
});
animator.addBehavior(snap);
// Snap the block to the point of the click event
win.addEventListener('click', function(e){
snap.snapPoint = {x: e.x, y: e.y};
snap.damping = Math.random();
});
// Start the animation when the window opens
win.addEventListener('open', function(e){
animator.startAnimator();
});
win.add(block);
win.open();
</code></pre>
*/
/**
* @method getDamping
* <p>Gets the value of the {@link Titanium.UI.iOS.SnapBehavior#property-damping} property.</p>
* @returns {Number}
*/
/**
* @method setDamping
* <p>Sets the value of the {@link Titanium.UI.iOS.SnapBehavior#property-damping} property.</p>
* @param {Number} damping
<p>New value for the property.</p>
*/
/**
* @method getItem
* <p>Gets the value of the {@link Titanium.UI.iOS.SnapBehavior#property-item} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setItem
* <p>Sets the value of the {@link Titanium.UI.iOS.SnapBehavior#property-item} property.</p>
* @param {Titanium.UI.View} item
<p>New value for the property.</p>
*/
/**
* @method getSnapPoint
* <p>Gets the value of the {@link Titanium.UI.iOS.SnapBehavior#property-snapPoint} property.</p>
* @returns {Point}
*/
/**
* @method setSnapPoint
* <p>Sets the value of the {@link Titanium.UI.iOS.SnapBehavior#property-snapPoint} property.</p>
* @param {Point} snapPoint
<p>New value for the property.</p>
*/
/**
* @property [damping=0.5]
* @type Number
* <p>Specifies the amount of oscillation during the conclusion of the snap.</p>
* @description <p>A value of 0.0 indicates minimum oscillation, while 1.0 indicates maximum oscillation.</p>
*/
/**
* @property item
* @type Titanium.UI.View
* <p>Item to add to this behavior.</p>
*/
/**
* @property [snapPoint=(0,0)]
* @type Point
* <p>Specifies the point to snap to.</p>
* @description <p>The coordinate system depends on the animator's reference view.</p>
*/
/**
* @class Titanium.UI.iOS.SplitWindow
* @platform iphone 3.6.0
* @platform ipad 3.6.0
* @extends Titanium.UI.Window
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/SplitWindow.yml
* <p>A SplitWindow is a window that manages the presentation of two side-by-side view
controllers. </p>
* @description <p>This class replaces the deprecated {@link Titanium.UI.iPad.SplitWindow} class.</p>
<p>The {@link Titanium.UI.iOS.SplitWindow#property-masterView masterView} and {@link Titanium.UI.iOS.SplitWindow#property-detailView detailView}
properties are required before the SplitWindow is opened.</p>
<p>You use this class to implement a master-detail interface, in which the left-side view presents
a list of items and the right-side presents details of the selected item. The <code>SplitWindow</code> is supported
for both iPhone and iPad idioms. Use the {@link Titanium.UI.iOS#method-createSplitWindow} method to create a <code>SplitWindow</code> object</p>
<p>By default, <code>SplitWindow</code> shows both master and detail views in landscape orientation. When the
device switches into portrait orientation, the master is only shown if {@link Titanium.UI.iOS.SplitWindow#property-showMasterInPortrait showMasterInPortrait}
is set to true.</p>
<p>The property {@link Titanium.UI.iOS.SplitWindow#property-masterIsOverlayed masterIsOverlayed} controls how the master is
displayed in portrait mode. When <code>masterIsOverlayed</code> is set to true, the <code>detailView</code> occupies the full screen
and and <code>masterView</code> is displayed overlayed on top to the left of the screen. When <code>masterIsOverlayed</code> is set
to false, the available screen width is split between the <code>masterView</code> and <code>detailView</code>. </p>
<p>The width of the <code>masterView</code> can be controlled by the {@link Titanium.UI.iOS.SplitWindow#property-portraitSplit portraitSplit} and
{@link Titanium.UI.iOS.SplitWindow#property-landscapeSplit landscapeSplit} properties. These values are capped in the range 0.25 to 0.5.
Any values outside this range are ignored.</p>
<p>To add a navigation bar to either the master or detail view of the split window,
use a {@link Titanium.UI.iOS.NavigationWindow}.</p>
<p>The SplitWindow is a top-level window and cannot be contained within another window or view.</p>
* <h3>Examples</h3>
<h4>Split Window</h4>
<p>This is an example of a Split Window.</p>
<pre><code>var detail = Ti.UI.createWindow({backgroundColor: 'white'});
var label1 = Ti.UI.createLabel({text: 'Detail View'});
detail.add(label1);
var detailNav = Ti.UI.iOS.createNavigationWindow({window: detail});
var master = Ti.UI.createWindow({backgroundColor: 'gray'});
var label2 = Ti.UI.createLabel({text: 'Master View'});
master.add(label2);
var masterNav = Ti.UI.iOS.createNavigationWindow({window: master});
var splitWin = Ti.UI.iOS.createSplitWindow({
detailView: detailNav,
masterView: masterNav
});
splitWin.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Below is an Alloy version of the previous example. The first window is the <code>masterView</code> and the second window is the <code>detailView</code>. You can also use the <code><Require></code> element to add a <code><Window></code> or <code><NavigationWindow></code>.</p>
<pre><code>**views/index.xml:**
<Alloy>
<SplitWindow backgroundColor="white" showMasterInPortrait="true">
<!-- First window is the masterView -->
<NavigationWindow>
<Window title="Master View">
<ListView>
<ListSection headerTitle="Some items">
<ListItem title="Item 1"></ListItem>
<ListItem title="Item 2"></ListItem>
<ListItem title="Item 3"></ListItem>
</ListSection>
</ListView>
</Window>
</NavigationWindow>
<!-- Second window is the detailView -->
<NavigationWindow>
<Window title="Detail View">
<Label>I am the detail view.</Label>
</Window>
</NavigationWindow>
</SplitWindow>
</Alloy>
**controllers/index.js:**
$.index.addEventListener('visible',function(e){
if (e.view == 'detail'){
e.button.title = "Master";
$.index.detailView.getWindow().leftNavButton = e.button;
} else if (e.view == 'master'){
$.index.detailView.getWindow().leftNavButton = null;
}
});
$.index.open();
</code></pre>
*/
/**
* @method setShowMasterInPortrait
* <p>Sets the value of the {@link Titanium.UI.iOS.SplitWindow#property-showMasterInPortrait showMasterInPortrait} property.</p>
* @param {Boolean} showMasterInPortrait
<p>Determines whether to show the master view in portrait orientation.</p>
* @param {animationOption} animated (optional)
<p>Determines whether the scrollable region reposition should be animated</p>
*/
/**
* @method setMasterIsOverlayed
* <p>Sets the value of the {@link Titanium.UI.iOS.SplitWindow#property-masterIsOverlayed masterIsOverlayed} property.</p>
* @param {Boolean} masterIsOverlayed
<p>Determines whether to show the master view is overlayed in portrait orientation.</p>
* @param {animationOption} animated (optional)
<p>Determines whether the scrollable region reposition should be animated</p>
*/
/**
* @method getSwipeToClose
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.SplitWindow#property-swipeToClose} property.</p>
* @returns {Boolean}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method setSwipeToClose
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.SplitWindow#property-swipeToClose} property.</p>
* @param {Boolean} swipeToClose
<p>New value for the property.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method getTransitionAnimation
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.SplitWindow#property-transitionAnimation} property.</p>
* @returns {Titanium.Proxy}
*/
/**
* @method setTransitionAnimation
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.SplitWindow#property-transitionAnimation} property.</p>
* @param {Titanium.Proxy} transitionAnimation
<p>New value for the property.</p>
*/
/**
* @method getDetailView
* <p>Gets the value of the {@link Titanium.UI.iOS.SplitWindow#property-detailView} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setDetailView
* <p>Sets the value of the {@link Titanium.UI.iOS.SplitWindow#property-detailView} property.</p>
* @param {Titanium.UI.View} detailView
<p>New value for the property.</p>
*/
/**
* @method getMasterView
* <p>Gets the value of the {@link Titanium.UI.iOS.SplitWindow#property-masterView} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setMasterView
* <p>Sets the value of the {@link Titanium.UI.iOS.SplitWindow#property-masterView} property.</p>
* @param {Titanium.UI.View} masterView
<p>New value for the property.</p>
*/
/**
* @method getShowMasterInPortrait
* <p>Gets the value of the {@link Titanium.UI.iOS.SplitWindow#property-showMasterInPortrait} property.</p>
* @returns {Boolean}
*/
/**
* @method setShowMasterInPortrait
* <p>Sets the value of the {@link Titanium.UI.iOS.SplitWindow#property-showMasterInPortrait} property.</p>
* @param {Boolean} showMasterInPortrait
<p>New value for the property.</p>
*/
/**
* @method getMasterIsOverlayed
* <p>Gets the value of the {@link Titanium.UI.iOS.SplitWindow#property-masterIsOverlayed} property.</p>
* @returns {Boolean}
*/
/**
* @method setMasterIsOverlayed
* <p>Sets the value of the {@link Titanium.UI.iOS.SplitWindow#property-masterIsOverlayed} property.</p>
* @param {Boolean} masterIsOverlayed
<p>New value for the property.</p>
*/
/**
* @method getPortraitSplit
* <p>Gets the value of the {@link Titanium.UI.iOS.SplitWindow#property-portraitSplit} property.</p>
* @returns {Number}
*/
/**
* @method setPortraitSplit
* <p>Sets the value of the {@link Titanium.UI.iOS.SplitWindow#property-portraitSplit} property.</p>
* @param {Number} portraitSplit
<p>New value for the property.</p>
*/
/**
* @method getLandscapeSplit
* <p>Gets the value of the {@link Titanium.UI.iOS.SplitWindow#property-landscapeSplit} property.</p>
* @returns {Number}
*/
/**
* @method setLandscapeSplit
* <p>Sets the value of the {@link Titanium.UI.iOS.SplitWindow#property-landscapeSplit} property.</p>
* @param {Number} landscapeSplit
<p>New value for the property.</p>
*/
/**
* @property [swipeToClose=true]
* @hide
* @type Boolean
* <p>Boolean value indicating if the user should be able to close a window using a swipe gesture.</p>
* @description <p>If <code>false</code> the user will not be able to swipe from the left edge of the window to close it.
Note: This property is only used for a window being embedded in a {@link Titanium.UI.Tab Ti.UI.Tab} or
{@link Titanium.UI.iOS.NavigationWindow Ti.UI.iOS.NavigationWindow}. It is enabled by default.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property transitionAnimation
* @hide
* @type Titanium.Proxy
* <p>Use a transition animation when opening or closing windows in a
{@link Titanium.UI.iOS.NavigationWindow} or {@link Titanium.UI.Tab}.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Create the transition animation using the {@link Titanium.UI.iOS#method-createTransitionAnimation}
method.</p>
<p>Supported on iOS 7 and later.</p>
*/
/**
* @property detailView
* @type Titanium.UI.View
* <p>View for the detail view section of the SplitWindow.</p>
*/
/**
* @property masterView
* @type Titanium.UI.View
* <p>View for the master view section of the SplitWindow.</p>
*/
/**
* @property [showMasterInPortrait=false]
* @type Boolean
* <p>Determines whether to show the master view in portrait orientation.</p>
*/
/**
* @property [masterIsOverlayed=false]
* @type Boolean
* <p>Determines whether to show the master view is overlayed in portrait orientation.</p>
*/
/**
* @property [portraitSplit=The width of the master-view divided by the screen-width]
* @type Number
* <p>Determines the width of the <code>masterView</code> in portrait mode.</p>
* @description <p>These values are capped in the range 0.25 to 0.5. Any values outside this range are ignored.</p>
*/
/**
* @property [landscapeSplit=The width of the master-view divided by the screen-height]
* @type Number
* <p>Determines the width of the <code>masterView</code> in landscape mode.</p>
* @description <p>These values are capped in the range 0.25 to 0.5. Any values outside this range are ignored.</p>
*/
/**
* @class animationOption
* @platform iphone 0.8
* @platform ipad 0.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/SplitWindow.yml
* <p>Optional parameter for {@link Titanium.UI.iOS.SplitWindow#method-setShowMasterInPortrait setShowMasterInPortrait} and
{@link Titanium.UI.iOS.SplitWindow#method-setMasterIsOverlayed setMasterIsOverlayed} methods.</p>
* @description <p>On iOS, use the optional parameter <code>animated</code> to animate changes to masterView display mode in portrait orientation. For example</p>
<pre><code>setShowMasterInPortrait(true, {animated:true})
</code></pre>
*/
/**
* @property animated
* @type Boolean
* <p>Determines whether the change is animated.</p>
*/
/**
* @class Titanium.UI.iOS.StatusBar
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/StatusBar.yml
* <p>A set of constants for the status bar style.</p>
*/
/**
* @property ANIMATION_STYLE_NONE
* @type Number
* @readonly
* <p>No animation style, when the status bar is hidden or shown.</p>
* @description <p>One of the group of status bar animation style constants
{@link Titanium.UI.iOS.StatusBar#property-ANIMATION_STYLE_NONE ANIMATION_STYLE_NONE},
{@link Titanium.UI.iOS.StatusBar#property-ANIMATION_STYLE_SLIDE ANIMATION_STYLE_SLIDE},
and {@link Titanium.UI.iOS.StatusBar#property-ANIMATION_STYLE_FADE ANIMATION_STYLE_FADE}.</p>
*/
/**
* @property ANIMATION_STYLE_SLIDE
* @type Number
* @readonly
* <p>Slide animation style, when the status bar is hidden or shown.</p>
* @description <p>One of the group of status bar animation style constants
{@link Titanium.UI.iOS.StatusBar#property-ANIMATION_STYLE_NONE ANIMATION_STYLE_NONE},
{@link Titanium.UI.iOS.StatusBar#property-ANIMATION_STYLE_SLIDE ANIMATION_STYLE_SLIDE},
and {@link Titanium.UI.iOS.StatusBar#property-ANIMATION_STYLE_FADE ANIMATION_STYLE_FADE}.</p>
*/
/**
* @property ANIMATION_STYLE_FADE
* @type Number
* @readonly
* <p>Fade animation style, when the status bar is hidden or shown.</p>
* @description <p>One of the group of status bar animation style constants
{@link Titanium.UI.iOS.StatusBar#property-ANIMATION_STYLE_NONE ANIMATION_STYLE_NONE},
{@link Titanium.UI.iOS.StatusBar#property-ANIMATION_STYLE_SLIDE ANIMATION_STYLE_SLIDE},
and {@link Titanium.UI.iOS.StatusBar#property-ANIMATION_STYLE_FADE ANIMATION_STYLE_FADE}.</p>
*/
/**
* @property DEFAULT
* @type Number
* @readonly
* <p>Default status bar style.</p>
* @description <p>Use with the {@link Titanium.UI.Window#property-statusBarStyle} property.</p>
<p>One of the group of status bar style constants
{@link Titanium.UI.iOS.StatusBar#property-DEFAULT DEFAULT},
{@link Titanium.UI.iOS.StatusBar#property-GRAY GRAY},
{@link Titanium.UI.iOS.StatusBar#property-GREY GREY},
{@link Titanium.UI.iOS.StatusBar#property-LIGHT_CONTENT LIGHT_CONTENT},</p>
*/
/**
* @property GRAY
* @type Number
* @readonly
* <p>Gray-colored status bar style.</p>
* @description <p>Use with the {@link Titanium.UI.Window#property-statusBarStyle} property.</p>
<p>One of the group of status bar style constants
{@link Titanium.UI.iOS.StatusBar#property-DEFAULT DEFAULT},
{@link Titanium.UI.iOS.StatusBar#property-GRAY GRAY},
{@link Titanium.UI.iOS.StatusBar#property-GREY GREY},
{@link Titanium.UI.iOS.StatusBar#property-LIGHT_CONTENT LIGHT_CONTENT},</p>
*/
/**
* @property GREY
* @type Number
* @readonly
* <p>Gray-colored status bar style.</p>
* @description <p>Alias for {@link Titanium.UI.iOS.StatusBar#property-GRAY GRAY}.</p>
<p>Use with the {@link Titanium.UI.Window#property-statusBarStyle} property.</p>
<p>One of the group of status bar style constants
{@link Titanium.UI.iOS.StatusBar#property-DEFAULT DEFAULT},
{@link Titanium.UI.iOS.StatusBar#property-GRAY GRAY},
{@link Titanium.UI.iOS.StatusBar#property-GREY GREY},
{@link Titanium.UI.iOS.StatusBar#property-LIGHT_CONTENT LIGHT_CONTENT},</p>
*/
/**
* @property LIGHT_CONTENT
* @type Number
* @readonly
* <p>Status bar style to use with dark backgrounds. Valid on iOS 7 and above.</p>
* @description <p>Use with the {@link Titanium.UI.Window#property-statusBarStyle} property.</p>
<p>One of the group of status bar style constants
{@link Titanium.UI.iOS.StatusBar#property-DEFAULT DEFAULT},
{@link Titanium.UI.iOS.StatusBar#property-GRAY GRAY},
{@link Titanium.UI.iOS.StatusBar#property-GREY GREY},
{@link Titanium.UI.iOS.StatusBar#property-LIGHT_CONTENT LIGHT_CONTENT},</p>
*/
/**
* @class Titanium.UI.iOS.Stepper
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/Stepper.yml
* <p>A widget used to increment and decrement a value</p>
* @description <table id="IOS Stepper">
<tr>
<td><img src="images/Stepper/Stepper.png" height="50" /></td>
<td><img src="images/Stepper/Stepper_customImages.png" height="51" /></td>
</tr>
<tr><th colspan="2">iOS</th></tr>
</table>
<p>A Stepper displays its selected state while it is being pressed.
You can specify background images for each state on iOS.
Use the {@link Titanium.UI.iOS#method-createStepper} method or a <strong><code><Stepper></code></strong> Alloy element to create a stepper
(see the "Examples" section details).</p>
<ul>
<li>When assigning a custom image to the <code>backgroundImage</code> property, the image must be
partially or wholly transparent for the background color or background gradient to be visible.</li>
<li><p>Similarly, for an assigned background gradient to show through, the <code>backgroundColor</code> may need to be
set to 'transparent'.</p></li>
<li><p>Note that the stepper cannot be re-sized.</p></li>
</ul>
* <h3>Examples</h3>
<h4>Simple stepper Example</h4>
<pre><code>var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
var stepper = Ti.UI.iOS.createStepper({
top: 20,
tintColor:"green",
steps:3,
maximum:30,
minimum:0
});
stepper.addEventListener("change",function(e){
Ti.API.info(e.value);
});
win.add(stepper);
win.open();</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<p>stepper.xml:</p>
<pre><code><Alloy>
<Window class="container">
<Stepper id="stepper" onClick="doClick"
top="30" tintColor="green" steps ="3" />
</Window>
</Alloy>
</code></pre>
<p>stepper.js:</p>
<pre><code>function doClick(e) {
alert($.stepper.value);
}
$.index.open();
</code></pre>
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event postlayout
* @hide
* <p>Fired when a layout cycle is finished.</p>
* @description <p>This event is fired when the view and its ancestors have been laid out.
The {@link Titanium.UI.View#property-rect rect} and {@link Titanium.UI.View#property-size size} values
should be usable when this event is fired.</p>
<p>This event is typically triggered by either changing layout
properties or by changing the orientation of the device. Note that changing the
layout of child views or ancestors can also trigger a relayout of this view.
On Mobile Web, this event can also be triggered by resizing the browser window.</p>
<p>Note that altering any properties that affect layout from the <code>postlayout</code> callback
may result in an endless loop.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event change
* <p>Fired every time the stepper value changes.</p>
* @param {Number} value
<p>Current value of the stepper.</p>
* @param {Number} minimum
<p>The minimum value of the stepper.</p>
* @param {Number} maximum
<p>The maximum value of the stepper.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method getTintColor
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-tintColor} property.</p>
* @returns {String}
*/
/**
* @method setTintColor
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
*/
/**
* @method getBackgroundImage
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-backgroundImage} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundImage
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
*/
/**
* @method getEnabled
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-enabled} property.</p>
* @returns {Boolean}
*/
/**
* @method setEnabled
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-enabled} property.</p>
* @param {Boolean} enabled
<p>New value for the property.</p>
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-value} property.</p>
* @returns {Number}
*/
/**
* @method setValue
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-value} property.</p>
* @param {Number} value
<p>New value for the property.</p>
*/
/**
* @method getContinuous
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-continuous} property.</p>
* @returns {Boolean}
*/
/**
* @method setContinuous
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-continuous} property.</p>
* @param {Boolean} continuous
<p>New value for the property.</p>
*/
/**
* @method getAutorepeat
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-autorepeat} property.</p>
* @returns {Boolean}
*/
/**
* @method setAutorepeat
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-autorepeat} property.</p>
* @param {Boolean} autorepeat
<p>New value for the property.</p>
*/
/**
* @method getWraps
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-wraps} property.</p>
* @returns {Boolean}
*/
/**
* @method setWraps
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-wraps} property.</p>
* @param {Boolean} wraps
<p>New value for the property.</p>
*/
/**
* @method getMinimum
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-minimum} property.</p>
* @returns {Number}
*/
/**
* @method setMinimum
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-minimum} property.</p>
* @param {Number} minimum
<p>New value for the property.</p>
*/
/**
* @method getMaximum
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-maximum} property.</p>
* @returns {Number}
*/
/**
* @method setMaximum
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-maximum} property.</p>
* @param {Number} maximum
<p>New value for the property.</p>
*/
/**
* @method getSteps
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-steps} property.</p>
* @returns {Number}
*/
/**
* @method setSteps
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-steps} property.</p>
* @param {Number} steps
<p>New value for the property.</p>
*/
/**
* @method getDecrementImage
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-decrementImage} property.</p>
* @returns {String}
*/
/**
* @method setDecrementImage
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-decrementImage} property.</p>
* @param {String} decrementImage
<p>New value for the property.</p>
*/
/**
* @method getDecrementDisabledImage
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-decrementDisabledImage} property.</p>
* @returns {String}
*/
/**
* @method setDecrementDisabledImage
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-decrementDisabledImage} property.</p>
* @param {String} decrementDisabledImage
<p>New value for the property.</p>
*/
/**
* @method getIncrementImage
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-incrementImage} property.</p>
* @returns {String}
*/
/**
* @method setIncrementImage
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-incrementImage} property.</p>
* @param {String} incrementImage
<p>New value for the property.</p>
*/
/**
* @method getIncrementDisabledImage
* <p>Gets the value of the {@link Titanium.UI.iOS.Stepper#property-incrementDisabledImage} property.</p>
* @returns {String}
*/
/**
* @method setIncrementDisabledImage
* <p>Sets the value of the {@link Titanium.UI.iOS.Stepper#property-incrementDisabledImage} property.</p>
* @param {String} incrementDisabledImage
<p>New value for the property.</p>
*/
/**
* @property [tintColor=]
* @type String
* <p>Sets the color for the widget, any backgroundImages added will be set to the same color.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}.</p>
*/
/**
* @property [backgroundImage=Default behavior when `backgroundImage` is unspecified depends on the type of view and
the platform. For generic views, no image is used. For most controls (buttons, text
fields, and so on), platform-specific default images are used.
]
* @type String
* <p>Background image for the stepper in its normal state, specified as a local file path or URL.</p>
* @description <p>Also sets the background image for other stepper states (focused, selected),
unless they've been specified explicitly. On iOS, if backgroundDisabledImage is unset, the
image will appear faded to indicate being disabled. Also on iOS, if backgroundSelectedImage
is unset, the image will be darkened to indicate being selected.</p>
*/
/**
* @property enabled
* @type Boolean
* <p>Determines if the stepper is enabled or disabled.</p>
*/
/**
* @property value
* @type Number
* <p>The current value of the stepper.</p>
*/
/**
* @property continuous
* @type Boolean
* <p>If YES, value change events are sent immediately when the value changes during user interaction.
If NO, a value change event is sent when user interaction ends.
The default value is YES.</p>
*/
/**
* @property autorepeat
* @type Boolean
* <p>If YES, the user pressing and holding on the stepper repeatedly alters value.
The default value is YES.</p>
*/
/**
* @property wraps
* @type Boolean
* <p>If YES, incrementing beyond <Ti.UI.iOS.Stepper.maximum> sets value to <Ti.UI.iOS.Stepper.minimum>. likewise, decrementing below
<Ti.UI.iOS.Stepper.minimum> sets value to <Ti.UI.iOS.Stepper.maximum>. If NO, the stepper does not increment beyond <Ti.UI.iOS.Stepper.maximum> nor
does it decrement below <Ti.UI.iOS.Stepper.minimum> but rather holds at those values.
The default value is NO.</p>
*/
/**
* @property minimum
* @type Number
* <p>The minimum value the stepper will be set to, the value must be smaller than the maximumValue.
If you attempt to set a value equal to or greater than maximum, the system will default the
value to 0.</p>
*/
/**
* @property maximum
* @type Number
* <p>The maximum value the stepper will be set to, the value must be greater than the minimum.
If you attempt to set a value equal to or lower than minimum, the system will default the
value to 100.</p>
*/
/**
* @property steps
* @type Number
* <p>The value the stepper will increment and decrement by, default value for this property is 1.When setting
a new value, it must be greater than 1.</p>
*/
/**
* @property decrementImage
* @type String
* <p>Background image for the stepper decrement button in its normal state, specified as a local
file path or URL.</p>
* @description <p>Also sets the background image for the other stepper states (disabled, focused, selected),
unless they've been specified explicitly, except for iOS, which requires a backgroundImage.</p>
*/
/**
* @property decrementDisabledImage
* @type String
* <p>Background image for the stepper decrement button in its disabled state, specified as a local
file path or URL. The decrement button enters a disabled state ones the value is equal to the
minimumValue , setting the enabled property to false will have no effect to decrement button state.</p>
*/
/**
* @property incrementImage
* @type String
* <p>Background image for the stepper increment button in its normal state, specified as a local
file path or URL.</p>
* @description <p>Also sets the background image for the other stepper states (disabled, focused, selected),
unless they've been specified explicitly, except for iOS, which requires a backgroundImage.</p>
*/
/**
* @property incrementDisabledImage
* @type String
* <p>Background image for the stepper increment button in its disabled state, specified as a local
file path or URL.The increment button enters a disabled state ones the value is equal to the
maximumValue , setting the enabled property to false will have no effect to increment button state.</p>
*/
/**
* @class Titanium.UI.iOS.SystemButton
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/SystemButton.yml
* <p>A set of constants for creating standard iOS system buttons.</p>
* @description <p>Most of these constants are used with the
{@link Titanium.UI.Button#property-systemButton Button.systemButton} property to define a standard
iOS system buttons for use in navigation bars and toolbars. </p>
<p>See {@link Titanium.UI.Button} for more information on the <code>systemButton</code> property, including details
on where system buttons can be used. In an Alloy application you can omit the <code>Ti.UI.iOS.SystemButton</code>
namespace when assigning a value to the <code><Button></code> element's <code>systemButton</code> attribute, for example:</p>
<pre><code><Button systemButton="CAMERA"/>
<!-- Instead of -->
<Button systemButton="Titanium.UI.iOS.SystemButton.CAMERA"/>
</code></pre>
<p>A few of these constants are used with {@link Titanium.UI.Button#property-style Button.style} to
create standard iOS buttons that can be used in other places, including table view rows.
Note: Starting at Titanium SDK 5.0, all icons have are automatically sized in the native behavior
and are not distorted any more.
These standard button types are:</p>
<ul>
<li>{@link Titanium.UI.iOS.SystemButton#property-CONTACT_ADD CONTACT_ADD}</li>
<li>{@link Titanium.UI.iOS.SystemButton#property-DISCLOSURE DISCLOSURE}</li>
<li>{@link Titanium.UI.iOS.SystemButton#property-INFO_DARK INFO_DARK}</li>
<li>{@link Titanium.UI.iOS.SystemButton#property-INFO_LIGHT INFO_LIGHT}</li>
</ul>
<p>See Apple's
<a href="https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html">iOS Human Interface Guidelines</a>
in the iOS Developer Library for details on the proper usage of iOS standard buttons
and icons.</p>
*/
/**
* @property ACTION
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify an <strong>Action</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property ACTIVITY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to create an activity indicator that
can be used in navigation bars and toolbars. </p>
* @description <p>When visible, the activity indicator is already started.</p>
*/
/**
* @property ADD
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify an <strong>Add</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property BOOKMARKS
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Bookmarks</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property CAMERA
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Camera</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property CANCEL
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Cancel</strong> button.</p>
* @description <p>This button is displayed as a bordered button with localized text.</p>
<p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property COMPOSE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Compose</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property CONTACT_ADD
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-style Button.style} to specify a <strong>ContactAdd</strong> button.</p>
* @description <p>The resulting button is not restricted to use in navigation bars and toolbars. </p>
*/
/**
* @property DISCLOSURE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-style Button.style} to specify a <strong>Disclosure</strong> button.</p>
* @description <p>The resulting button is not restricted to use in navigation bars and toolbars.</p>
*/
/**
* @property DONE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Done</strong> button.</p>
* @description <p>This button is displayed as a bordered button with localized text.</p>
<p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property EDIT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify an <strong>Edit</strong> button.</p>
* @description <p>This button is displayed as a bordered button with localized text.</p>
<p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property FAST_FORWARD
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Fast Forward</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property FIXED_SPACE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to create a fixed-width blank space
for spacing items in toolbars.</p>
* @description <p>Only the <code>width</code> property is used when this value is set.</p>
*/
/**
* @property FLEXIBLE_SPACE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to create a flexible blank space
for spacing items in toolbars.</p>
* @description <p>The space is distributed equally between the other
items. Other item properties are ignored when this value is set.</p>
*/
/**
* @property INFO_DARK
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-style Button.style} to specify a dark-colored <strong>Info</strong> button.</p>
* @description <p>The resulting button is not restricted to use in navigation bars and toolbars. </p>
*/
/**
* @property INFO_LIGHT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-style Button.style} to specify a light-colored <strong>Info</strong> button.</p>
* @description <p>The resulting button is not restricted to use in navigation bars and toolbars. </p>
*/
/**
* @property ORGANIZE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify an <strong>Organize</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property PAUSE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Pause</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property PLAY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Play</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property REFRESH
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Refresh</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property REPLY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Reply</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property REWIND
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Rewind</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property SAVE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Save</strong> button.</p>
* @description <p>This button is displayed as a bordered button with localized text.</p>
<p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property SPINNER
* @type Number
* @readonly
* <p>Identical to {@link Titanium.UI.iOS.SystemButton#property-ACTIVITY ACTIVITY}.</p>
*/
/**
* @property STOP
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Stop</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property TRASH
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Trash</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @class Titanium.UI.iOS.SystemButtonStyle
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/SystemButtonStyle.yml
* <p>A set of constants for the system button styles that can be used for the button <code>style</code> property.</p>
* @description <p>These constants represent standard iOS system button styles that affect the
{@link Titanium.UI.Button Button}, {@link Titanium.UI.ButtonBar ButtonBar}, and
{@link Titanium.UI.iOS.TabbedBar TabbedBar} UI elements.</p>
<p>The different styles are used in different places. For normal buttons which are <strong>not</strong>
contained in a nav bar, toolbar, button bar or tabbed bar, the following styles apply:</p>
<ul>
<li><code>BORDERED</code>. Simple button style with a rounded border and a white background.
The default style for normal buttons.</li>
<li><code>DONE</code>. Like the bordered button, but with a blue background. Button style for a button
that indicates completion, such as OK, Save, or Go. </li>
<li><code>PLAIN</code> Button style for an undecorated button. </li>
</ul>
<p>Note that if you specify the <code>PLAIN</code> style, you must style the button using the other button
properties. For example, there is no indication that the button has been pressed unless you set
other properties for the selected state, such as <code>backgroundSelectedImage</code> and <code>selectedColor</code>.</p>
<p>When you add a button to a {@link Titanium.UI.iOS.Toolbar Toolbar}, the styles have a slightly
different effect:</p>
<ul>
<li><code>PLAIN</code> Button style for an undecorated button with large text and a <em>glow</em> effect when the
button is pressed. Default style for buttons in toolbars.</li>
<li><code>BORDERED</code>. Simple button style with a rounded border and a light blue background. </li>
<li><code>DONE</code>. Like the bordered button, but with a dark blue background. </li>
</ul>
<p>For <code>TabbedBar</code> and <code>ButtonBar</code> controls, styles have the following meaning:</p>
<ul>
<li><code>PLAIN</code>. Default style for <code>ButtonBar</code> and <code>TabbedBar</code>.</li>
<li><code>BORDERED</code>. Creates a bar like the <code>PLAIN</code> bar, but with a heavier border.</li>
<li><code>BAR</code>. Used on <code>ButtonBar</code> and <code>TabbedBar</code> controls to produce a more compact bar with
translucent buttons that allow the bar's background color to show through.</li>
</ul>
*/
/**
* @property BORDERED
* @type Number
* @readonly
* <p>A simple button style with a border.</p>
*/
/**
* @property DONE
* @type Number
* @readonly
* <p>The style for a <strong>Done</strong> button--for example, a button that completes some task and returns
to the previous view.</p>
* @description <p>Used in toolbars and navigation bars.</p>
*/
/**
* @property PLAIN
* @type Number
* @readonly
* <p>Specifies a borderless button, the default style for toolbars, button bars, and tabbed bars.</p>
* @description <p>In toolbars, this specifies an undecorated button with large text. A glow effect is used when
tapped.</p>
<p>In button bars and tabbed bars, specifies a button with large text that is highlighted when
tapped.</p>
<p>When used on a normal button (that is, outside of a navigation bar, toolbar, button bar or
tabbed bar), <code>PLAIN</code> specifies a button with no built-in decoration except its title text.
This is the style you should choose if you want to supply your own background images,
background gradient, and so on.</p>
<p>Note that for tabbed bar or button bars, the <code>Titanium.UI.iOS.SystemButtonStyle.BAR</code>
style is used to allow the bar's background color or gradient to show through.</p>
*/
/**
* @class Titanium.UI.iOS.TabbedBar
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/TabbedBar.yml
* <p>A button bar that maintains a selected state.</p>
* @description <p>A <code>TabbedBar</code> is a <code>ButtonBar</code> that maintains its state (visually distinguished as a pressed or
selected look). See {@link Titanium.UI.ButtonBar ButtonBar} for information on styling both tabbed bars and buttons bars.</p>
<p>You create a <code>TabbedBar</code> with the {@link Titanium.UI.iOS#method-createTabbedBar} factory method, or <strong><code><TabbedBar></code></strong> Alloy element.</p>
* <h3>Examples</h3>
<h4>Simple Tabbed Bar with 3 items</h4>
<p>Create a tabbed bar with 3 items.</p>
<pre><code>var bb1 = Titanium.UI.iOS.createTabbedBar({
labels:['One', 'Two', 'Three'],
backgroundColor:'#336699',
top:50,
style:Titanium.UI.iOS.SystemButtonStyle.BAR,
height:25,
width:200
});
win.add(bb1);
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy view.</p>
<pre><code><Alloy>
<Window id="win">
<TabbedBar id="bb1" platform="ios" backgroundColor="#369" top="50" height="25" width="200">
<!-- The Labels tag sets the TabbedBar.labels property. -->
<Labels>
<!-- Specify text with node text or the title attribute. -->
<!-- Can also specify the enabled, image and width attributes. -->
<Label>One</Label>
<Label>Two</Label>
<Label>Three</Label>
</Labels>
<!-- Place additional views for the TabbedBar here. -->
</TabbedBar>
</Window>
</Alloy>
</code></pre>
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event click
* <p>Fired when a button is clicked.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} index
<p>Index of the clicked button.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getIndex
* <p>Gets the value of the {@link Titanium.UI.iOS.TabbedBar#property-index} property.</p>
* @returns {Number}
*/
/**
* @method setIndex
* <p>Sets the value of the {@link Titanium.UI.iOS.TabbedBar#property-index} property.</p>
* @param {Number} index
<p>New value for the property.</p>
*/
/**
* @method getLabels
* <p>Gets the value of the {@link Titanium.UI.iOS.TabbedBar#property-labels} property.</p>
* @returns {String[]/BarItemType[]}
*/
/**
* @method setLabels
* <p>Sets the value of the {@link Titanium.UI.iOS.TabbedBar#property-labels} property.</p>
* @param {Array<String>/Array<BarItemType>} labels
<p>New value for the property.</p>
*/
/**
* @method getStyle
* <p>Gets the value of the {@link Titanium.UI.iOS.TabbedBar#property-style} property.</p>
* @returns {Number}
*/
/**
* @method setStyle
* <p>Sets the value of the {@link Titanium.UI.iOS.TabbedBar#property-style} property.</p>
* @param {Number} style
<p>New value for the property.</p>
*/
/**
* @property index
* @type Number
* <p>Index of the currently selected button.</p>
*/
/**
* @property labels
* @type String[]/BarItemType[]
* <p>Array of labels for the tabbed bar.</p>
* @description <p>The labels can be specified either using an array of strings, in which case each string
defines the title for a button, or using an array of simple dictionary objects,
{@link BarItemType}, which can specify title, image, width and enabled state for each button.</p>
*/
/**
* @property [style=Titanium.UI.iOS.SystemButtonStyle.PLAIN]
* @type Number
* <p>Style of the tabbed bar.</p>
* @description <p>The <code>BAR</code> style specifies a more compact style and allows the bar's background color or
gradient to show through.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iOS.SystemButtonStyle#property-BORDERED}
<li> {@link Titanium.UI.iOS.SystemButtonStyle#property-DONE}
<li> {@link Titanium.UI.iOS.SystemButtonStyle#property-PLAIN}
</ul></p>
*/
/**
* @class BarItemType
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/TabbedBar.yml
* <p>Object describing a button bar or tabbed bar item.</p>
* @description <p>A button bar or tabbed bar item can have an image or a title, but not both.
Buttons with images and buttons with text can be mixed in the same bar, however. </p>
<p>If both <code>image</code> and <code>title</code> properties are specified for a given item, the <code>image</code> property
takes precedence and the <code>title</code> property is ignored.</p>
*/
/**
* @property title
* @type String
* <p>Button title, used if no <code>image</code> is specified.</p>
*/
/**
* @property image
* @type String/Titanium.Blob/Titanium.Filesystem.File
* <p>Button icon. If specified, takes precedence over <code>title</code>.</p>
*/
/**
* @property width
* @type Number
* <p>Width for this button.</p>
*/
/**
* @property [enabled=true]
* @type Boolean
* <p>Whether the button is enabled initially.</p>
*/
/**
* @property accessibilityLabel
* @type String
* <p>A succint label associated with the bar item for the device's accessibility service.</p>
* @description <p>See {@link Titanium.UI.View#property-accessibilityLabel} description.</p>
* @platform iphone 3.0.0
* @platform ipad 3.0.0
*/
/**
* @class Titanium.UI.iOS.TableViewCellSelectionStyle
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/TableViewCellSelectionStyle.yml
* <p>A set of constants for the style that can be used for the <code>selectionStyle</code> property of
{@link Titanium.UI.TableViewRow}.</p>
*/
/**
* @property BLUE
* @type Number
* @readonly
* <p>The cell when selected has a blue background. This is the default value.</p>
*/
/**
* @property GRAY
* @type Number
* @readonly
* <p>Then cell when selected has a gray background.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>The cell has no distinct style for when it is selected.</p>
*/
/**
* @class Titanium.UI.iOS.TableViewScrollPosition
* @platform iphone 5.4.0
* @platform ipad 5.4.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/TableViewScrollPosition.yml
* <p>A set of constants for the position value that can be used for the <code>position</code> property of
{@link Titanium.UI.TableView} when invoking <code>scrollToIndex</code>.</p>
*/
/**
* @property BOTTOM
* @type Number
* @readonly
* <p>The table view scrolls the row of interest to the bottom of the visible table view.</p>
*/
/**
* @property MIDDLE
* @type Number
* @readonly
* <p>The table view scrolls the row of interest to the middle of the visible table view.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>The table view scrolls the row of interest to be fully visible with a minimum of movement. If the row is already fully visible, no scrolling occurs. For example, if the row is above the visible area, the behavior is identical to that specified by <code>TOP</code>. This is the default.</p>
*/
/**
* @property TOP
* @type Number
* @readonly
* <p>The table view scrolls the row of interest to the top of the visible table view.</p>
*/
/**
* @class Titanium.UI.iOS.TableViewStyle
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/TableViewStyle.yml
* <p>A set of constants for the style that can be used for the button <code>style</code> property of
{@link Titanium.UI.TableView}.</p>
*/
/**
* @property GROUPED
* @type Number
* @readonly
* <p>A table view whose sections present distinct groups of rows. The section headers and footers
do not float.</p>
*/
/**
* @property PLAIN
* @type Number
* @readonly
* <p>A plain table view. Any section headers or footers are displayed as inline separators and
float when the table view is scrolled.</p>
*/
/**
* @class Titanium.UI.iOS.Toolbar
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/Toolbar.yml
* <p>An iOS toolbar, which can contain buttons and certain other controls.</p>
* @description <p>A <code>Toolbar</code> is created by the {@link Titanium.UI.iOS#method-createToolbar} factory method or <strong><code><Toolbar></code></strong> Alloy element.</p>
<p>A <code>Toolbar</code> can contain buttons, as well as certain other widgets, including text fields and
labels. </p>
<p>To provide spacing between items in the toolbar, you can use the special iOS system button types,
{@link Titanium.UI.iOS.SystemButton#property-FIXED_SPACE FIXED_SPACE} and
{@link Titanium.UI.iOS.SystemButton#property-FLEXIBLE_SPACE FLEXIBLE_SPACE}.</p>
<p>Note that toolbars are positioned like other views (using the <code>top</code> and <code>bottom</code> properties,
for example), but the <a href="https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/Bars.html#//apple_ref/doc/uid/TP40006556-CH12-SW4">iOS Human Interface Guidelines</a>
have specific requirements for placing toolbars, specifically:</p>
<ul>
<li>On iPhone, a toolbar should be at the bottom of the window.</li>
<li>On the iPad, a toolbar should appear at the top or bottom of a window.</li>
</ul>
<p>You can specify that a border be drawn on the top or bottom of the toolbar, using the
{@link Titanium.UI.iOS.Toolbar#property-borderTop borderTop} and
{@link Titanium.UI.iOS.Toolbar#property-borderBottom borderBottom} properties. The standard
<code>borderColor</code>, <code>borderWidth</code>, and <code>borderRadius</code> properties are also supported but using
them adds a border on all four sides of the control, which may be undesirable.</p>
<p>Due to an iOS limitation, the buttons in the toolbar only support the <code>click</code> event.
The native object underlying a toolbar button does not generate standard view events,
such as <code>touchstart</code> and <code>touchend</code>.</p>
<p>See also:</p>
<ul>
<li><a href="https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/Bars.html#//apple_ref/doc/uid/TP40006556-CH12-SW4">Toolbar in the iOS Human Interface Guidelines.</a></li>
</ul>
* <h3>Examples</h3>
<h4>Simple Toolbar</h4>
<p>The following code excerpt creates a simple toolbar, placed at the bottom of the window. </p>
<pre><code>var send = Titanium.UI.createButton({
title: 'Send',
style: Titanium.UI.iOS.SystemButtonStyle.DONE,
});
var camera = Titanium.UI.createButton({
systemButton: Titanium.UI.iOS.SystemButton.CAMERA,
});
var cancel = Titanium.UI.createButton({
systemButton: Titanium.UI.iOS.SystemButton.CANCEL
});
var flexSpace = Titanium.UI.createButton({
systemButton:Titanium.UI.iOS.SystemButton.FLEXIBLE_SPACE
});
var toolbar = Titanium.UI.iOS.createToolbar({
items:[send, flexSpace, camera, flexSpace, cancel],
bottom:0,
borderTop:true,
borderBottom:false
});
win.add(toolbar);
</code></pre>
<p>Note the use of the flexible space for positioning the toolbar buttons -- the
<code>FLEXIBLE_SPACE</code> button doesn't appear as a button, but a variable space between the
controls on either side of it. Available space in the toolbar is divided between all of the
flexible space buttons in the toolbar. Without the flexible spaces in this example,
the toolbar buttons would be grouped tightly together on the left side of the toolbar.</p><h4>Toolbar with extended background</h4>
<p>The following code excerpt creates a simple toolbar, placed at the top of the window which extends its background under the status bar (<strong>iOS 7 only</strong>). </p>
<pre><code>var send = Titanium.UI.createButton({
title: 'Send',
style: Titanium.UI.iOS.SystemButtonStyle.DONE,
});
var camera = Titanium.UI.createButton({
systemButton: Titanium.UI.iOS.SystemButton.CAMERA,
});
var cancel = Titanium.UI.createButton({
systemButton: Titanium.UI.iOS.SystemButton.CANCEL
});
flexSpace = Titanium.UI.createButton({
systemButton:Titanium.UI.iOS.SystemButton.FLEXIBLE_SPACE
});
var toolbar = Titanium.UI.iOS.createToolbar({
items:[send, flexSpace, camera, flexSpace, cancel],
top:20,
extendBackground:true
});
var win = Ti.UI.createWindow({backgroundColor:'red'});
win.add(toolbar);
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Simple Toolbar example as an Alloy view.</p>
<pre><code><Alloy>
<Window id="win">
<Toolbar platform="ios" bottom="0" borderTop="true" borderBottom="false">
<!-- The Items tag sets the Toolbar.items property. -->
<Items>
<Button id="send" title="Send" style="DONE" />
<FlexSpace/>
<Button id="camera" systemButton="CAMERA" />
<FlexSpace/>
<Button id="cancel" systemButton="CANCEL" />
</Items>
<!-- Place additional views for the Toolbar here. -->
</Toolbar>
</Window>
</Alloy>
</code></pre>
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundRepeat
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.Toolbar#property-backgroundRepeat} property.</p>
* @returns {Boolean}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundRepeat
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.Toolbar#property-backgroundRepeat} property.</p>
* @param {Boolean} backgroundRepeat
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundLeftCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.Toolbar#property-backgroundLeftCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundLeftCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.Toolbar#property-backgroundLeftCap} property.</p>
* @param {Number} backgroundLeftCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundTopCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.Toolbar#property-backgroundTopCap} property.</p>
* @returns {Number}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundTopCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.Toolbar#property-backgroundTopCap} property.</p>
* @param {Number} backgroundTopCap
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.Toolbar#property-backgroundColor} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.Toolbar#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getLayout
* @hide
* <p>Gets the value of the {@link Titanium.UI.iOS.Toolbar#property-layout} property.</p>
* @returns {String}
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method setLayout
* @hide
* <p>Sets the value of the {@link Titanium.UI.iOS.Toolbar#property-layout} property.</p>
* @param {String} layout
<p>New value for the property.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @method getBarColor
* <p>Gets the value of the {@link Titanium.UI.iOS.Toolbar#property-barColor} property.</p>
* @returns {String}
*/
/**
* @method setBarColor
* <p>Sets the value of the {@link Titanium.UI.iOS.Toolbar#property-barColor} property.</p>
* @param {String} barColor
<p>New value for the property.</p>
*/
/**
* @method getItems
* <p>Gets the value of the {@link Titanium.UI.iOS.Toolbar#property-items} property.</p>
* @returns {Titanium.UI.View[]}
*/
/**
* @method setItems
* <p>Sets the value of the {@link Titanium.UI.iOS.Toolbar#property-items} property.</p>
* @param {Array<Titanium.UI.View>} items
<p>New value for the property.</p>
*/
/**
* @method getBorderTop
* <p>Gets the value of the {@link Titanium.UI.iOS.Toolbar#property-borderTop} property.</p>
* @returns {Boolean}
*/
/**
* @method setBorderTop
* <p>Sets the value of the {@link Titanium.UI.iOS.Toolbar#property-borderTop} property.</p>
* @param {Boolean} borderTop
<p>New value for the property.</p>
*/
/**
* @method getBorderBottom
* <p>Gets the value of the {@link Titanium.UI.iOS.Toolbar#property-borderBottom} property.</p>
* @returns {Boolean}
*/
/**
* @method setBorderBottom
* <p>Sets the value of the {@link Titanium.UI.iOS.Toolbar#property-borderBottom} property.</p>
* @param {Boolean} borderBottom
<p>New value for the property.</p>
*/
/**
* @method getExtendBackground
* <p>Gets the value of the {@link Titanium.UI.iOS.Toolbar#property-extendBackground} property.</p>
* @returns {Boolean}
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method setExtendBackground
* <p>Sets the value of the {@link Titanium.UI.iOS.Toolbar#property-extendBackground} property.</p>
* @param {Boolean} extendBackground
<p>New value for the property.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @method getTranslucent
* <p>Gets the value of the {@link Titanium.UI.iOS.Toolbar#property-translucent} property.</p>
* @returns {Boolean}
*/
/**
* @method setTranslucent
* <p>Sets the value of the {@link Titanium.UI.iOS.Toolbar#property-translucent} property.</p>
* @param {Boolean} translucent
<p>New value for the property.</p>
*/
/**
* @property [backgroundRepeat=false]
* @hide
* @type Boolean
* <p>Determines whether to tile a background across a view.</p>
* @description <p>Setting this to <code>true</code> makes the set <code>backgroundImage</code> repeat across the view as a series
of tiles. The tiling begins in the upper-left corner, where the upper-left corner of the
background image is rendered. The image is then tiled to fill the available space of the
view.</p>
<p>Note that setting this to <code>true</code> may incur performance penalties for large views or
background images, as the tiling must be redone whenever a view is resized.</p>
<p>On iOS, the following views do not currently support tiled backgrounds:</p>
<ul>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.TextField}</li>
<li>{@link Titanium.UI.Label}</li>
</ul>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundLeftCap=0]
* @hide
* @type Number
* <p>Size of the left end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundTopCap=0]
* @hide
* @type Number
* <p>Size of the top end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [backgroundColor=Transparent]
* @hide
* @type String
* <p>Background color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property [layout=Composite layout]
* @hide
* @type String
* <p>Specifies how the view positions its children.
One of: 'composite', 'vertical', or 'horizontal'.</p>
* @description <p>There are three layout options:</p>
<ul>
<li><p><code>composite</code> (or <code>absolute</code>). Default layout. A child view is positioned based on its
positioning properties or "pins" (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code> and <code>center</code>).
If no positioning properties are specified, the child is centered. </p>
<p>The child is always sized based on its <code>width</code> and <code>height</code> properties, if these are
specified. If the child's height or width is <em>not</em> specified explicitly, it may be
calculated implicitly from the positioning properties. For example, if both <code>left</code> and
<code>center.x</code> are specified, they can be used to calculate the width of the child control. </p>
<p>Because the size and position properties can conflict, there is a specific precedence
order for the layout properties. For vertical positioning, the precedence
order is: <code>height</code>, <code>top</code>, <code>center.y</code>, <code>bottom</code>.</p>
<p>The following table summarizes the various combinations of properties that can
be used for vertical positioning, in order from highest precedence to lowest.
(For example, if <code>height</code>, <code>center.y</code> and <code>bottom</code> are all specified, the
<code>height</code> and <code>center.y</code> values take precedence.)</p>
<table cellpadding="6px" border="1" rules="all">
<tr>
<th>Scenario</th><th>Behavior</th>
</tr>
<tr>
<td>`height` & `top` specified</td><td>Child positioned `top` unit from
parent's top, using specified `height`;
any `center.y` and `bottom` values are ignored.</td>
</tr>
<tr>
<td>`height` & `center.y` specified</td><td>Child positioned with center at
`center.y`, using specified `height`; any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`height` & `bottom` specified</td><td>Child positioned `bottom` units from
parent's bottom, using specified `height`.</td>
</tr>
<tr>
<td>`top` & `center.y` specified</td><td>Child positioned with top edge `top` units from
parent's top and center at `center.y`. Height is determined implicitly;
any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`top` & `bottom` specified</td><td>Child positioned with top edge `top` units from
parent's top and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly. </td>
</tr>
<tr>
<td>Only `top` specified</td><td>Child positioned `top` units from parent's
top, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`center.y` and `bottom` specified</td><td>Child positioned with center at
`center.y` and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly.</td>
</tr>
<tr>
<td>Only `center.y` specified</td><td>Child positioned with center at
`center.y`, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>Only `bottom` specified</td><td>Child positioned with bottom edge `bottom`
units from parent's bottom, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`height`, `top`, `center.y`, and `bottom` unspecified</td><td>Child
centered vertically in the parent and uses the default height calculation
for the child view type.</td>
</tr>
</table>
<p>Horizontal positioning works like vertical positioning, except that the
precedence is <code>width</code>, <code>left</code>, <code>center.x</code>, <code>right</code>. </p>
<p>For complete details on composite layout rules, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>
in the Titanium Mobile Guides. </p>
<ul><li><code>vertical</code>. Children are laid out vertically from top to bottom. The first child
is laid out <code>top</code> units from its parent's bounding box. Each subsequent child is
laid out below the previous child. The space between children is equal to the
upper child's <code>bottom</code> value plus the lower child's <code>top</code> value. </li></ul>
<p>Each child is positioned horizontally as in the composite layout mode. </p>
<ul><li><code>horizontal</code>. Horizontal layouts have different behavior depending on whether wrapping
is enabled. Wrapping is enabled by default (the <code>horizontalWrap</code> property is <code>true</code>).</li></ul>
<p>With wrapping behavior, the children are laid out horizontally from left to right,
<em>in rows</em>. If a child requires more horizontal space than exists in the current row,
it is wrapped to a new row. The height of each row is equal to the maximum height of
the children in that row.</p>
<p>Wrapping behavior is available on iOS, Android and Mobile Web (Release 2.1.0 and later).
When the <code>horizontalWrap</code> property is set to true, the first row is placed at the top of the
parent view, and successive rows are placed below the first row. Each child is
positioned vertically <em>within its row</em> somewhat like composite layout mode.
In particular: </p>
<ul><li>If neither <code>top</code> or <code>bottom</code> is specified, the child is centered in the
row.</li>
<li>If either <code>top</code> or <code>bottom</code> is specified, the child is aligned to either
the top or bottom of the row, with the specified amount of padding.</li>
<li>If <em>both</em> <code>top</code> and <code>bottom</code> is specified for a given child, the properties
are both treated as padding.</li></ul>
<p>If the <code>horizontalWrap</code> property is false, the behavior is more equivalent to a vertical layout.
Children are laid or horizontally from left to right in a single row. The <code>left</code> and
<code>right</code> properties are used as padding between the children, and the <code>top</code> and <code>bottom</code>
properties are used to position the children vertically.</p>
<p>On Mobile Web <em>prior to</em> Release 2.1.0, the horizontal layout does not wrap by default,
and does not support the <code>horizontalWrap</code> property. On Android and iOS <em>prior to</em> Release
2.1.0, the horizontal layout always wraps and the <code>horizontalWrap</code> property is not supported.</p></li>
</ul>
* @platform iphone 0.9
* @platform ipad 0.9
*/
/**
* @property barColor
* @type String
* <p>Background color for the toolbar, as a color name or hex triplet.</p>
* @description <p>To use a background image on the toolbar, either <code>barColor</code> must be a fully or
partially transparent color,
or the {@link Titanium.UI.iOS.Toolbar#property-translucent translucent} property must be <code>true</code>.</p>
<p>To use a background gradient on a toolbar, <code>barColor</code> must be <code>'transparent'</code>
<em>and</em> the the {@link Titanium.UI.iOS.Toolbar#property-translucent translucent} property must be <code>true</code>.</p>
<p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property items
* @type Titanium.UI.View[]
* <p>An array of buttons (or other widgets) contained in the toolbar.</p>
*/
/**
* @property [borderTop=true]
* @type Boolean
* <p>If <code>true</code>, a border is drawn on the top of the toolbar. This property is ignored on iOS 7 and above.</p>
*/
/**
* @property [borderBottom=true]
* @type Boolean
* <p>If <code>true</code>, a border is drawn on the bottom of the toolbar. This property is ignored on iOS 7 and above.</p>
*/
/**
* @property [extendBackground=Undefined. Behaves as if set to false.]
* @type Boolean
* @creationOnly
* <p>If <code>true</code>, the background of the toolbar extends upwards.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property allows the user to specify that the toolbar's background show through the status bar on iOS 7. This property is
only intended to be used with toolbars hosted in windows with <strong>no navigation controllers</strong>. The toolbar must be placed at the
top of the screen just below the status bar for this property to work as expected. This <strong>must</strong> be specified at creation.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property [translucent=true on iOS 7 and above. false otherwise.]
* @type Boolean
* <p>If <code>true</code>, a translucent background color is used for the toolbar.</p>
* @description <p>Note that if <code>translucent</code> is <code>false</code>, views under the toolbar are hidden, even
if {@link Titanium.UI.iOS.Toolbar#property-barColor barColor} is set to a semi-transparent or
transparent color.</p>
*/
/**
* @class Titanium.UI.iOS.ViewAttachmentBehavior
* @platform iphone 3.2
* @platform ipad 3.2
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/ViewAttachmentBehavior.yml
* <p>Dynamic behavior to support connections between two items.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>The following APIs are supported on iOS 7 and later.</p>
<p>A view attachment behavior creates a dynamic connection between two items. To define a view
attachment behavior:</p>
<ol>
<li>Use the {@link Titanium.UI.iOS#method-createViewAttachmentBehavior} method to create and define a behavior.</li>
<li>Set the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-anchorItem anchorItem} and
{@link Titanium.UI.iOS.ViewAttachmentBehavior#property-item item} properties.</li>
<li>Add the behavior to the {@link Titanium.UI.iOS.Animator Animator object}.</li>
</ol>
<p>To create a dynamic connection between an item and anchor point, use {@link Titanium.UI.iOS.AnchorAttachmentBehavior}.</p>
* <h3>Examples</h3>
<h4>Simple Example</h4>
<p>The following example anchors a green block to either a red or blue block. Click on the red
or blue block to change which one the green block is anchored to.</p>
<p><img src="images/animator/viewattachment.gif" height= 275" style="border:1px solid black"/></p>
<pre><code>var win = Ti.UI.createWindow({backgroundColor: 'white', fullscreen: true});
// Create an Animator object using the window as the coordinate system
var animator = Ti.UI.iOS.createAnimator({referenceView: win});
var redBlock = Ti.UI.createView({
backgroundColor: 'red',
width: 25,
height: 25,
top: 10,
left: 75
});
// Snap the red block so it does not move
var redSnap = Ti.UI.iOS.createSnapBehavior({
snapPoint: {x: 75, y: 10},
item: redBlock,
damping: 0.0
});
animator.addBehavior(redSnap);
var greenBlock = Ti.UI.createView({
backgroundColor: 'green',
width: 25,
height: 25,
top: 50,
});
var WIDTH = Ti.Platform.displayCaps.platformWidth;
var blueBlock = Ti.UI.createView({
backgroundColor: 'blue',
width: 25,
height: 25,
top: 10,
right: 75
});
// Snap the blue block so it does not move
var blueSnap = Ti.UI.iOS.createSnapBehavior({
snapPoint: {x: WIDTH - 75, y: 10},
item: blueBlock,
damping: 0.0
});
animator.addBehavior(blueSnap);
// Anchor the green block to the red one when the app starts
var anchor = Ti.UI.iOS.createViewAttachmentBehavior({
anchorItem: redBlock,
item: greenBlock
});
animator.addBehavior(anchor);
// Simulate Earth's gravity to allow the green block to swing
var gravity = Ti.UI.iOS.createGravityBehavior({
gravityDirection: {x: 0.0, y: 1.0}
});
gravity.addItem(greenBlock);
animator.addBehavior(gravity);
// Change the anchor item when clicking either the red or blue block
redBlock.addEventListener('click', function(e){
anchor.anchorItem = redBlock;
});
blueBlock.addEventListener('click', function(e){
anchor.anchorItem = blueBlock;
});
// Start the animation when the window opens
win.addEventListener('open', function(e){
animator.startAnimator();
});
win.add(redBlock);
win.add(greenBlock);
win.add(blueBlock);
win.open();
</code></pre>
*/
/**
* @method getAnchorItem
* <p>Gets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-anchorItem} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setAnchorItem
* <p>Sets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-anchorItem} property.</p>
* @param {Titanium.UI.View} anchorItem
<p>New value for the property.</p>
*/
/**
* @method getAnchorOffset
* <p>Gets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-anchorOffset} property.</p>
* @returns {Point}
*/
/**
* @method setAnchorOffset
* <p>Sets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-anchorOffset} property.</p>
* @param {Point} anchorOffset
<p>New value for the property.</p>
*/
/**
* @method getDamping
* <p>Gets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-damping} property.</p>
* @returns {Number}
*/
/**
* @method setDamping
* <p>Sets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-damping} property.</p>
* @param {Number} damping
<p>New value for the property.</p>
*/
/**
* @method getDistance
* <p>Gets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-distance} property.</p>
* @returns {Number}
*/
/**
* @method setDistance
* <p>Sets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-distance} property.</p>
* @param {Number} distance
<p>New value for the property.</p>
*/
/**
* @method getFrequency
* <p>Gets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-frequency} property.</p>
* @returns {Number}
*/
/**
* @method setFrequency
* <p>Sets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-frequency} property.</p>
* @param {Number} frequency
<p>New value for the property.</p>
*/
/**
* @method getItem
* <p>Gets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-item} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setItem
* <p>Sets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-item} property.</p>
* @param {Titanium.UI.View} item
<p>New value for the property.</p>
*/
/**
* @method getItemOffset
* <p>Gets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-itemOffset} property.</p>
* @returns {Point}
*/
/**
* @method setItemOffset
* <p>Sets the value of the {@link Titanium.UI.iOS.ViewAttachmentBehavior#property-itemOffset} property.</p>
* @param {Point} itemOffset
<p>New value for the property.</p>
*/
/**
* @property anchorItem
* @type Titanium.UI.View
* <p>Item to use as the anchor in this behavior.</p>
*/
/**
* @property [anchorOffset=(0,0)]
* @type Point
* <p>Offset from the center point of the anchor item for the attachment.</p>
*/
/**
* @property [damping=0]
* @type Number
* <p>Amount of damping to apply to the attachment behavior.</p>
*/
/**
* @property [distance=0]
* @type Number
* <p>Distance, in points, between the two attachment points.</p>
*/
/**
* @property [frequency=0]
* @type Number
* <p>Frequency of oscillation for the behavior.</p>
*/
/**
* @property item
* @type Titanium.UI.View
* <p>Item to connect to use the attachment behavior.</p>
*/
/**
* @property [itemOffset=(0,0)]
* @type Point
* <p>Offset from the center point of the item for the attachment.</p>
*/
/**
* @class Titanium.UI.iOS
* @platform iphone 1.4
* @platform ipad 1.4
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/iOS.yml
* <p>Apple iOS specific UI capabilities. All properties, methods and events in this namespace will
only work on Apple iOS devices.</p>
*/
/**
* @method createTransitionAnimation
* <p>Creates a transition animation when opening or closing windows in a
{@link Titanium.UI.iOS.NavigationWindow} or {@link Titanium.UI.Tab}.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use the object returned by this method with the Window's
{@link Titanium.UI.Window#property-transitionAnimation transitionAnimation} property.</p>
<p>Supported on iOS 7 and later.</p>
* @param {transitionAnimationParam} transition
<p>Dictionary specifying the transition animation.</p>
* @returns {Titanium.Proxy}
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @method create3DMatrix
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.3DMatrix}.</p>
* @removed 6.0.0 Use <Titanium.UI.3DMatrix> instead.
* @param {Dictionary<Titanium.UI.iOS.3DMatrix>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.3DMatrix} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.3DMatrix}
*/
/**
* @method createAdView
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.AdView}.</p>
* @param {Dictionary<Titanium.UI.iOS.AdView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.AdView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.AdView}
*/
/**
* @method createAnchorAttachmentBehavior
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.AnchorAttachmentBehavior}.</p>
* @param {Dictionary<Titanium.UI.iOS.AnchorAttachmentBehavior>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.AnchorAttachmentBehavior} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.AnchorAttachmentBehavior}
* @platform iphone 3.2
* @platform ipad 3.2
*/
/**
* @method createAnimator
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.Animator}.</p>
* @param {Dictionary<Titanium.UI.iOS.Animator>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.Animator} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.Animator}
* @platform iphone 3.2
* @platform ipad 3.2
*/
/**
* @method createApplicationShortcuts
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.ApplicationShortcuts}.</p>
* @param {Dictionary<Titanium.UI.iOS.ApplicationShortcuts>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.ApplicationShortcuts} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.ApplicationShortcuts}
* @platform iphone 5.1.0
*/
/**
* @method createAttribute
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.Attribute}.</p>
* @removed 6.0.0 Use <Attribute> instead.
* @param {Dictionary<Titanium.UI.iOS.Attribute>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.Attribute} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.Attribute}
* @platform iphone 3.2
* @platform ipad 3.2
*/
/**
* @method createAttributedString
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.AttributedString}.</p>
* @removed 6.0.0 Use <Titanium.UI.AttributedString> instead.
* @param {Dictionary<Titanium.UI.iOS.AttributedString>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.AttributedString} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.AttributedString}
* @platform iphone 3.2
* @platform ipad 3.2
*/
/**
* @method createBlurView
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.BlurView}.</p>
* @param {Dictionary<Titanium.UI.iOS.BlurView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.BlurView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.BlurView}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method createCollisionBehavior
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.CollisionBehavior}.</p>
* @param {Dictionary<Titanium.UI.iOS.CollisionBehavior>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.CollisionBehavior} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.CollisionBehavior}
* @platform iphone 3.2
* @platform ipad 3.2
*/
/**
* @method createCoverFlowView
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.CoverFlowView}.</p>
* @param {Dictionary<Titanium.UI.iOS.CoverFlowView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.CoverFlowView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.CoverFlowView}
*/
/**
* @method createDocumentViewer
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.DocumentViewer}.</p>
* @param {Dictionary<Titanium.UI.iOS.DocumentViewer>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.DocumentViewer} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.DocumentViewer}
* @platform iphone 2.1.1
* @platform ipad 2.1.1
*/
/**
* @method createDynamicItemBehavior
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.DynamicItemBehavior}.</p>
* @param {Dictionary<Titanium.UI.iOS.DynamicItemBehavior>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.DynamicItemBehavior} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.DynamicItemBehavior}
* @platform iphone 3.2
* @platform ipad 3.2
*/
/**
* @method createFeedbackGenerator
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.FeedbackGenerator}.</p>
* @param {Dictionary<Titanium.UI.iOS.FeedbackGenerator>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.FeedbackGenerator} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.FeedbackGenerator}
* @platform iphone 6.0.0
*/
/**
* @method createGravityBehavior
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.GravityBehavior}.</p>
* @param {Dictionary<Titanium.UI.iOS.GravityBehavior>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.GravityBehavior} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.GravityBehavior}
* @platform iphone 3.2
* @platform ipad 3.2
*/
/**
* @method createLivePhotoView
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.LivePhotoView}.</p>
* @param {Dictionary<Titanium.UI.iOS.LivePhotoView>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.LivePhotoView} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.LivePhotoView}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
* @method createMenuPopup
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.MenuPopup}.</p>
* @param {Dictionary<Titanium.UI.iOS.MenuPopup>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.MenuPopup} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.MenuPopup}
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @method createNavigationWindow
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.NavigationWindow}.</p>
* @param {Dictionary<Titanium.UI.iOS.NavigationWindow>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.NavigationWindow} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.NavigationWindow}
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @method createPreviewAction
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.PreviewAction}.</p>
* @param {Dictionary<Titanium.UI.iOS.PreviewAction>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.PreviewAction} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.PreviewAction}
* @platform iphone 5.1.0
*/
/**
* @method createPreviewActionGroup
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.PreviewActionGroup}.</p>
* @param {Dictionary<Titanium.UI.iOS.PreviewActionGroup>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.PreviewActionGroup} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.PreviewActionGroup}
* @platform iphone 5.1.0
*/
/**
* @method createPreviewContext
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.PreviewContext}.</p>
* @param {Dictionary<Titanium.UI.iOS.PreviewContext>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.PreviewContext} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.PreviewContext}
* @platform iphone 5.1.0
*/
/**
* @method createPushBehavior
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.PushBehavior}.</p>
* @param {Dictionary<Titanium.UI.iOS.PushBehavior>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.PushBehavior} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.PushBehavior}
* @platform iphone 3.2
* @platform ipad 3.2
*/
/**
* @method createSnapBehavior
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.SnapBehavior}.</p>
* @param {Dictionary<Titanium.UI.iOS.SnapBehavior>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.SnapBehavior} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.SnapBehavior}
* @platform iphone 3.2
* @platform ipad 3.2
*/
/**
* @method createSplitWindow
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.SplitWindow}.</p>
* @param {Dictionary<Titanium.UI.iOS.SplitWindow>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.SplitWindow} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.SplitWindow}
* @platform iphone 3.6.0
* @platform ipad 3.6.0
*/
/**
* @method createStepper
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.Stepper}.</p>
* @param {Dictionary<Titanium.UI.iOS.Stepper>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.Stepper} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.Stepper}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method createSystemButton
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.SystemButton}.</p>
* @param {Dictionary<Titanium.UI.iOS.SystemButton>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.SystemButton} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.SystemButton}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method createTabbedBar
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.TabbedBar}.</p>
* @param {Dictionary<Titanium.UI.iOS.TabbedBar>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.TabbedBar} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.TabbedBar}
*/
/**
* @method createToolbar
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.Toolbar}.</p>
* @param {Dictionary<Titanium.UI.iOS.Toolbar>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.Toolbar} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.Toolbar}
*/
/**
* @method createViewAttachmentBehavior
* <p>Creates and returns an instance of {@link Titanium.UI.iOS.ViewAttachmentBehavior}.</p>
* @param {Dictionary<Titanium.UI.iOS.ViewAttachmentBehavior>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iOS.ViewAttachmentBehavior} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iOS.ViewAttachmentBehavior}
* @platform iphone 3.2
* @platform ipad 3.2
*/
/**
* @method getForceTouchSupported
* <p>Gets the value of the {@link Titanium.UI.iOS#property-forceTouchSupported} property.</p>
* @returns {Boolean}
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @method getAppBadge
* <p>Gets the value of the {@link Titanium.UI.iOS#property-appBadge} property.</p>
* @returns {Number}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method setAppBadge
* <p>Sets the value of the {@link Titanium.UI.iOS#property-appBadge} property.</p>
* @param {Number} appBadge
<p>New value for the property.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method getAppSupportsShakeToEdit
* <p>Gets the value of the {@link Titanium.UI.iOS#property-appSupportsShakeToEdit} property.</p>
* @returns {Boolean}
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method setAppSupportsShakeToEdit
* <p>Sets the value of the {@link Titanium.UI.iOS#property-appSupportsShakeToEdit} property.</p>
* @param {Boolean} appSupportsShakeToEdit
<p>New value for the property.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @method getStatusBarBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.iOS#property-statusBarBackgroundColor} property.</p>
* @returns {String}
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @method setStatusBarBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.iOS#property-statusBarBackgroundColor} property.</p>
* @param {String} statusBarBackgroundColor
<p>New value for the property.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property ANIMATION_CURVE_EASE_IN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Animation#property-curve Animation.curve} to specify an animation that starts
slowly and speeds up.</p>
* @removed 6.0.0 Use <Titanium.UI.ANIMATION_CURVE_EASE_IN> instead.
*/
/**
* @property ANIMATION_CURVE_EASE_IN_OUT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Animation#property-curve Animation.curve} to specify an animation that starts
slowly, and speeds up, then slows down at the end of the animation.</p>
* @removed 6.0.0 Use <Titanium.UI.ANIMATION_CURVE_EASE_IN_OUT> instead.
*/
/**
* @property ANIMATION_CURVE_EASE_OUT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Animation#property-curve Animation.curve} to specify an animation that starts
quickly, then slows down at the end of the animation.</p>
* @removed 6.0.0 Use <Titanium.UI.ANIMATION_CURVE_EASE_OUT> instead.
*/
/**
* @property ANIMATION_CURVE_LINEAR
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Animation#property-curve Animation.curve} to specify an animation that proceeds
at a constant rate.</p>
* @removed 6.0.0 Use <Titanium.UI.ANIMATION_CURVE_LINEAR> instead.
*/
/**
* @property ATTRIBUTE_FONT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to specify a font.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_FONT> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Use a {@link Font} dictionary for {@link Attribute#property-value}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_FOREGROUND_COLOR
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to specify a font color.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_FOREGROUND_COLOR> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Use a color name or hex value for {@link Attribute#property-value}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_BACKGROUND_COLOR
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to specify a background color.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_BACKGROUND_COLOR> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Use a color name or hex value for {@link Attribute#property-value}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_LIGATURE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to enable or disable ligatures.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_LIGATURE> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to <code>1</code> to enable ligatures, else <code>0</code> to disable.
Ligatures are only supported on certain fonts.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_LETTERPRESS_STYLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to use a letterpress text effect.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_LETTERPRESS_STYLE> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI.iOS#property-ATTRIBUTE_TEXT_EFFECT}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_KERN
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to specify kerning (space between characters).</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_KERN> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a float value specifying how many pixels to increase the character
spacing.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_STRIKETHROUGH_STYLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to place a horizontal line through the text.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_STRIKETHROUGH_STYLE> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Set the <code>value</code> property to a <code>Titanium.UI.iOS.ATTRIBUTE_UNDERLINE_*</code> constant.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_UNDERLINES_STYLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to place a horizontal line under the text.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_UNDERLINES_STYLE> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Set the <code>value</code> property to a <code>Titanium.UI.iOS.ATTRIBUTE_UNDERLINE_*</code> constant.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_STROKE_COLOR
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to specify a color for the stroke text.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_STROKE_COLOR> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Use a color name or hex value for the <code>value</code> property in the attributes dictionary.</p>
<p>See {@link Attribute} for more information on type modes.</p>
*/
/**
* @property ATTRIBUTE_STROKE_WIDTH
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to specify the width of the stroke text.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_STROKE_WIDTH> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a float value specifying the size of stroke width as a percentage of the
font size. A positive value displays an outline of the charater, while a negative value
fills the character.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_SHADOW
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to display a shadow behind the text.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_SHADOW> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a {@link shadowDict Shadow} dictionary.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_WRITING_DIRECTION
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to control the direction of the text.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_WRITING_DIRECTION> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a <code>Titanium.UI.iOS.ATTRIBUTE_WRITING_DIRECTION_*</code> constant.</p>
<p>See {@link Attribute} for more information on type modes.</p>
*/
/**
* @property ATTRIBUTE_TEXT_EFFECT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to apply a text effect.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_TEXT_EFFECT> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to <code>Titainium.UI.iOS.ATTRIBUTE_LETTERPRESS_STYLE</code> to apply a
letterpress effect to the text.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_LINK
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to create a link.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_LINK> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a URL.</p>
<p>Use the Label's {@link Titanium.UI.Label#event-link link} event to determine when the user triggers a
long press (not a click) event on the linked text.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_BASELINE_OFFSET
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to apply a different baseline to the text.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_BASELINE_OFFSET> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a number to specify how many pixels to raise or lower the text.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_UNDERLINE_COLOR
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to change the color of the horizontal line.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_UNDERLINE_COLOR> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use a color name or hex value for {@link Attribute#property-value}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_STRIKETHROUGH_COLOR
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to change the color of the horizontal line.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_STRIKETHROUGH_COLOR> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use a color name or hex value for {@link Attribute#property-value}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_OBLIQUENESS
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to skew the text.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_OBLIQUENESS> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a float value to specify how much to skew the text.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_EXPANSION
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-type} to stretch the text horizontally.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_EXPANSION> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Set {@link Attribute#property-value} to a float value to specify how much to stretch the text.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_UNDERLINE_STYLE_NONE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to not draw a line.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_UNDERLINE_STYLE_NONE> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_UNDERLINE_STYLE_SINGLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a single line.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 6.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_UNDERLINE_STYLE_THICK
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a thick line.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_UNDERLINE_STYLE_THICK> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_UNDERLINE_STYLE_DOUBLE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a double line.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_UNDERLINE_STYLE_DOUBLE> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_UNDERLINE_PATTERN_SOLID
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a solid line.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_UNDERLINE_PATTERN_SOLID> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_UNDERLINE_PATTERN_DOT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a dotted line.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_UNDERLINE_PATTERN_DOT> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_UNDERLINE_PATTERN_DASH
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a dashed line.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_UNDERLINE_PATTERN_DASH> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_UNDERLINE_PATTERN_DASH_DOT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw an alternating line of dashes and dots.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_UNDERLINE_PATTERN_DASH_DOT> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_UNDERLINE_PATTERN_DASH_DOT_DOT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw an alternating line of dashes and two dots.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_UNDERLINE_PATTERN_DASH_DOT_DOT> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_UNDERLINE_BY_WORD
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to draw a line only underneath or through words.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_UNDERLINE_BY_WORD> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is either
{@link Titanium.UI.iOS#property-ATTRIBUTE_UNDERLINES_STYLE} or
{@link Titanium.UI.iOS#property-ATTRIBUTE_STRIKETHROUGH_STYLE}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_WRITING_DIRECTION_EMBEDDING
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to use the embedded text direction.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_WRITING_DIRECTION_EMBEDDING> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_WRITING_DIRECTION_OVERRIDE
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to override the text direction.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_WRITING_DIRECTION_OVERRIDE> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_WRITING_DIRECTION_NATURAL
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to use the
<a href="http://www.unicode.org/reports/tr9/#The_Paragraph_Level">Unicode Bidirection Algorithm rules P2 and P3</a>
to determine which direction to use.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_WRITING_DIRECTION_NATURAL> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_WRITING_DIRECTION_LEFT_TO_RIGHT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to write text left to right.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_WRITING_DIRECTION_LEFT_TO_RIGHT> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property ATTRIBUTE_WRITING_DIRECTION_RIGHT_TO_LEFT
* @type Number
* @readonly
* <p>Use with {@link Attribute#property-value} to write text right to left.</p>
* @removed 6.0.0 Use the <Titanium.UI.ATTRIBUTE_WRITING_DIRECTION_RIGHT_TO_LEFT> constant instead (without the iOS namespace).
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Use this constant when {@link Attribute#property-type} is
{@link Titanium.UI.iOS#property-ATTRIBUTE_WRITING_DIRECTION}.</p>
<p>See {@link Attribute} for more information.</p>
*/
/**
* @property AUTODETECT_ADDRESS
* @type Number
* @readonly
* <p>Converts strings formatted as addresses into clickable links.</p>
* @removed 6.0.0 Use <Titanium.UI.AUTOLINK_MAP_ADDRESSES> instead.
* <p> <b>Requires:</b>
iOS 4.0 and later
</p>
*/
/**
* @property AUTODETECT_ALL
* @type Number
* @readonly
* <p>Converts all detectable types of data into clickable links.</p>
* @removed 6.0.0 Use <Titanium.UI.AUTOLINK_ALL> instead.
*/
/**
* @property AUTODETECT_CALENDAR
* @type Number
* @readonly
* <p>Converts strings formatted as calendar events into clickable links.</p>
* @removed 6.0.0 Use <Titanium.UI.AUTOLINK_CALENDAR> instead.
* <p> <b>Requires:</b>
iOS 4.0 and later
</p>
*/
/**
* @property AUTODETECT_LINK
* @type Number
* @readonly
* <p>Converts strings formatted as URLs into clickable links.</p>
* @removed 6.0.0 Use <Titanium.UI.AUTOLINK_URLS> instead.
*/
/**
* @property AUTODETECT_NONE
* @type Number
* @readonly
* <p>Disables converting strings into clickable links.</p>
* @removed 6.0.0 Use <Titanium.UI.AUTOLINK_NONE> instead.
*/
/**
* @property AUTODETECT_PHONE
* @type Number
* @readonly
* <p>Converts strings formatted as phone numbers into clickable links.</p>
* @removed 6.0.0 Use <Titanium.UI.AUTOLINK_PHONE_NUMBERS> instead.
*/
/**
* @property BLEND_MODE_CLEAR
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_COLOR
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_COLOR_BURN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_COLOR_DODGE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_COPY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_DARKEN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_DESTINATION_ATOP
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_DESTINATION_IN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_DESTINATION_OUT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_DESTINATION_OVER
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_DIFFERENCE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_EXCLUSION
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_HARD_LIGHT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_HUE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_LIGHTEN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_LUMINOSITY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_MULTIPLY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_NORMAL
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_OVERLAY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_PLUS_DARKER
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_PLUS_LIGHTER
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_SATURATION
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_SCREEN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_SOFT_LIGHT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_SOURCE_ATOP
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_SOURCE_IN
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_SOURCE_OUT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
/**
* @property BLEND_MODE_XOR
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.MaskedImage#property-mode MaskedImage.mode} to specify a blend mode.</p>
* @description <p>See {@link Titanium.UI.MaskedImage} for more information on blend modes.</p>
*/
* @property BLUR_EFFECT_STYLE_EXTRA_LIGHT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.iOS.BlurView#property-effect BlurView.effect} to specify a blur effect.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Creates a blurring effect in the view. The area of the view is lighter in hue than the underlying view.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property BLUR_EFFECT_STYLE_LIGHT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.iOS.BlurView#property-effect BlurView.effect} to specify a blur effect.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Creates a blurring effect in the view. The area of the view is the same approximate hue
of the underlying view.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property BLUR_EFFECT_STYLE_DARK
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.iOS.BlurView#property-effect BlurView.effect} to specify a blur effect.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Creates a blurring effect in the view. The area of the view is darker in hue than the underlying view.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property BLUR_EFFECT_STYLE_REGULAR
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.iOS.BlurView#property-effect BlurView.effect} to specify a blur effect.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @description <p>Creates a blurring effect in the view. The blurring effect is the default one specified in iOS 10.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property BLUR_EFFECT_STYLE_PROMINENT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.iOS.BlurView#property-effect BlurView.effect} to specify a blur effect.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @description <p>Creates a blurring effect in the view. The area of the view is presented more prominent than the underlying view.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property AD_SIZE_PORTRAIT
* @type String
* @readonly
* <p>Use with {@link Titanium.UI.iOS.AdView#property-adSize AdView.adSize} to specify a banner ad size
appropriate for portrait orientations.</p>
* @description <p>Note that fullscreen ads always display in portrait orientation.</p>
* @platform iphone 1.8.1
* @platform ipad 1.8.1
*/
/**
* @property AD_SIZE_LANDSCAPE
* @type String
* @readonly
* <p>Use with {@link Titanium.UI.iOS.AdView#property-adSize AdView.adSize} to specify a banner ad size
appropriate for landscape orientations.</p>
* @description <p>Note that fullscreen ads always display in portrait orientation.</p>
* @platform iphone 1.8.1
* @platform ipad 1.8.1
*/
/**
* @property CLIP_MODE_DEFAULT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.View#property-clipMode} to specify clipping behavior.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property CLIP_MODE_DISABLED
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.View#property-clipMode} to specify clipping behavior.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property CLIP_MODE_ENABLED
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.View#property-clipMode} to specify clipping behavior.</p>
* @platform iphone 3.3.0
* @platform ipad 3.3.0
*/
/**
* @property COLLISION_MODE_ALL
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.iOS.CollisionBehavior#property-collisionMode} to specify collisions with both items and
boundaries.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property COLLISION_MODE_BOUNDARY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.iOS.CollisionBehavior#property-collisionMode} to specify collisions with
boundaries only.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property COLLISION_MODE_ITEM
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.iOS.CollisionBehavior#property-collisionMode} to specify collisions with items only.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property COLOR_GROUP_TABLEVIEW_BACKGROUND
* @type String
* @readonly
* <p>Returns the iOS system texture used to render the background on a group table view.</p>
* @description <p>Corresponds to iOS <code>UIColor</code> groupTableViewBackgroundColor`.</p>
<p>This constant has been deprecated in iOS 6. Group style table views still default to using the standard iOS group table
view background texture if no background color is specified. However, specifying this constant explicitly on iOS 6 and
above results in a black background color.</p>
<p>Can be used anywhere a color value is required. See also "Colors" in {@link Titanium.UI}.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property COLOR_SCROLLVIEW_BACKGROUND
* @type String
* @readonly
* <p>Returns the iOS system texture used to render the area behind scrollable content.</p>
* @removed 3.6.0
* @description <p>Corresponds to iOS <code>UIColor</code> <code>scrollViewTexturedBackgroundColor</code>.</p>
<p>Can be used anywhere a color value is required. See also "Colors" in {@link Titanium.UI}.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property COLOR_VIEW_FLIPSIDE_BACKGROUND
* @type String
* @readonly
* <p>Returns the iOS system texture used for the back side of a view while it is being flipped.</p>
* @removed 3.6.0
* @description <p>Corresponds to iOS <code>UIColor</code> <code>viewFlipsideBackgroundColor</code>.</p>
<p>Can be used anywhere a color value is required. See also "Colors" in {@link Titanium.UI}.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property COLOR_UNDER_PAGE_BACKGROUND
* @type String
* @readonly
* <p>Returns the iOS system texture used to render the background of a page.</p>
* @removed 3.6.0
* <p> <b>Requires:</b>
iOS 5.0 and later
</p>
* @description <p>Corresponds to iOS <code>UIColor</code> <code>underPageBackgroundColor</code>.</p>
<p>Can be used anywhere a color value is required. See also "Colors" in {@link Titanium.UI}.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property forceTouchSupported
* @type Boolean
* @readonly
* <p>Determines if the 3D-Touch capability "Force Touch" is supported (<code>true</code>) or not (<code>false</code>) by the device.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Returns <code>true</code> if the device supports 3D-Touch (iPhone 6S / iPhone 6S Plus and later) or <code>false</code> if not.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property FEEDBACK_GENERATOR_TYPE_SELECTION
* @type Number
* @readonly
* <p>The feedback type to be used when specifying a selection in {@link Titanium.UI.iOS.FeedbackGenerator}.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property FEEDBACK_GENERATOR_TYPE_IMPACT
* @type Number
* @readonly
* <p>The feedback type to be used when specifying an impact in {@link Titanium.UI.iOS.FeedbackGenerator}.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property FEEDBACK_GENERATOR_TYPE_NOTIFICATION
* @type Number
* @readonly
* <p>The feedback type to be used when specifying a received notification in {@link Titanium.UI.iOS.FeedbackGenerator}.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property FEEDBACK_GENERATOR_NOTIFICATION_TYPE_SUCCESS
* @type Number
* @readonly
* <p>The success notification type used as the argument in {@link Titanium.UI.iOS.FeedbackGenerator#method-notificationOccurred}.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property FEEDBACK_GENERATOR_NOTIFICATION_TYPE_WARNING
* @type Number
* @readonly
* <p>The warning notification type used as the argument in {@link Titanium.UI.iOS.FeedbackGenerator#method-notificationOccurred}.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property FEEDBACK_GENERATOR_NOTIFICATION_TYPE_ERROR
* @type Number
* @readonly
* <p>The error notification type used as the argument in {@link Titanium.UI.iOS.FeedbackGenerator#method-notificationOccurred}.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property FEEDBACK_GENERATOR_IMPACT_STYLE_LIGHT
* @type Number
* @readonly
* <p>The light impact style used as the <code>style</code> argument when creating a {@link Titanium.UI.iOS.FeedbackGenerator} with the
type {@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_TYPE_IMPACT}.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property FEEDBACK_GENERATOR_IMPACT_STYLE_MEDIUM
* @type Number
* @readonly
* <p>The medium impact style used as the <code>style</code> argument when creating a {@link Titanium.UI.iOS.FeedbackGenerator} with the
type {@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_TYPE_IMPACT}.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property FEEDBACK_GENERATOR_IMPACT_STYLE_HEAVY
* @type Number
* @readonly
* <p>The heavy impact style used as the <code>style</code> argument when creating a {@link Titanium.UI.iOS.FeedbackGenerator} with the
type {@link Titanium.UI.iOS#property-FEEDBACK_GENERATOR_TYPE_IMPACT}.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property LIVEPHOTO_PLAYBACK_STYLE_FULL
* @type Number
* @readonly
* <p>Plays back the entire motion and sound content of the Live Photo, including transition
effects at the start and end.</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>This style matches the effect seen when pressing on a photo in the Photos app.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
/**
* @property LIVEPHOTO_PLAYBACK_STYLE_HINT
* @type Number
* @readonly
* <p>Plays back only a brief section of the motion content of the Live Photo, without sound.</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>This style matches the effect seen in various iOS interface elements for hinting to the user
when an asset contains Live Photo content.</p>
* @platform iphone 5.2.0
* @platform ipad 5.2.0
*/
* @property MENU_POPUP_ARROW_DIRECTION_UP
* @type Number
* @readonly
* <p>An arrow that points upward.</p>
*/
* @property MENU_POPUP_ARROW_DIRECTION_DOWN
* @type Number
* @readonly
* <p>An arrow that points downward.</p>
*/
* @property MENU_POPUP_ARROW_DIRECTION_LEFT
* @type Number
* @readonly
* <p>An arrow that points toward the left.</p>
*/
* @property MENU_POPUP_ARROW_DIRECTION_RIGHT
* @type Number
* @readonly
* <p>An arrow that points toward the right.</p>
*/
* @property MENU_POPUP_ARROW_DIRECTION_DEFAULT
* @type Number
* @readonly
* <p>An arrow that is automatically aligned.</p>
*/
/**
* @property PUSH_MODE_CONTINUOUS
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.iOS.PushBehavior#property-pushMode} to specifiy a continuous force.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property PUSH_MODE_INSTANTANEOUS
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.iOS.PushBehavior#property-pushMode} to specifiy an instantaneous force.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @platform iphone 3.2.0
* @platform ipad 3.2.0
*/
/**
* @property PREVIEW_ACTION_STYLE_DEFAULT
* @type Number
* @readonly
* <p>The normal style for preview actions.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Used in conjunction with {@link Titanium.UI.iOS.PreviewAction#property-style} / {@link Titanium.UI.iOS.PreviewActionGroup#property-style}
property.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property PREVIEW_ACTION_STYLE_SELECTED
* @type Number
* @readonly
* <p>The selected style for preview actions.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Used in conjunction with {@link Titanium.UI.iOS.PreviewAction#property-style} / {@link Titanium.UI.iOS.PreviewActionGroup#property-style}
property.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property PREVIEW_ACTION_STYLE_DESTRUCTIVE
* @type Number
* @readonly
* <p>The destructive style for preview actions.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Used in conjunction with {@link Titanium.UI.iOS.PreviewAction#property-style} / {@link Titanium.UI.iOS.PreviewActionGroup#property-style}
property.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property ROW_ACTION_STYLE_DEFAULT
* @type Number
* @readonly
* <p>The default style for {@link RowActionType}.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Used in conjunction with {@link Titanium.UI.ListItem#property-editActions} property and <Titanium.UI.ListView.editaction> event.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @property ROW_ACTION_STYLE_DESTRUCTIVE
* @type Number
* @readonly
* <p>The destructive style for {@link RowActionType}.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Used in conjunction with {@link Titanium.UI.ListItem#property-editActions} property and <Titanium.UI.ListView.editaction> event.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @property ROW_ACTION_STYLE_NORMAL
* @type Number
* @readonly
* <p>The normal style for {@link RowActionType}.</p>
* <p> <b>Requires:</b>
iOS 8.0 and later
</p>
* @description <p>Used in conjunction with {@link Titanium.UI.ListItem#property-editActions} property and <Titanium.UI.ListView.editaction> event.</p>
* @platform iphone 4.1.0
* @platform ipad 4.1.0
*/
/**
* @property SCROLL_DECELERATION_RATE_FAST
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.ScrollView#property-decelerationRate} to control deceleration rate.</p>
* @platform iphone 3.2.3
* @platform ipad 3.2.3
*/
/**
* @property SCROLL_DECELERATION_RATE_NORMAL
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.ScrollView#property-decelerationRate} to control deceleration rate.</p>
* @platform iphone 3.2.3
* @platform ipad 3.2.3
*/
/**
* @property KEYBOARD_DISMISS_MODE_NONE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.ScrollView#property-keyboardDismissMode} to control keyboard dismiss mode.</p>
* @description <p>The keyboard does not get dismissed with a drag.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property KEYBOARD_DISMISS_MODE_ON_DRAG
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.ScrollView#property-keyboardDismissMode} to control keyboard dismiss mode.</p>
* @description <p>The keyboard is dismissed when a drag begins.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property KEYBOARD_DISMISS_MODE_INTERACTIVE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.ScrollView#property-keyboardDismissMode} to control keyboard dismiss mode.</p>
* @description <p>The keyboard follows the dragging touch offscreen, and can be pulled
upward again to cancel the dismiss.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @property SEARCH_BAR_STYLE_PROMINENT
* @type Number
* @readonly
* <p>Use with <Titanium.UI.Searchbar.style> to change the search bar style.</p>
* @description <p>The search bar has a translucent background, and the search field is opaque.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property SEARCH_BAR_STYLE_MINIMAL
* @type Number
* @readonly
* <p>Use with <Titanium.UI.Searchbar.style> to change the search bar style.</p>
* @description <p>The search bar has no background, and the search field is translucent.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property WEBVIEW_NAVIGATIONTYPE_LINK_CLICKED
* @type Number
* @readonly
* <p>User tapped a link.</p>
* @description <p>Used with the {@link Titanium.UI.WebView#event-beforeload WebView.beforeload} event.</p>
<p>Corresponds to iOS <code>UIWebView</code> <code>UIWebViewNavigationTypeLinkClicked</code>.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property WEBVIEW_NAVIGATIONTYPE_FORM_SUBMITTED
* @type Number
* @readonly
* <p>User submitted a form.</p>
* @description <p>Used with the {@link Titanium.UI.WebView#event-beforeload WebView.beforeload} event.</p>
<p>Corresponds to iOS <code>UIWebView</code> <code>UIWebViewNavigationTypeFormSubmitted</code>.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property WEBVIEW_NAVIGATIONTYPE_BACK_FORWARD
* @type Number
* @readonly
* <p>User tapped the back or forward button.</p>
* @description <p>Used with the {@link Titanium.UI.WebView#event-beforeload WebView.beforeload} event.</p>
<p>Corresponds to iOS <code>UIWebView</code> <code>UIWebViewNavigationTypeBackForward</code>.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property WEBVIEW_NAVIGATIONTYPE_RELOAD
* @type Number
* @readonly
* <p>User tapped the reload button.</p>
* @description <p>Used with the {@link Titanium.UI.WebView#event-beforeload WebView.beforeload} event.</p>
<p>Corresponds to iOS <code>UIWebView</code> <code>UIWebViewNavigationTypeReload</code>.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property WEBVIEW_NAVIGATIONTYPE_FORM_RESUBMITTED
* @type Number
* @readonly
* <p>User resubmitted a form.</p>
* @description <p>Used with the {@link Titanium.UI.WebView#event-beforeload WebView.beforeload} event.</p>
<p>Corresponds to iOS <code>UIWebView</code> <code>UIWebViewNavigationTypeFormResubmitted</code>.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property WEBVIEW_NAVIGATIONTYPE_OTHER
* @type Number
* @readonly
* <p>Some other action occurred.</p>
* @description <p>Used with the {@link Titanium.UI.WebView#event-beforeload WebView.beforeload} event.</p>
<p>Corresponds to iOS <code>UIWebView</code> <code>UIWebViewNavigationTypeOther</code>.</p>
* @platform iphone 2.1.0
* @platform ipad 2.1.0
*/
/**
* @property TABLEVIEW_INDEX_SEARCH
* @type String
* @readonly
* <p>String that represents the magnifying glass on the table view index bar</p>
* @description <p>Will cause a magnifying glass icon to be displayed at that location in the index.
This should generally only be used as the first title in the index.</p>
* @platform iphone 3.4.0
* @platform ipad 3.4.0
*/
/**
* @property SHORTCUT_ICON_TYPE_COMPOSE
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>An icon for a quick action that lets a user compose new content.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_PLAY
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>An icon for a quick action that plays media.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_PAUSE
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>An icon for a quick action that pauses media playback.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_ADD
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>An icon for a quick action that adds an item.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_LOCATION
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Will cause a magnifying glass icon to be displayed at that location in the index.
This should generally only be used as the first title in the index.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_SEARCH
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>An icon for a quick action that accesses the user's current location.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_SHARE
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>An icon for a quick action that offers content sharing.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_PROHIBIT
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that disallows something.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_CONTACT
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that chooses a generic contact.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_HOME
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that indicates home.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_MARK_LOCATION
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that lets a user mark a location.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_FAVORITE
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that lets a user designate a favorite item.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_LOVE
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that lets a user designate a loved item.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_CLOUD
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers cloud access.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_INVITATION
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that indicates an invitation.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_CONFIRMATION
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that indicates confirmation.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_MAIL
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers use of mail.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_MESSAGE
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers use of messaging.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_DATE
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers use of a calendar.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_TIME
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers use of a clock or timer.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_CAPTURE_PHOTO
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers photo capture.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_CAPTURE_VIDEO
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers video capture.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_TASK
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers task creation.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_TASK_COMPLETED
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers task completion.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_ALARM
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers creation of an alarm.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_BOOKMARK
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers creation of a bookmark.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_SHUFFLE
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers shuffle mode.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_AUDIO
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers use of audio.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property SHORTCUT_ICON_TYPE_UPDATE
* @type Number
* @readonly
* <p>Number that represents the icon used for the application shortcut</p>
* <p> <b>Requires:</b>
iOS 9.1 and later
</p>
* @description <p>An icon for a quick action that offers updating.</p>
* @platform iphone 5.1.0
* @platform ipad 5.1.0
*/
/**
* @property appBadge
* @type Number
* <p>Value of the badge for the application's springboard icon.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property appSupportsShakeToEdit
* @type Boolean
* <p>Determines whether the shake to edit system-wide capability is enabled.</p>
* @platform iphone 5.4.0
* @platform ipad 5.4.0
*/
/**
* @property [statusBarBackgroundColor=Undefined (Uses the native defaults)]
* @type String
* <p>Sets the global status bar background color for the application.</p>
* @platform iphone 6.0.0
* @platform ipad 6.0.0
*/
/**
* @class transitionAnimationParam
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iOS/iOS.yml
* <p>Dictionary specifying the transition animation used with the {@link Titanium.UI.iOS#method-createTransitionAnimation} method.
Only supported on iOS 7 and later.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* <h3>Examples</h3>
<h4>Simple Example</h4>
<p>In this example, the red window opens with a transition animation, while closing it uses the
default behavior where it slides off screen. To add a transition animation when the red
window closes, define a transition animation for the blue window.</p>
<pre><code>var transition = Ti.UI.iOS.createTransitionAnimation({
duration: 300,
// The show transition makes the window opaque and rotates it correctly
transitionTo: {
opacity: 1,
duration: 300,
transform: Ti.UI.create2DMatrix()
},
// The hide transition makes the window transparent and rotates it upside down
transitionFrom: {
opacity: 0,
duration: 300 / 2,
transform: Ti.UI.create2DMatrix().rotate(180),
}
});
var win2 = Ti.UI.createWindow({
backgroundColor: 'red',
title: 'Red Window',
transitionAnimation: transition,
opacity: 0,
transform: Ti.UI.create2DMatrix().rotate(180)
});
var button2 = Ti.UI.createButton({
title: 'Close Red Window'
});
button2.addEventListener('click', function(){
nav.closeWindow(win2);
// In order to see the blue window again,
// need to reverse the transition animation
win1.opacity = 1;
win1.transform = Ti.UI.create2DMatrix().rotate(0);
});
win2.add(button2);
var win1 = Ti.UI.createWindow({
backgroundColor: 'blue',
title: 'Blue Window',
// Uncomment to use a transition animation when the blue window is closed
// transitionAnimation: transition
});
var button1 = Ti.UI.createButton({title: 'Open Red Window'});
button1.addEventListener('click', function(){
nav.openWindow(win2);
});
win1.add(button1);
var nav = Ti.UI.iOS.createNavigationWindow({
window: win1
});
nav.open();
</code></pre>
*/
/**
* @property duration
* @type Number
* <p>Length of the transition in milliseconds.</p>
*/
/**
* @property transitionFrom
* @type Titanium.UI.Animation
* <p>Animation to hide the current window.</p>
*/
/**
* @property transitionTo
* @type Titanium.UI.Animation
* <p>Animation to show the new window.</p>
*/
/**
* @class Titanium.UI.iPad.DocumentViewer
* @platform ipad 1.8
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPad/DocumentViewer.yml
* <p>A DocumentViewer provides in-app support for managing user interactions with files on the
local system.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.DocumentViewer> instead.
* @description <p>The DocumentViewer is created by the method {@link Titanium.UI.iOS#method-createDocumentViewer}. </p>
<p>For example, an email program might use this class to allow the user to preview attachments and
open them in other apps. Use this class to present an appropriate user interface for previewing
or printing a specified file. </p>
<p>For a code sample, see {@link Titanium.UI.iOS.DocumentViewer}.</p>
*/
/**
* @method show
* <p>Displays the document viewer over the current view.</p>
* @param {Boolean} animated
<p>Indicates whether the show transition should be animated.</p>
* @param {Object} view
<p>The view property would specify the view relative to where the viewer should display.</p>
*/
/**
* @method setUrl
* <p>Sets the url of the document viewer.</p>
* @param {String} url
<p>The new url</p>
*/
/**
* @class Titanium.UI.iPad.Popover
* @platform ipad 1.2
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPad/Popover.yml
* <p>A Popover is used to manage the presentation of content in a popover.</p>
* @description <p>A popover is created using the {@link Titanium.UI.iPad#method-createPopover} method or <strong><code><Popover></code></strong> Alloy element.</p>
<p>Popovers are used to present information temporarily, but in a way that does not take over
the entire screen in the way that a modal view does. The popover content is layered on top of
the existing content in a special type of window. The popover remains visible until the user
taps outside of the popover window or it is explicitly dismissed.</p>
<p>Do not add top-level view containers, such as a <code>SplitWindow</code> or <code>TabGroup</code>, to a popover.
Adding top-level view containers may have unintended side effects. See the {@link Titanium.UI.iPad.Popover#property-contentView contentView}
property for more information.</p>
* <h3>Examples</h3>
<h4>Simple Popover with a Title and Right Button</h4>
<p>In this example, we create a simple popover and position it near the button.</p>
<pre><code>var win = Ti.UI.createWindow({backgroundColor: 'white'});
var button = Ti.UI.createButton({title: 'Open Popover!'});
button.addEventListener('click', function(e){
popover.show({ view: button });
})
win.add(button);
var rightButton = Ti.UI.createButton({title: 'Robin'});
rightButton.addEventListener('click', function(e){
alert("But green's the color of spring.");
});
var contentWindow = Ti.UI.createWindow({
rightNavButton: rightButton,
title: 'Kermit'
});
contentWindow.add(Ti.UI.createLabel({text: "It's not easy being green."}));
var popover = Ti.UI.iPad.createPopover({
backgroundColor: 'green',
contentView: Ti.UI.iOS.createNavigationWindow({
width: 250,
height: 100,
window: contentWindow
})
});
win.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as an Alloy project.</p>
<p><code>app/views/index.xml</code>:</p>
<pre><code><Alloy>
<Window>
<Button id="button" onClick="openPopover">Open Popover!</Button>
</Window>
</Alloy>
</code></pre>
<p><code>app/controllers/index.js</code>:</p>
<pre><code>function openPopover() {
var popover = Alloy.createController('popover').getView();
popover.show({view:$.button});
};
$.index.open();
</code></pre>
<p><code>app/views/popover.xml</code>:</p>
<pre><code><Alloy>
<Popover backgroundColor='green'>
<ContentView>
<NavigationWindow height='100' width='250'>
<Window title='Kermit'>
<RightNavButton onClick="showAlert" title="Robin" />
<Label>It's not easy being green.</Label>
</Window>
</NavigationWindow>
</ContentView>
</Popover>
</Alloy>
</code></pre>
<p><code>app/controllers/popover.js</code>:</p>
<pre><code>function showAlert(e) {
alert('But green is the color of spring.');
};
// Prior to Alloy 1.1.0, the rightNavButton property was set in the controller.
// var button = Ti.UI.createButton({title: 'Robin'});
// button.addEventListener('click', showAlert);
// $.popover.rightNavButton = button;
</code></pre>
*/
/**
* @event pinch
* @hide
* <p>Fired when the device detects a pinch gesture.</p>
* @description <p>A pinch is a touch and expand or contract
with two fingers. The event occurs continuously until a finger is lifted again. </p>
* @param {Number} scale
<p>The scale factor relative to the points of the two touches in screen coordinates.</p>
* @param {Number} velocity
<p>The velocity of the pinch in scale factor per second.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform ipad 1.8.0
*/
/**
* @event swipe
* @hide
* <p>Fired when the device detects a swipe gesture against the view.</p>
* @param {String} direction
<p>Direction of the swipe--either 'left', 'right', 'up', or 'down'.</p>
* @param {Number} x
<p>X coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event's endpoint from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event twofingertap
* @hide
* <p>Fired when the device detects a two-finger tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchmove
* @hide
* <p>Fired as soon as the device detects movement of a touch.</p>
* @description <p>Event coordinates are always relative to the view in which the initial touch occurred</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchstart
* @hide
* <p>Fired as soon as the device detects a touch gesture.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchcancel
* @hide
* <p>Fired when a touch event is interrupted by the device.</p>
* @description <p>A touchcancel can happen in circumstances such as an incoming call to allow the
UI to clean up state.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event touchend
* @hide
* <p>Fired when a touch event is completed.</p>
* @description <p>On the Android platform, other gesture events, such as <code>longpress</code> or <code>swipe</code>, cancel touch
events, so this event may not be triggered after a <code>touchstart</code> event.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} force
<p>The current force value of the touch event.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.</p>
* @param {Number} size
<p>The current size of the touch area. Note: This property is only available on some Android devices.</p>
* @param {Number} maximumPossibleForce
<p>Maximum possible value of the force property.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} altitudeAngle
<p>A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is
being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.
Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.</p>
* @param {Number} timestamp
<p>The time (in seconds) when the touch was used in correlation with the system start up.
Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.</p>
* @param {Number} azimuthUnitVectorInViewX
<p>The x value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.</p>
* @param {Number} azimuthUnitVectorInViewY
<p>The y value of the unit vector that points in the direction of the azimuth of the stylus.
Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event click
* @hide
* <p>Fired when the device detects a click against the view.</p>
* @description <p>There is a subtle difference between singletap and click events.</p>
<p>A singletap event is generated when the user taps the screen briefly
without moving their finger. This gesture will also generate a click event.</p>
<p>However, a click event can also be generated when the user touches,
moves their finger, and then removes it from the screen.</p>
<p>On Android, a click event can also be generated by a trackball click.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event dblclick
* @hide
* <p>Fired when the device detects a double click against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event singletap
* @hide
* <p>Fired when the device detects a single tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event doubletap
* @hide
* <p>Fired when the device detects a double tap against the view.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event longpress
* @hide
* <p>Fired when the device detects a long press.</p>
* @description <p>A long press is generated by touching and holding on the touchscreen. Unlike a <code>longclick</code>,
it does not respond to the trackball button. </p>
<p>The event occurs before the finger is lifted. </p>
<p>A <code>longpress</code> and a <code>longclick</code> can occur together. </p>
<p>In contrast to a <code>longclick</code>, this event returns the <code>x</code> and <code>y</code> coordinates of the touch.</p>
* @param {Number} x
<p>X coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Number} y
<p>Y coordinate of the event from the <code>source</code> view's coordinate system.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event postlayout
* @hide
* <p>Fired when a layout cycle is finished.</p>
* @description <p>This event is fired when the view and its ancestors have been laid out.
The {@link Titanium.UI.View#property-rect rect} and {@link Titanium.UI.View#property-size size} values
should be usable when this event is fired.</p>
<p>This event is typically triggered by either changing layout
properties or by changing the orientation of the device. Note that changing the
layout of child views or ancestors can also trigger a relayout of this view.
On Mobile Web, this event can also be triggered by resizing the browser window.</p>
<p>Note that altering any properties that affect layout from the <code>postlayout</code> callback
may result in an endless loop.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform ipad 2.0.0
*/
/**
* @event hide
* <p>Fired when the popover is hidden.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method animate
* @hide
* <p>Animates this view.</p>
* @description <p>The {@link Titanium.UI.Animation Animation} object or dictionary passed to this method defines
the end state for the animation, the duration of the animation, and other properties.</p>
<p>Note that if you use <code>animate</code> to move a view, the view's actual <em>position</em> is changed, but
its layout properties, such as <code>top</code>, <code>left</code>, <code>center</code> and so on are not changed--these
reflect the original values set by the user, not the actual position of the view.</p>
<p>The {@link Titanium.UI.View#property-rect rect} property can be used to determine the actual size and
position of the view. Note that on Mobile Web, the <code>rect</code> property is not updated after
animation. This is a known issue <a href="https://jira.appcelerator.org/browse/TIMOB-8930">TIMOB-8930</a>.</p>
* @param {Titanium.UI.Animation/Dictionary<Titanium.UI.Animation>} animation
<p>Either a dictionary of animation properties or an
{@link Titanium.UI.Animation Animation} object.</p>
* @param {Callback<Object>} callback
<p>Function to be invoked upon completion of the animation.</p>
*/
/**
* @method remove
* <p>Removes a child from the popover.</p>
* @removed 3.4.2 Use the <Titanium.UI.iPad.Popover.contentView> property to modify the content of the popover.
* @param {Titanium.UI.View} view
<p>View to remove from this view's hierarchy.</p>
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform ipad 3.1.0
*/
/**
* @method toImage
* @hide
* <p>Returns an image of the rendered view, as a Blob.</p>
* @description <p>The <code>honorScaleFactor</code> method is only supported on iOS.</p>
* @param {Callback<Titanium.Blob>} callback (optional)
<p>Function to be invoked upon completion. If non-null, this method will be performed
asynchronously. If null, it will be performed immediately.</p>
* @param {Boolean} honorScaleFactor (optional)
<p>Determines whether the image is scaled based on scale factor of main screen. (iOS only) </p>
<p>When set to true, image is scale factor is honored. When set to false, the image in the
blob has the same dimensions for retina and non-retina devices.</p>
* @returns {Titanium.Blob}
*/
/**
* @method convertPointToView
* @hide
* <p>Translates a point from this view's coordinate system to another view's coordinate system.</p>
* @description <p>Returns <code>null</code> if either view is not in the view hierarchy. </p>
<p>Keep in mind that views may be removed from the view hierarchy if their window is blurred
or if the view is offscreen (such as in some situations with {@link Titanium.UI.ScrollableView}).</p>
<p>If this view is a {@link Titanium.UI.ScrollView}, the view's x and y offsets are subtracted from
the return value.</p>
* @param {Point} point
<p>A point in this view's coordinate system. </p>
<p>If this argument is missing an <code>x</code> or <code>y</code> property, or the properties can not be
converted into numbers, an exception will be raised.</p>
* @param {Titanium.UI.View} destinationView
<p>View that specifies the destination coordinate system to convert to. If this argument
is not a view, an exception will be raised.</p>
* @returns {Point}
* @platform ipad 1.8
*/
/**
* @method add
* <p>Adds a child to the popover.</p>
* @removed 3.4.2 Use the <Titanium.UI.iPad.Popover.contentView> property to modify the content of the popover.
* @description <p>The child view is added as the last child in this view's hierarchy. </p>
<p>Although all views inherit from {@link Titanium.UI.View}, not all views are capable of
containing other views. In particular:</p>
<ul>
<li>Some views are not designed to be containers at all.</li>
<li>Some views are special-purpose containers that can only contain certain other
views.</li>
<li>Some views are top-level containers that cannot (or should not) be added to other views.</li>
</ul>
<h4>Non-Container Views</h4>
<p>The following views are not intended to act as containers that can hold other
views:</p>
<ul>
<li>{@link Titanium.UI.ActivityIndicator ActivityIndicator}</li>
<li>{@link Titanium.UI.Button Button}</li>
<li>{@link Titanium.UI.ImageView ImageView}</li>
<li>{@link Titanium.UI.Label Label}</li>
<li>{@link Titanium.UI.ProgressBar ProgressBar}</li>
<li>{@link Titanium.UI.SearchBar SearchBar}</li>
<li>{@link Titanium.UI.Slider Slider}</li>
<li>{@link Titanium.UI.Switch Switch}</li>
<li>{@link Titanium.UI.TableView TableView}</li>
<li>{@link Titanium.UI.TextArea TextArea}</li>
<li>{@link Titanium.UI.TextField TextField}</li>
<li>{@link Titanium.UI.WebView WebView}</li>
</ul>
<p>Adding children to the these views <em>may</em> be supported on some platforms,
but is not guaranteed to work across platforms. Where it is supported, it may not
work as expected.</p>
<p>For maximum portability, these views should be treated as if they do not support children. <br>
Instead of adding children to these views, applications can positon other views as
siblings. For example, instead of adding a button as a child of a <code>WebView</code>, you can add
the button to the web view's parent such that it appears on top of the web view. </p>
<h4>Special-Purpose Containers</h4>
<p>A few view objects act as special-purpose containers--that is, they only manage
certain types of children, and many of them support a special means of adding
these children, instead of the general <code>add</code> method. These containers include:</p>
<ul>
<li><p>{@link Titanium.UI.ButtonBar ButtonBar} and {@link Titanium.UI.iOS.TabbedBar TabbedBar} are designed
to hold their own internally-created buttons, assigned by adding strings to the "labels" array.
Views added using the <code>add</code> method are displayed on top of these buttons.</p></li>
<li><p>{@link Titanium.UI.Picker Picker}. Can only hold <code>PickerRows</code> and <code>PickerColumns</code>, which
are added using the <code>add</code> method. Adding other types of views to a <code>Picker</code> is not
supported.</p></li>
<li><p>{@link Titanium.UI.TableView TableView} is a specialized container for
<code>TableViewSection</code> and <code>TableViewRow</code> objects. These objects must be
added using the properties and methods that <code>TableView</code> provides
for adding and removing sectons and rows.</p>
<p>On some platforms, it is possible to add arbitrary child views to a table view
using the <code>add</code> method. However, this is not guaranteed to work on all platforms,
and in general, should be avoided.</p></li>
<li><p>{@link Titanium.UI.TableViewSection TableViewSection} is a specialized container
for <code>TableViewRow</code> objects, which <em>are</em> added using the <code>add</code> method. The <code>add</code> method
on <code>TableViewSection</code> can only be used to add <code>TableViewRow</code> objects.</p></li>
<li><p>{@link Titanium.UI.iOS.Toolbar Toolbar} is designed to hold buttons and certain
other controls, added to its <code>items</code> array. Views added using the <code>add</code> method are
displayed on top of the controls in the <code>items</code> array.</p></li>
<li><p>The <code>Tab</code>, <code>TabGroup</code>, <code>NavigationGroup</code>, <code>NavigationWindow</code> and <code>SplitWindow</code> objects are
special containers that manage windows. These are discussed in the
"Top-Level Containers" section.</p></li>
</ul>
<h4>Top-Level Containers</h4>
<p>There are certain top-level containers that are not intended to be added
as the children of other views. These top-level containers include
{@link Titanium.UI.Window}, {@link Titanium.UI.iPad.SplitWindow}, {@link Titanium.UI.iOS.NavigationWindow},
and {@link Titanium.UI.TabGroup}. Other types of views must be added
to a top-level container in order to be displayed on screen.</p>
<p>The special containers {@link Titanium.UI.MobileWeb.NavigationGroup},
{@link Titanium.UI.iOS.NavigationWindow}, {@link Titanium.UI.iPad.SplitWindow},
{@link Titanium.UI.Tab}, and {@link Titanium.UI.TabGroup} manage windows.
These managed windows may be referred to as <em>children</em> of the
container, but they are not added using the <code>add</code> method.</p>
<p>Note that although a <code>NavigationGroup</code> manages windows, it is not itself a
top-level container. It must be added to a <code>Window</code> in order to be displayed.</p>
<p><code>Tab</code> is another kind of special container: it is not itself a top-level container,
but can only be used within a <code>TabGroup</code>. You cannot <code>add</code> a <code>Tab</code> to an arbitrary
container.</p>
* @param {Titanium.UI.View/Array<Titanium.UI.View>} view
<p>View to add to this view's hierarchy.</p>
<p>You may pass an array of views, e.g. <code>view.add([subview1, subview2]</code>.</p>
*/
/**
* @method hide
* <p>Hides the popover.</p>
* @param {PopoverParams} options
<p>Display properties to use when hiding the popover.</p>
*/
/**
* @method show
* <p>Displays the popover.</p>
* @param {PopoverParams} params
<p>Display properties to use when displaying the popover.</p>
*/
/**
* @method getAccessibilityHidden
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-accessibilityHidden} property.</p>
* @returns {Boolean}
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHidden
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-accessibilityHidden} property.</p>
* @param {Boolean} accessibilityHidden
<p>New value for the property.</p>
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityHint
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-accessibilityHint} property.</p>
* @returns {String}
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityHint
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-accessibilityHint} property.</p>
* @param {String} accessibilityHint
<p>New value for the property.</p>
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityLabel
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-accessibilityLabel} property.</p>
* @returns {String}
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityLabel
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-accessibilityLabel} property.</p>
* @param {String} accessibilityLabel
<p>New value for the property.</p>
* @platform ipad 3.0.0
*/
/**
* @method getAccessibilityValue
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-accessibilityValue} property.</p>
* @returns {String}
* @platform ipad 3.0.0
*/
/**
* @method setAccessibilityValue
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-accessibilityValue} property.</p>
* @param {String} accessibilityValue
<p>New value for the property.</p>
* @platform ipad 3.0.0
*/
/**
* @method getAnchorPoint
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-anchorPoint} property.</p>
* @returns {Point}
*/
/**
* @method setAnchorPoint
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-anchorPoint} property.</p>
* @param {Point} anchorPoint
<p>New value for the property.</p>
*/
/**
* @method getAnimatedCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-animatedCenter} property.</p>
* @returns {Point}
*/
/**
* @method getBackgroundRepeat
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-backgroundRepeat} property.</p>
* @returns {Boolean}
*/
/**
* @method setBackgroundRepeat
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-backgroundRepeat} property.</p>
* @param {Boolean} backgroundRepeat
<p>New value for the property.</p>
*/
/**
* @method getBackgroundLeftCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-backgroundLeftCap} property.</p>
* @returns {Number}
*/
/**
* @method setBackgroundLeftCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-backgroundLeftCap} property.</p>
* @param {Number} backgroundLeftCap
<p>New value for the property.</p>
*/
/**
* @method getBackgroundTopCap
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-backgroundTopCap} property.</p>
* @returns {Number}
*/
/**
* @method setBackgroundTopCap
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-backgroundTopCap} property.</p>
* @param {Number} backgroundTopCap
<p>New value for the property.</p>
*/
/**
* @method getBorderColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-borderColor} property.</p>
* @returns {String}
*/
/**
* @method setBorderColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-borderColor} property.</p>
* @param {String} borderColor
<p>New value for the property.</p>
*/
/**
* @method getClipMode
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-clipMode} property.</p>
* @returns {Number}
* @platform ipad 3.3.0
*/
/**
* @method setClipMode
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-clipMode} property.</p>
* @param {Number} clipMode
<p>New value for the property.</p>
* @platform ipad 3.3.0
*/
/**
* @method getPullBackgroundColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-pullBackgroundColor} property.</p>
* @returns {String}
* @platform ipad 3.3.0
*/
/**
* @method setPullBackgroundColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-pullBackgroundColor} property.</p>
* @param {String} pullBackgroundColor
<p>New value for the property.</p>
* @platform ipad 3.3.0
*/
/**
* @method getTintColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-tintColor} property.</p>
* @returns {String}
* @platform ipad 3.1.3
*/
/**
* @method setTintColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-tintColor} property.</p>
* @param {String} tintColor
<p>New value for the property.</p>
* @platform ipad 3.1.3
*/
/**
* @method getTransform
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-transform} property.</p>
* @returns {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix}
*/
/**
* @method setTransform
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-transform} property.</p>
* @param {Titanium.UI.2DMatrix/Titanium.UI.3DMatrix} transform
<p>New value for the property.</p>
*/
/**
* @method getViewShadowRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-viewShadowRadius} property.</p>
* @returns {Number}
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-viewShadowRadius} property.</p>
* @param {Number} viewShadowRadius
<p>New value for the property.</p>
* @platform ipad 3.3.0
*/
/**
* @method getViewShadowColor
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-viewShadowColor} property.</p>
* @returns {String}
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowColor
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-viewShadowColor} property.</p>
* @param {String} viewShadowColor
<p>New value for the property.</p>
* @platform ipad 3.3.0
*/
/**
* @method getViewShadowOffset
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-viewShadowOffset} property.</p>
* @returns {Point}
* @platform ipad 3.3.0
*/
/**
* @method setViewShadowOffset
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-viewShadowOffset} property.</p>
* @param {Point} viewShadowOffset
<p>New value for the property.</p>
* @platform ipad 3.3.0
*/
/**
* @method getHorizontalWrap
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-horizontalWrap} property.</p>
* @returns {Boolean}
* @platform ipad 2.1.0
*/
/**
* @method setHorizontalWrap
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-horizontalWrap} property.</p>
* @param {Boolean} horizontalWrap
<p>New value for the property.</p>
* @platform ipad 2.1.0
*/
/**
* @method getBackgroundGradient
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-backgroundGradient} property.</p>
* @returns {Gradient}
*/
/**
* @method setBackgroundGradient
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-backgroundGradient} property.</p>
* @param {Gradient} backgroundGradient
<p>New value for the property.</p>
*/
/**
* @method getBackgroundImage
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-backgroundImage} property.</p>
* @returns {String}
*/
/**
* @method setBackgroundImage
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-backgroundImage} property.</p>
* @param {String} backgroundImage
<p>New value for the property.</p>
*/
/**
* @method getBorderRadius
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-borderRadius} property.</p>
* @returns {Number}
*/
/**
* @method setBorderRadius
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-borderRadius} property.</p>
* @param {Number} borderRadius
<p>New value for the property.</p>
*/
/**
* @method getBorderWidth
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-borderWidth} property.</p>
* @returns {Number}
*/
/**
* @method setBorderWidth
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-borderWidth} property.</p>
* @param {Number} borderWidth
<p>New value for the property.</p>
*/
/**
* @method getOpacity
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-opacity} property.</p>
* @returns {Number}
*/
/**
* @method setOpacity
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-opacity} property.</p>
* @param {Number} opacity
<p>New value for the property.</p>
*/
/**
* @method getRect
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-rect} property.</p>
* @returns {Dimension}
* @platform ipad 2.0.0
*/
/**
* @method getSize
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-size} property.</p>
* @returns {Dimension}
*/
/**
* @method getTouchEnabled
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-touchEnabled} property.</p>
* @returns {Boolean}
*/
/**
* @method setTouchEnabled
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-touchEnabled} property.</p>
* @param {Boolean} touchEnabled
<p>New value for the property.</p>
*/
/**
* @method getVisible
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-visible} property.</p>
* @returns {Boolean}
*/
/**
* @method setVisible
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-visible} property.</p>
* @param {Boolean} visible
<p>New value for the property.</p>
*/
/**
* @method getZIndex
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-zIndex} property.</p>
* @returns {Number}
*/
/**
* @method setZIndex
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-zIndex} property.</p>
* @param {Number} zIndex
<p>New value for the property.</p>
*/
/**
* @method getChildren
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-children} property.</p>
* @returns {Titanium.UI.View[]}
*/
/**
* @method getBackgroundColor
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-backgroundColor} property.</p>
* @returns {String}
* @platform ipad 5.2.0
*/
/**
* @method setBackgroundColor
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-backgroundColor} property.</p>
* @param {String} backgroundColor
<p>New value for the property.</p>
* @platform ipad 5.2.0
*/
/**
* @method getTop
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-top} property.</p>
* @returns {Number/String}
*/
/**
* @method setTop
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-top} property.</p>
* @param {Number/String} top
<p>New value for the property.</p>
*/
/**
* @method getLeft
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-left} property.</p>
* @returns {Number/String}
*/
/**
* @method setLeft
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-left} property.</p>
* @param {Number/String} left
<p>New value for the property.</p>
*/
/**
* @method getBottom
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-bottom} property.</p>
* @returns {Number/String}
*/
/**
* @method setBottom
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-bottom} property.</p>
* @param {Number/String} bottom
<p>New value for the property.</p>
*/
/**
* @method getCenter
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-center} property.</p>
* @returns {Point}
*/
/**
* @method setCenter
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-center} property.</p>
* @param {Point} center
<p>New value for the property.</p>
*/
/**
* @method getRight
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-right} property.</p>
* @returns {Number/String}
*/
/**
* @method setRight
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-right} property.</p>
* @param {Number/String} right
<p>New value for the property.</p>
*/
/**
* @method getWidth
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-width} property.</p>
* @deprecated 3.4.2 This property is deprecated. Set the width on the [contentView](Titanium.UI.iPad.Popover.contentView) property instead.
* @returns {Number/String}
*/
/**
* @method setWidth
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-width} property.</p>
* @deprecated 3.4.2 This property is deprecated. Set the width on the [contentView](Titanium.UI.iPad.Popover.contentView) property instead.
* @param {Number/String} width
<p>New value for the property.</p>
*/
/**
* @method getHeight
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-height} property.</p>
* @deprecated 3.4.2 This property is deprecated. Set the height on the [contentView](Titanium.UI.iPad.Popover.contentView) property instead.
* @returns {Number/String}
*/
/**
* @method setHeight
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-height} property.</p>
* @deprecated 3.4.2 This property is deprecated. Set the height on the [contentView](Titanium.UI.iPad.Popover.contentView) property instead.
* @param {Number/String} height
<p>New value for the property.</p>
*/
/**
* @method getLayout
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-layout} property.</p>
* @returns {String}
*/
/**
* @method setLayout
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-layout} property.</p>
* @param {String} layout
<p>New value for the property.</p>
*/
/**
* @method getArrowDirection
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-arrowDirection} property.</p>
* @returns {Number}
*/
/**
* @method setArrowDirection
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-arrowDirection} property.</p>
* @param {Number} arrowDirection
<p>New value for the property.</p>
*/
/**
* @method getContentView
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-contentView} property.</p>
* @returns {Titanium.UI.View}
* @platform ipad 3.2.0
*/
/**
* @method setContentView
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-contentView} property.</p>
* @param {Titanium.UI.View} contentView
<p>New value for the property.</p>
* @platform ipad 3.2.0
*/
/**
* @method getLeftNavButton
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-leftNavButton} property.</p>
* @deprecated 3.4.2 This property is no longer supported.
* @returns {Object}
*/
/**
* @method setLeftNavButton
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-leftNavButton} property.</p>
* @deprecated 3.4.2 This property is no longer supported.
* @param {Object} leftNavButton
<p>New value for the property.</p>
*/
/**
* @method getPassthroughViews
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-passthroughViews} property.</p>
* @returns {Titanium.UI.View[]}
*/
/**
* @method setPassthroughViews
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-passthroughViews} property.</p>
* @param {Array<Titanium.UI.View>} passthroughViews
<p>New value for the property.</p>
*/
/**
* @method getRightNavButton
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-rightNavButton} property.</p>
* @deprecated 3.4.2 This property is no longer supported.
* @returns {Object}
*/
/**
* @method setRightNavButton
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-rightNavButton} property.</p>
* @deprecated 3.4.2 This property is no longer supported.
* @param {Object} rightNavButton
<p>New value for the property.</p>
*/
/**
* @method getTitle
* <p>Gets the value of the {@link Titanium.UI.iPad.Popover#property-title} property.</p>
* @deprecated 3.4.2 This property is no longer supported.
* @returns {String}
*/
/**
* @method setTitle
* <p>Sets the value of the {@link Titanium.UI.iPad.Popover#property-title} property.</p>
* @deprecated 3.4.2 This property is no longer supported.
* @param {String} title
<p>New value for the property.</p>
*/
/**
* @property [accessibilityHidden=false]
* @hide
* @type Boolean
* <p>Whether the view should be "hidden" from (i.e., ignored by) the accessibility service.</p>
* <p> <b>Requires:</b>
Android 4.0 and later
iOS 5.0 and later
</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityElementsHidden</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility
Protocol</a>.
The native property is only available in iOS 5.0 and later; if
<code>accessibilityHidden</code> is specified on earlier versions of iOS, it is ignored.</p>
<p>On Android, setting <code>accessibilityHidden</code> calls the native
<a href="http://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29">View.setImportantForAccessibility</a>
method. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and
later; if this property is specified on earlier versions of Android, it is ignored.</p>
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityHint=]
* @hide
* @type String
* <p>Briefly describes what performing an action (such as a click) on the view will do.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityHint</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityValue} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityLabel=Title or label of the control.]
* @hide
* @type String
* <p>A succint label identifying the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityLabel</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityValue} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform ipad 3.0.0
*/
/**
* @property [accessibilityValue=State or value of the control.]
* @hide
* @type String
* <p>A string describing the value (if any) of the view for the device's accessibility service.</p>
* @description <p>On iOS this is a direct analog of the <code>accessibilityValue</code> property defined in the
<a href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol</a>.
On Android, it is concatenated together with
{@link Titanium.UI.View#property-accessibilityLabel} and {@link Titanium.UI.View#property-accessibilityHint} in the order: <code>accessibilityLabel</code>,
<code>accessibilityValue</code>, <code>accessibilityHint</code>. The concatenated value is then passed as the
argument to the native <a href="http://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29">View.setContentDescription</a> method.</p>
* @platform ipad 3.0.0
*/
/**
* @property [anchorPoint=Center of this view.]
* @hide
* @type Point
* <p>Coordinate of the view about which to pivot an animation.</p>
* @description <p>Used on iOS only. For Android, use {@link Titanium.UI.Animation#property-anchorPoint}. </p>
<p>Anchor point is specified as a fraction of the view's size. For example, <code>{0, 0}</code> is at
the view's top-left corner, <code>{0.5, 0.5}</code> at its center and <code>{1, 1}</code> at its bottom-right
corner. </p>
<p>See the "Using an anchorPoint" example in {@link Titanium.UI.Animation} for a demonstration.</p>
*/
/**
* @property animatedCenter
* @hide
* @type Point
* @readonly
* <p>Current position of the view during an animation.</p>
*/
/**
* @property [backgroundRepeat=false]
* @hide
* @type Boolean
* <p>Determines whether to tile a background across a view.</p>
* @description <p>Setting this to <code>true</code> makes the set <code>backgroundImage</code> repeat across the view as a series
of tiles. The tiling begins in the upper-left corner, where the upper-left corner of the
background image is rendered. The image is then tiled to fill the available space of the
view.</p>
<p>Note that setting this to <code>true</code> may incur performance penalties for large views or
background images, as the tiling must be redone whenever a view is resized.</p>
<p>On iOS, the following views do not currently support tiled backgrounds:</p>
<ul>
<li>{@link Titanium.UI.Button}</li>
<li>{@link Titanium.UI.TextField}</li>
<li>{@link Titanium.UI.Label}</li>
</ul>
*/
/**
* @property [backgroundLeftCap=0]
* @hide
* @type Number
* <p>Size of the left end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
*/
/**
* @property [backgroundTopCap=0]
* @hide
* @type Number
* <p>Size of the top end cap.</p>
* @description <p>See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in {@link Titanium.UI.View}.</p>
*/
/**
* @property [borderColor=Same as the normal background color of this view (Android, Mobile Web), black (iOS).]
* @hide
* @type String
* <p>Border color of the view, as a color name or hex triplet.</p>
* @description <p>For information about color values, see the "Colors" section of {@link Titanium.UI}. </p>
*/
/**
* @property [clipMode=Undefined. Behaves as if set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT}.]
* @hide
* @type Number
* <p>View's clipping behavior.</p>
* @description <p>Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_ENABLED} enforces all child views to be clipped to this views bounds.
Setting this to {@link Titanium.UI.iOS#property-CLIP_MODE_DISABLED} allows child views to be drawn outside the bounds of this view.
When set to {@link Titanium.UI.iOS#property-CLIP_MODE_DEFAULT} or when this property is not set, clipping behavior is inferred.
See section on iOS Clipping Behavior in {@link Titanium.UI.View}.</p>
* @platform ipad 3.3.0
*/
/**
* @property [pullBackgroundColor=Undefined. Results in a light grey background color on the wrapper view.]
* @hide
* @type String
* <p>Background color of the wrapper view when this view is used as either <Titanium.UI.ListView.pullView> or {@link Titanium.UI.TableView#property-headerPullView}.</p>
* @platform ipad 3.3.0
*/
/**
* @property [tintColor=]
* @hide
* @type String
* <p>The view's tintColor. This property is applicable on iOS 7 and greater.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>This property is a direct correspondant of the tintColor property of UIView on iOS. If no value is specified,
the tintColor of the View is inherited from its superview. </p>
* @platform ipad 3.1.3
*/
/**
* @property [transform=Identity matrix]
* @hide
* @type Titanium.UI.2DMatrix/Titanium.UI.3DMatrix
* <p>Transformation matrix to apply to the view.</p>
* @description <p>Android and Mobile Web only support 2DMatrix transforms.</p>
*/
/**
* @property [viewShadowRadius=Undefined. Behaves as if set to 3.]
* @hide
* @type Number
* <p>Determines the blur radius used to create the shadow.</p>
* @platform ipad 3.3.0
*/
/**
* @property [viewShadowColor=Undefined. Behaves as if transparent.]
* @hide
* @type String
* <p>Determines the color of the shadow.</p>
* @platform ipad 3.3.0
*/
/**
* @property [viewShadowOffset=Undefined. Behaves as if set to (0,-3)]
* @hide
* @type Point
* <p>Determines the offset for the shadow of the view.</p>
* @platform ipad 3.3.0
*/
/**
* @property [horizontalWrap=true]
* @hide
* @type Boolean
* <p>Determines whether the layout has wrapping behavior.</p>
* @description <p>For more information, see the discussion of horizontal layout mode in the description of
the {@link Titanium.UI.View#property-layout layout} property.</p>
* @platform ipad 2.1.0
*/
/**
* @property [backgroundGradient=No gradient]
* @hide
* @type Gradient
* <p>A background gradient for the view.</p>
* @description <p>A gradient can be defined as either linear or radial. A linear gradient varies continuously
along a line between the <code>startPoint</code> and <code>endPoint</code>.</p>
<p>A radial gradient is interpolated between two circles, defined by <code>startPoint</code> and
<code>startRadius</code> and <code>endPoint</code> and <code>endRadius</code> respectively.</p>
<p>The start and end points and radius values can be defined in device units, in the view's
coordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center
point of the view can be specified as:</p>
<pre><code>{ x: 30, y: 30 }
</code></pre>
<p>Or:
{ x: '50%', y: '50%' }</p>
<p>When specifying multiple colors, you can specify an <em>offset</em> value for each color, defining
how far into the gradient it takes effect. For example, the following color array specifies
a gradient that goes from red to blue back to red: </p>
<pre><code>colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]
</code></pre>
<p>Mobile Web has two limitations: backfillStart and backfillEnd are ignored and the system
behaves as if they are true, and endPoint is not supported for radial gradients. </p>
<p>Android currently only supports linear gradients. It also ignores backfillStart and backfillEnd
treating them as if they are true.</p>
* <h3>Examples</h3>
<h4>Linear and Radial Gradients</h4>
<p>The following code excerpt creates two views, one with a linear gradient and one with
a radial gradient.</p>
<pre><code>var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var radialGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'radial',
startPoint: { x: 50, y: 50 },
endPoint: { x: 50, y: 50 },
colors: [ 'red', 'blue'],
startRadius: '90%',
endRadius: 0,
backfillStart: true
}
});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],
}
});
win1.add(radialGradient);
win1.add(linearGradient);
win1.open();
</code></pre>
*/
/**
* @property [backgroundImage=Default behavior when `backgroundImage` is unspecified depends on the type of view and
the platform. For generic views, no image is used. For most controls (buttons, text
fields, and so on), platform-specific default images are used.
]
* @hide
* @type String
* <p>Background image for the view, specified as a local file path or URL.</p>
*/
/**
* @property [borderRadius=0]
* @hide
* @type Number
* <p>Radius for the rounded corners of the view's border.</p>
* @description <p>Each corner is rounded using an arc of a circle.</p>
*/
/**
* @property [borderWidth=0]
* @hide
* @type Number
* <p>Border width of the view.</p>
*/
/**
* @property [opacity=1.0 (opaque)]
* @hide
* @type Number
* <p>Opacity of this view, from 0.0 (transparent) to 1.0 (opaque).</p>
*/
/**
* @property rect
* @hide
* @type Dimension
* @readonly
* <p>The bounding box of the view relative to its parent, in system units.</p>
* @description <p>The view's bounding box is defined by its size and position. </p>
<p>The view's size is <code>rect.width</code> x <code>rect.height</code>. The view's top-left position relative to
its parent is (<code>rect.x</code> , <code>rect.y</code>). </p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
* @platform ipad 2.0.0
*/
/**
* @property size
* @hide
* @type Dimension
* @readonly
* <p>The size of the view in system units. </p>
* @description <p>Although property returns a {@link Dimension} dictionary, only the <code>width</code> and <code>height</code>
properties are valid. The position properties--<code>x</code> and <code>y</code>--are always 0.</p>
<p>To find the position <em>and</em> size of the view, use the {@link Titanium.UI.View#property-rect rect}
property instead.</p>
<p>The correct values will only be available when layout is complete.
To determine when layout is complete, add a listener for the
{@link Titanium.UI.View#event-postlayout postlayout} event.</p>
*/
/**
* @property [touchEnabled=true]
* @hide
* @type Boolean
* <p>Determines whether view should receive touch events.</p>
* @description <p>If false, will forward the events to peers.</p>
*/
/**
* @property [visible=true]
* @hide
* @type Boolean
* <p>Determines whether the view is visible.</p>
*/
/**
* @property zIndex
* @hide
* @type Number
* <p>Z-index stack order position, relative to other sibling views.</p>
* @description <p>A view does not have a default z-index value, meaning that it is undefined by default.
When this property is explicitly set, regardless of its value, it causes the view to be
positioned in front of any sibling that has an undefined z-index.</p>
*/
/**
* @property children
* @hide
* @type Titanium.UI.View[]
* @readonly
* <p>Array of this view's child views.</p>
*/
/**
* @property [backgroundColor=undefined (behaves as transparent)]
* @type String
* @creationOnly
* <p>Sets the background color of the popover.</p>
* @description <p>It is recommended to set this property to colorize the whole popover instead of only
its content view.</p>
* @platform ipad 5.2.0
*/
/**
* @property top
* @hide
* @type Number/String
* <p>The view's top position.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property left
* @hide
* @type Number/String
* <p>View's left position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property bottom
* @hide
* @type Number/String
* <p>View's bottom position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the parent
view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or a
dimension string (for example, '50%' or '10px'). </p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property center
* @hide
* @type Point
* <p>View's center position, in the parent view's coordinates.</p>
* @description <p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property right
* @hide
* @type Number/String
* <p>View's right position, in platform-specific units.</p>
* @description <p>This position is relative to the view's parent. Exact interpretation depends on the
parent view's {@link Titanium.UI.View#property-layout layout} property. Can be either a float value or
a dimension string (for example, '50%' or '10px').</p>
<p>This is an input property for specifying where the view should be positioned, and does not
represent the view's calculated position.</p>
*/
/**
* @property width
* @type Number/String
* <p>Width of the popover.</p>
* @deprecated 3.4.2 This property is deprecated. Set the width on the [contentView](Titanium.UI.iPad.Popover.contentView) property instead.
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values: </p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</li>
</ul>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p>
<p>This is an input property for specifying the view's width dimension. To determine
the view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
*/
/**
* @property height
* @type Number/String
* <p>Height of the popover.</p>
* @deprecated 3.4.2 This property is deprecated. Set the height on the [contentView](Titanium.UI.iPad.Popover.contentView) property instead.
* @description <p>Defaults to: If undefined, defaults to either {@link Titanium.UI#property-FILL} or {@link Titanium.UI#property-SIZE}
depending on the view. See "View Types and Default Layout Behavior" in
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>.</p>
<p>Can be either a float value or a dimension string (for example, '50%' or '40dp').
Can also be one of the following special values:</p>
<ul>
<li>{@link Titanium.UI#property-SIZE}. The view should size itself to fit its contents.</li>
<li>{@link Titanium.UI#property-FILL}. The view should size itself to fill its parent. </li>
<li><p>'auto'. Represents the default sizing behavior for a given type of
view. The use of 'auto' is deprecated, and should be replaced with the <code>SIZE</code> or
<code>FILL</code> constants if it is necessary to set the view's behavior explicitly.</p>
<p>On Mobile Web, 'auto' always selects <code>SIZE</code> behavior.</p></li>
</ul>
<p>This is an input property for specifying the view's height dimension. To determine the
view's size once rendered, use the {@link Titanium.UI.View#property-rect rect} or
{@link Titanium.UI.View#property-size size} properties.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI#property-FILL}
<li> {@link Titanium.UI#property-SIZE}
</ul></p>
*/
/**
* @property [layout=Composite layout]
* @hide
* @type String
* <p>Specifies how the view positions its children.
One of: 'composite', 'vertical', or 'horizontal'.</p>
* @description <p>There are three layout options:</p>
<ul>
<li><p><code>composite</code> (or <code>absolute</code>). Default layout. A child view is positioned based on its
positioning properties or "pins" (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code> and <code>center</code>).
If no positioning properties are specified, the child is centered. </p>
<p>The child is always sized based on its <code>width</code> and <code>height</code> properties, if these are
specified. If the child's height or width is <em>not</em> specified explicitly, it may be
calculated implicitly from the positioning properties. For example, if both <code>left</code> and
<code>center.x</code> are specified, they can be used to calculate the width of the child control. </p>
<p>Because the size and position properties can conflict, there is a specific precedence
order for the layout properties. For vertical positioning, the precedence
order is: <code>height</code>, <code>top</code>, <code>center.y</code>, <code>bottom</code>.</p>
<p>The following table summarizes the various combinations of properties that can
be used for vertical positioning, in order from highest precedence to lowest.
(For example, if <code>height</code>, <code>center.y</code> and <code>bottom</code> are all specified, the
<code>height</code> and <code>center.y</code> values take precedence.)</p>
<table cellpadding="6px" border="1" rules="all">
<tr>
<th>Scenario</th><th>Behavior</th>
</tr>
<tr>
<td>`height` & `top` specified</td><td>Child positioned `top` unit from
parent's top, using specified `height`;
any `center.y` and `bottom` values are ignored.</td>
</tr>
<tr>
<td>`height` & `center.y` specified</td><td>Child positioned with center at
`center.y`, using specified `height`; any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`height` & `bottom` specified</td><td>Child positioned `bottom` units from
parent's bottom, using specified `height`.</td>
</tr>
<tr>
<td>`top` & `center.y` specified</td><td>Child positioned with top edge `top` units from
parent's top and center at `center.y`. Height is determined implicitly;
any `bottom` value is ignored.</td>
</tr>
<tr>
<td>`top` & `bottom` specified</td><td>Child positioned with top edge `top` units from
parent's top and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly. </td>
</tr>
<tr>
<td>Only `top` specified</td><td>Child positioned `top` units from parent's
top, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`center.y` and `bottom` specified</td><td>Child positioned with center at
`center.y` and bottom edge `bottom` units from parent's bottom. Height is determined
implicitly.</td>
</tr>
<tr>
<td>Only `center.y` specified</td><td>Child positioned with center at
`center.y`, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>Only `bottom` specified</td><td>Child positioned with bottom edge `bottom`
units from parent's bottom, and uses the default height calculation for the view type.</td>
</tr>
<tr>
<td>`height`, `top`, `center.y`, and `bottom` unspecified</td><td>Child
centered vertically in the parent and uses the default height calculation
for the child view type.</td>
</tr>
</table>
<p>Horizontal positioning works like vertical positioning, except that the
precedence is <code>width</code>, <code>left</code>, <code>center.x</code>, <code>right</code>. </p>
<p>For complete details on composite layout rules, see
<a href="http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System">Transitioning to the New UI Layout System</a>
in the Titanium Mobile Guides. </p>
<ul><li><code>vertical</code>. Children are laid out vertically from top to bottom. The first child
is laid out <code>top</code> units from its parent's bounding box. Each subsequent child is
laid out below the previous child. The space between children is equal to the
upper child's <code>bottom</code> value plus the lower child's <code>top</code> value. </li></ul>
<p>Each child is positioned horizontally as in the composite layout mode. </p>
<ul><li><code>horizontal</code>. Horizontal layouts have different behavior depending on whether wrapping
is enabled. Wrapping is enabled by default (the <code>horizontalWrap</code> property is <code>true</code>).</li></ul>
<p>With wrapping behavior, the children are laid out horizontally from left to right,
<em>in rows</em>. If a child requires more horizontal space than exists in the current row,
it is wrapped to a new row. The height of each row is equal to the maximum height of
the children in that row.</p>
<p>Wrapping behavior is available on iOS, Android and Mobile Web (Release 2.1.0 and later).
When the <code>horizontalWrap</code> property is set to true, the first row is placed at the top of the
parent view, and successive rows are placed below the first row. Each child is
positioned vertically <em>within its row</em> somewhat like composite layout mode.
In particular: </p>
<ul><li>If neither <code>top</code> or <code>bottom</code> is specified, the child is centered in the
row.</li>
<li>If either <code>top</code> or <code>bottom</code> is specified, the child is aligned to either
the top or bottom of the row, with the specified amount of padding.</li>
<li>If <em>both</em> <code>top</code> and <code>bottom</code> is specified for a given child, the properties
are both treated as padding.</li></ul>
<p>If the <code>horizontalWrap</code> property is false, the behavior is more equivalent to a vertical layout.
Children are laid or horizontally from left to right in a single row. The <code>left</code> and
<code>right</code> properties are used as padding between the children, and the <code>top</code> and <code>bottom</code>
properties are used to position the children vertically.</p>
<p>On Mobile Web <em>prior to</em> Release 2.1.0, the horizontal layout does not wrap by default,
and does not support the <code>horizontalWrap</code> property. On Android and iOS <em>prior to</em> Release
2.1.0, the horizontal layout always wraps and the <code>horizontalWrap</code> property is not supported.</p></li>
</ul>
*/
/**
* @property arrowDirection
* @type Number
* <p>Indicates the arrow direction of the popover.</p>
* @description <p>Use this property to indicate the popover arrows to use. You can bitwise-OR the constant
values together.</p>
<p>Do not set this property to {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_UNKNOWN}.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_ANY}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_DOWN}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_LEFT}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_RIGHT}
<li> {@link Titanium.UI.iPad#property-POPOVER_ARROW_DIRECTION_UP}
</ul></p>
*/
/**
* @property contentView
* @type Titanium.UI.View
* <p>View to use for the popover content. Must be set before calling the <code>show()</code> method.</p>
* @description <p>Set this property to any {@link Titanium.UI.View} object, including a {@link Titanium.UI.Window} or
{@link Titanium.UI.iOS.NavigationWindow} object.</p>
<p>This property does not support the {@link Titanium.UI.iPad.SplitWindow} or {@link Titanium.UI.TabGroup} objects.</p>
<p>When this property is set to a valid object, the popover <strong>does not include the navigation
controller</strong> unless it is set to a {@link Titanium.UI.iOS.NavigationWindow} object.</p>
<p>In an Alloy application, you can specify this property as a <code><ContentView></code> child element
of the <code><Popover></code> element:</p>
<pre><code><Alloy>
<Popover>
<ContentView>
<Window title="Popover">
<Label>Popover!</Label>
</Window>
</ContentView>
</Popover>
</Alloy
</code></pre>
* @platform ipad 3.2.0
*/
/**
* @property leftNavButton
* @type Object
* <p>Left button in the navigation area of the popover.</p>
* @deprecated 3.4.2 This property is no longer supported.
* @description <p>Ignored when {@link Titanium.UI.iPad.Popover#property-contentView contentView} is set. </p>
<p>In an Alloy application, you can specify this property as a <code><LeftNavButton></code> child element
of the <code><Popover></code> element:</p>
<pre><code><Alloy>
<Popover>
<LeftNavButton>
<Button onClick='showAlert'>Alert</Button>
</LeftNavButton>
</Popover>
</Alloy>
</code></pre>
*/
/**
* @property passthroughViews
* @type Titanium.UI.View[]
* <p>Passthrough views to use when the popover is shown.</p>
* @description <p>Specify view objects that the user can interact with while the popover is open. While
interacting with these view, the popover will not be dismissed.</p>
*/
/**
* @property rightNavButton
* @type Object
* <p>Right button in the navigation area of the popover.</p>
* @deprecated 3.4.2 This property is no longer supported.
* @description <p>Ignored when {@link Titanium.UI.iPad.Popover#property-contentView contentView} is set.</p>
<p>In an Alloy application, you can specify this property as a <code><RightNavButton></code> child element
of the <code><Popover></code> element:</p>
<pre><code><Alloy>
<Popover>
<RightNavButton>
<Button onClick='showAlert'>Alert</Button>
</RightNavButton>
</Popover>
</Alloy>
</code></pre>
*/
/**
* @property title
* @type String
* <p>Title of the navigation area of the popover.</p>
* @deprecated 3.4.2 This property is no longer supported.
* @description <p>Ignored when {@link Titanium.UI.iPad.Popover#property-contentView contentView} is set.</p>
*/
/**
* @class PopoverParams
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPad/Popover.yml
* <p>Dictionary of options for {@link Titanium.UI.iPad.Popover#method-show} and {@link Titanium.UI.iPad.Popover#method-hide}.</p>
* @description <p>All properties are optional except you need to specify the <code>view</code> property for the <code>show()</code>
method to attach the popover to a view component.</p>
<p>The <code>hide()</code> method only supports the <code>animated</code> property.</p>
*/
/**
* @property [animated=true]
* @type Boolean
* <p>Indicates whether to animate showing or hiding the popover.</p>
*/
/**
* @property [rect=All dimension properties are set to zero.]
* @type Dimension
* <p>Sets the arrow position of the popover relative to the attached view object's dimensions
when showing the popover.</p>
* @description <p>Setting the x, y coordinates to (0, 0) places the popover in the top-left corner of the view object. Set both the <code>width</code> and <code>height</code> properties to 1.</p>
*/
/**
* @property view
* @type Titanium.UI.View
* <p>Attaches the popover to the specified view when showing the popover.</p>
*/
/**
* @class Titanium.UI.iPad.SplitWindow
* @platform ipad 1.2
* @extends Titanium.UI.Window
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPad/SplitWindow.yml
* <p>A SplitWindow is a window that manages the presentation of two side-by-side view
controllers. </p>
* @removed 6.0.0 Use <Titanium.UI.iOS.SplitWindow> instead.
* @description <p>You use this class to implement a master-detail interface, in which the left-side view presents
a list of items and the right-side presents details of the selected item. The SplitView is for
use exclusively on iPad devices. </p>
<p>By default, <code>SplitView</code> shows both master and detail views in landscape orientation. When the
device switches into portrait orientation, the detail view occupies the entire screen. The user
can click a button to bring up the master view as floating, "popover" view. (To show the master
view in both orientations, set <code>showMasterInPortrait</code> to <code>true</code>.) </p>
<p>Use the {@link Titanium.UI.iPad#method-createSplitWindow} method or <strong><code><SplitWindow></code></strong> Alloy element to create a
SplitWindow. A <code><SplitWindow></code> element only accepts a <code><Window></code> or <code><NavigationWindow></code> element
as children.</p>
<p>The <code>masterView</code> and <code>detailView</code> properties are required in the constructor of the SplitWindow
and cannot be changed once set. In an Alloy application, the first <code><Window></code> element declared
inside the <code><SplitWindow></code> is assigned to <code>masterView</code>; the second declared <code><Window></code> element
is assigned to <code>detailView</code>.</p>
<p>To add a navigation bar to either the master or detail view of the split window,
use a {@link Titanium.UI.iOS.NavigationWindow}. See examples below.</p>
<p>The SplitWindow is a top-level window and cannot be contained within another window or view.</p>
* <h3>Examples</h3>
<h4>Split Window</h4>
<p>This is an example of a Split Window.</p>
<pre><code>var detail = Ti.UI.createWindow({backgroundColor: 'white'});
var label1 = Ti.UI.createLabel({text: 'Detail View'});
detail.add(label1);
var detailNav = Ti.UI.iOS.createNavigationWindow({window: detail});
var master = Ti.UI.createWindow({backgroundColor: 'gray'});
var label2 = Ti.UI.createLabel({text: 'Master View'});
master.add(label2);
var masterNav = Ti.UI.iOS.createNavigationWindow({window: master});
var splitWin = Ti.UI.iPad.createSplitWindow({
detailView: detailNav,
masterView: masterNav
});
splitWin.addEventListener('visible',function(e){
if (e.view == 'detail'){
e.button.title = "Master";
detail.leftNavButton = e.button;
} else if (e.view == 'master'){
detail.leftNavButton = null;
}
});
splitWin.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Below is an Alloy version of the previous example. The first window is the <code>masterView</code> and
the second window is the <code>detailView</code>. You can also use the <code><Require></code> element to add a
<code><Window></code> or <code><NavigationWindow></code>.</p>
<p><strong>views/index.xml:</strong></p>
<pre><code><Alloy>
<SplitWindow backgroundColor="white" showMasterInPortrait="true">
<!-- First window is the masterView -->
<NavigationWindow>
<ListView>
<ListSection headerTitle="Some items">
<ListItem title="Item 1"></ListItem>
<ListItem title="Item 2"></ListItem>
<ListItem title="Item 3"></ListItem>
</ListSection>
</ListView>
</NavigationWindow>
<!-- Second window is the detailView -->
<Window>
<Label>I am the detail view.</Label>
</Window>
</SplitWindow>
</Alloy>
</code></pre>
<p><strong>controllers/index.js:</strong></p>
<pre><code>$.index.addEventListener('visible',function(e){
if (e.view == 'detail'){
e.button.title = "Master";
$.index.detailView.getWindow().leftNavButton = e.button;
} else if (e.view == 'master'){
$.index.detailView.getWindow().leftNavButton = null;
}
});
$.index.open();
</code></pre>
*/
/**
* @event visible
* <p>Fired when the <code>masterView</code> or <code>detailView</code> becomes visible.</p>
* @param {Titanium.UI.Button} button
<p>For <code>detail</code> view type, the button that is automatically wired to control the master
view popover.</p>
* @param {Titanium.UI.iPad.Popover} popover
<p>For either <code>popover</code> or <code>detail</code> view types, the popover instance.</p>
* @param {String} view
<p>Type of view becoming visible. Either <code>master</code>, <code>popover</code> or <code>detail</code>.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method getSwipeToClose
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.SplitWindow#property-swipeToClose} property.</p>
* @returns {Boolean}
* @platform ipad 5.2.0
*/
/**
* @method setSwipeToClose
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.SplitWindow#property-swipeToClose} property.</p>
* @param {Boolean} swipeToClose
<p>New value for the property.</p>
* @platform ipad 5.2.0
*/
/**
* @method getTransitionAnimation
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPad.SplitWindow#property-transitionAnimation} property.</p>
* @returns {Titanium.Proxy}
* @platform ipad 3.2.0
*/
/**
* @method setTransitionAnimation
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPad.SplitWindow#property-transitionAnimation} property.</p>
* @param {Titanium.Proxy} transitionAnimation
<p>New value for the property.</p>
* @platform ipad 3.2.0
*/
/**
* @method getDetailView
* <p>Gets the value of the {@link Titanium.UI.iPad.SplitWindow#property-detailView} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setDetailView
* <p>Sets the value of the {@link Titanium.UI.iPad.SplitWindow#property-detailView} property.</p>
* @param {Titanium.UI.View} detailView
<p>New value for the property.</p>
*/
/**
* @method getMasterView
* <p>Gets the value of the {@link Titanium.UI.iPad.SplitWindow#property-masterView} property.</p>
* @returns {Titanium.UI.View}
*/
/**
* @method setMasterView
* <p>Sets the value of the {@link Titanium.UI.iPad.SplitWindow#property-masterView} property.</p>
* @param {Titanium.UI.View} masterView
<p>New value for the property.</p>
*/
/**
* @method getShowMasterInPortrait
* <p>Gets the value of the {@link Titanium.UI.iPad.SplitWindow#property-showMasterInPortrait} property.</p>
* @returns {Boolean}
* @platform ipad 1.7.2
*/
/**
* @method setShowMasterInPortrait
* <p>Sets the value of the {@link Titanium.UI.iPad.SplitWindow#property-showMasterInPortrait} property.</p>
* @param {Boolean} showMasterInPortrait
<p>New value for the property.</p>
* @platform ipad 1.7.2
*/
/**
* @property [swipeToClose=true]
* @hide
* @type Boolean
* <p>Boolean value indicating if the user should be able to close a window using a swipe gesture.</p>
* @description <p>If <code>false</code> the user will not be able to swipe from the left edge of the window to close it.
Note: This property is only used for a window being embedded in a {@link Titanium.UI.Tab Ti.UI.Tab} or
{@link Titanium.UI.iOS.NavigationWindow Ti.UI.iOS.NavigationWindow}. It is enabled by default.</p>
* @platform ipad 5.2.0
*/
/**
* @property transitionAnimation
* @hide
* @type Titanium.Proxy
* <p>Use a transition animation when opening or closing windows in a
{@link Titanium.UI.iOS.NavigationWindow} or {@link Titanium.UI.Tab}.</p>
* <p> <b>Requires:</b>
iOS 7.0 and later
</p>
* @description <p>Create the transition animation using the {@link Titanium.UI.iOS#method-createTransitionAnimation}
method.</p>
<p>Supported on iOS 7 and later.</p>
* @platform ipad 3.2.0
*/
/**
* @property detailView
* @type Titanium.UI.View
* @creationOnly
* <p>View for the detail view section of the SplitWindow.</p>
*/
/**
* @property masterView
* @type Titanium.UI.View
* @creationOnly
* <p>View for the master view section of the SplitWindow.</p>
*/
/**
* @property [showMasterInPortrait=false]
* @type Boolean
* <p>Determines whether to show the master view in portrait orientation.</p>
* @platform ipad 1.7.2
*/
/**
* @class Titanium.UI.iPad
* @platform ipad 1.2
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPad/iPad.yml
* <p>iPad specific UI capabilities.</p>
* @description <p>All properties, methods and events in this namespace will only work on the Apple iPad devices. </p>
<p>For iOS UI programming guidelines, review the
<a href="https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/index.html">iOS Human Interface Guidelines</a>.</p>
*/
/**
* @method createDocumentViewer
* <p>Creates and returns an instance of {@link Titanium.UI.iPad.DocumentViewer}.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.DocumentViewer> instead.
* @param {Dictionary<Titanium.UI.iPad.DocumentViewer>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iPad.DocumentViewer} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iPad.DocumentViewer}
* @platform ipad 1.8
*/
/**
* @method createPopover
* <p>Creates and returns an instance of {@link Titanium.UI.iPad.Popover}.</p>
* @param {Dictionary<Titanium.UI.iPad.Popover>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iPad.Popover} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iPad.Popover}
*/
/**
* @method createSplitWindow
* <p>Creates and returns an instance of {@link Titanium.UI.iPad.SplitWindow}.</p>
* @removed 6.0.0 Use <Titanium.UI.iOS.SplitWindow> instead.
* @param {Dictionary<Titanium.UI.iPad.SplitWindow>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iPad.SplitWindow} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iPad.SplitWindow}
*/
/**
* @property POPOVER_ARROW_DIRECTION_ANY
* @type Number
* @readonly
* <p>An arrow that points in any direction.</p>
*/
/**
* @property POPOVER_ARROW_DIRECTION_DOWN
* @type Number
* @readonly
* <p>An arrow that points downward.</p>
*/
/**
* @property POPOVER_ARROW_DIRECTION_LEFT
* @type Number
* @readonly
* <p>An arrow that points toward the left.</p>
*/
/**
* @property POPOVER_ARROW_DIRECTION_RIGHT
* @type Number
* @readonly
* <p>An arrow that points toward the right.</p>
*/
/**
* @property POPOVER_ARROW_DIRECTION_UNKNOWN
* @type Number
* @readonly
* <p>The status of the arrow is currently unknown.</p>
*/
/**
* @property POPOVER_ARROW_DIRECTION_UP
* @type Number
* @readonly
* <p>An arrow that points upward.</p>
*/
/**
* @class Titanium.UI.iPhone.ActivityIndicatorStyle
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/ActivityIndicatorStyle.yml
* <p>A set of constants for the styles available for {@link Titanium.UI.ActivityIndicator} objects.</p>
* @deprecated 5.1.0 Use <Titanium.UI.ActivityIndicatorStyle> instead.
*/
/**
* @property BIG
* @type Number
* @readonly
* <p>Large white spinning indicator.</p>
* @deprecated 5.1.0 Use <Titanium.UI.ActivityIndicatorStyle.BIG> instead.
* @description <p>Used with the {@link Titanium.UI.ActivityIndicator#property-style} property.</p>
<p>One of the group of activity indicator style constants
{@link Titanium.UI.iPhone.ActivityIndicatorStyle#property-DARK DARK},
{@link Titanium.UI.iPhone.ActivityIndicatorStyle#property-BIG BIG},
and {@link Titanium.UI.iPhone.ActivityIndicatorStyle#property-PLAIN PLAIN}.</p>
*/
/**
* @property DARK
* @type Number
* @readonly
* <p>Small gray spinning indicator.</p>
* @deprecated 5.1.0 Use <Titanium.UI.ActivityIndicatorStyle.DARK> instead.
* @description <p>Used with the {@link Titanium.UI.ActivityIndicator#property-style} property.</p>
<p>One of the group of activity indicator style constants
{@link Titanium.UI.iPhone.ActivityIndicatorStyle#property-DARK DARK},
{@link Titanium.UI.iPhone.ActivityIndicatorStyle#property-BIG BIG},
and {@link Titanium.UI.iPhone.ActivityIndicatorStyle#property-PLAIN PLAIN}.</p>
*/
/**
* @property PLAIN
* @type Number
* @readonly
* <p>Small white spinning indicator (default.)</p>
* @deprecated 5.1.0 Use <Titanium.UI.ActivityIndicatorStyle.PLAIN> instead.
* @description <p>Used with the {@link Titanium.UI.ActivityIndicator#property-style} property.</p>
<p>One of the group of activity indicator style constants
{@link Titanium.UI.iPhone.ActivityIndicatorStyle#property-DARK DARK},
{@link Titanium.UI.iPhone.ActivityIndicatorStyle#property-BIG BIG},
and {@link Titanium.UI.iPhone.ActivityIndicatorStyle#property-PLAIN PLAIN}.</p>
*/
/**
* @class Titanium.UI.iPhone.AlertDialogStyle
* @platform iphone 3.0.0
* @platform ipad 3.0.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/AlertDialogStyle.yml
* <p>A set of constants for the style that can be used for the <code>style</code> property of
{@link Titanium.UI.AlertDialog}.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.AlertDialogStyle> instead.
*/
/**
* @property DEFAULT
* @type Number
* @readonly
* <p>A standard alert dialog. This is the default value.</p>
*/
/**
* @property PLAIN_TEXT_INPUT
* @type Number
* @readonly
* <p>An alert dialog that allows the user to enter text.</p>
*/
/**
* @property SECURE_TEXT_INPUT
* @type Number
* @readonly
* <p>An alert dialog that allows the user to enter text. The text field is obscured.</p>
*/
/**
* @property LOGIN_AND_PASSWORD_INPUT
* @type Number
* @readonly
* <p>An alert dialog that allows the user to enter login identifier and password.</p>
*/
/**
* @class Titanium.UI.iPhone.AnimationStyle
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/AnimationStyle.yml
* <p>A set of constants for the animation styles used for view transitions.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.AnimationStyle> instead.
*/
/**
* @property CURL_DOWN
* @type Number
* @readonly
* <p>Curl downwards during a transition animation.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.AnimationStyle.CURL_DOWN> instead.
* @description <p>Used with the {@link Titanium.UI.Animation#property-transition} property.</p>
<p>One of the group of animation style constants
{@link Titanium.UI.iPhone.AnimationStyle#property-CURL_DOWN CURL_DOWN},
{@link Titanium.UI.iPhone.AnimationStyle#property-CURL_UP CURL_UP},
{@link Titanium.UI.iPhone.AnimationStyle#property-FLIP_FROM_LEFT FLIP_FROM_LEFT},
{@link Titanium.UI.iPhone.AnimationStyle#property-FLIP_FROM_RIGHT FLIP_FROM_RIGHT},
and {@link Titanium.UI.iPhone.AnimationStyle#property-NONE NONE}.</p>
*/
/**
* @property CURL_UP
* @type Number
* @readonly
* <p>Curl upwards during a transition animation.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.AnimationStyle.CURL_UP> instead.
* @description <p>Used with the {@link Titanium.UI.Animation#property-transition} property.</p>
<p>One of the group of animation style constants
{@link Titanium.UI.iPhone.AnimationStyle#property-CURL_DOWN CURL_DOWN},
{@link Titanium.UI.iPhone.AnimationStyle#property-CURL_UP CURL_UP},
{@link Titanium.UI.iPhone.AnimationStyle#property-FLIP_FROM_LEFT FLIP_FROM_LEFT},
{@link Titanium.UI.iPhone.AnimationStyle#property-FLIP_FROM_RIGHT FLIP_FROM_RIGHT},
and {@link Titanium.UI.iPhone.AnimationStyle#property-NONE NONE}.</p>
*/
/**
* @property FLIP_FROM_LEFT
* @type Number
* @readonly
* <p>Flip from left to right during a transition animation.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.AnimationStyle.FLIP_FROM_LEFT> instead.
* @description <p>Used with the {@link Titanium.UI.Animation#property-transition} property.</p>
<p>One of the group of animation style constants
{@link Titanium.UI.iPhone.AnimationStyle#property-CURL_DOWN CURL_DOWN},
{@link Titanium.UI.iPhone.AnimationStyle#property-CURL_UP CURL_UP},
{@link Titanium.UI.iPhone.AnimationStyle#property-FLIP_FROM_LEFT FLIP_FROM_LEFT},
{@link Titanium.UI.iPhone.AnimationStyle#property-FLIP_FROM_RIGHT FLIP_FROM_RIGHT},
and {@link Titanium.UI.iPhone.AnimationStyle#property-NONE NONE}.</p>
*/
/**
* @property FLIP_FROM_RIGHT
* @type Number
* @readonly
* <p>Flip from right to left during a transition animation.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.AnimationStyle.FLIP_FROM_RIGHT> instead.
* @description <p>Used with the {@link Titanium.UI.Animation#property-transition} property.</p>
<p>One of the group of animation style constants
{@link Titanium.UI.iPhone.AnimationStyle#property-CURL_DOWN CURL_DOWN},
{@link Titanium.UI.iPhone.AnimationStyle#property-CURL_UP CURL_UP},
{@link Titanium.UI.iPhone.AnimationStyle#property-FLIP_FROM_LEFT FLIP_FROM_LEFT},
{@link Titanium.UI.iPhone.AnimationStyle#property-FLIP_FROM_RIGHT FLIP_FROM_RIGHT},
and {@link Titanium.UI.iPhone.AnimationStyle#property-NONE NONE}.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>No animation.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.AnimationStyle.NONE> instead.
* @description <p>Used with the {@link Titanium.UI.Animation#property-transition} property.</p>
<p>One of the group of animation style constants
{@link Titanium.UI.iPhone.AnimationStyle#property-CURL_DOWN CURL_DOWN},
{@link Titanium.UI.iPhone.AnimationStyle#property-CURL_UP CURL_UP},
{@link Titanium.UI.iPhone.AnimationStyle#property-FLIP_FROM_LEFT FLIP_FROM_LEFT},
{@link Titanium.UI.iPhone.AnimationStyle#property-FLIP_FROM_RIGHT FLIP_FROM_RIGHT},
and {@link Titanium.UI.iPhone.AnimationStyle#property-NONE NONE}.</p>
*/
/**
* @class Titanium.UI.iPhone.ListViewCellSelectionStyle
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/ListViewCellSelectionStyle.yml
* <p>A set of constants for the style that can be used for the <code>selectionStyle</code> property of a
ListItem, which is set in the <code>properties</code> dictionary of either the {@link ListDataItem} or
{@link ItemTemplate}.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.ListViewCellSelectionStyle> instead.
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPhone.ListViewCellSelectionStyle#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPhone.ListViewCellSelectionStyle#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
/**
* @property BLUE
* @type Number
* @readonly
* <p>The cell when selected has a blue background. This is the default value.</p>
*/
/**
* @property GRAY
* @type Number
* @readonly
* <p>The cell when selected has a gray background.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>The cell has no distinct style for when it is selected.</p>
*/
/**
* @class Titanium.UI.iPhone.ListViewScrollPosition
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/ListViewScrollPosition.yml
* <p>A set of constants for the position value that can be used for the <code>position</code> property of
<ListViewAnimationProperties> when invoking the ListView's <code>scrollToItem</code>, <code>appendSection</code>,
<code>deleteSectionAt</code>, <code>insertSectionAt</code> and <code>replaceSectionAt</code> methods.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.ListViewScrollPosition> instead.
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPhone.ListViewScrollPosition#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPhone.ListViewScrollPosition#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
/**
* @property BOTTOM
* @type Number
* @readonly
* <p>The list view scrolls the row of interest to the bottom of the visible list view.</p>
*/
/**
* @property MIDDLE
* @type Number
* @readonly
* <p>The list view scrolls the row of interest to the middle of the list table view.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>The table view scrolls the row of interest to be fully visible with a minimal movement.
If the row is already fully visible, no scrolling occurs. For example, if the row is above the
visible area, the behavior is identical to that specified by <code>TOP</code>. This is the default.</p>
*/
/**
* @property TOP
* @type Number
* @readonly
* <p>The list view scrolls the row of interest to the top of the visible list view.</p>
*/
/**
* @class Titanium.UI.iPhone.ListViewSeparatorStyle
* @platform iphone 3.2.0
* @platform ipad 3.2.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/ListViewSeparatorStyle.yml
* <p>A set of constants for the style that can be used for the <code>separatorStyle</code> property of
{@link Titanium.UI.ListView}.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>The separator cell has no distinct style.</p>
*/
/**
* @property SINGLE_LINE
* @type Number
* @readonly
* <p>The separator cell has a single line running across its width. This is the default value.</p>
*/
/**
* @class Titanium.UI.iPhone.ListViewStyle
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/ListViewStyle.yml
* <p>A set of constants for the style that can be used for the <code>style</code> property of
{@link Titanium.UI.ListView}.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.ListViewStyle> instead.
*/
/**
* @method addEventListener
* @hide
* <p>Adds the specified callback as an event listener for the named event.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to invoke when the event is fired.</p>
*/
/**
* @method applyProperties
* @hide
* <p>Applies the properties to the proxy.</p>
* @description <p>Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that
myproxy[key] = value.</p>
* @param {Dictionary} props
<p>A dictionary of properties to apply.</p>
*/
/**
* @method fireEvent
* @hide
* <p>Fires a synthesized event to any registered listeners.</p>
* @param {String} name
<p>Name of the event.</p>
* @param {Dictionary} event
<p>A dictionary of keys and values to add to the {@link Titanium.Event} object sent to the listeners.</p>
*/
/**
* @method removeEventListener
* @hide
* <p>Removes the specified callback as an event listener for the named event.</p>
* @description <p>Multiple listeners can be registered for the same event, so the
<code>callback</code> parameter is used to determine which listener to remove. </p>
<p>When adding a listener, you must save a reference to the callback function
in order to remove the listener later:</p>
<pre><code>var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
</code></pre>
<p>To remove the listener, pass in a reference to the callback function:</p>
<pre><code>window.removeEventListener('click', listener);
</code></pre>
* @param {String} name
<p>Name of the event.</p>
* @param {Callback<Object>} callback
<p>Callback function to remove. Must be the same function passed to <code>addEventListener</code>.</p>
*/
/**
* @method getBubbleParent
* @hide
* <p>Gets the value of the {@link Titanium.UI.iPhone.ListViewStyle#property-bubbleParent} property.</p>
* @returns {Boolean}
*/
/**
* @method setBubbleParent
* @hide
* <p>Sets the value of the {@link Titanium.UI.iPhone.ListViewStyle#property-bubbleParent} property.</p>
* @param {Boolean} bubbleParent
<p>New value for the property.</p>
*/
/**
* @property [bubbleParent=true]
* @hide
* @type Boolean
* <p>Indicates if the proxy will bubble an event to its parent.</p>
* @description <p>Some proxies (most commonly views) have a relationship to other proxies, often
established by the add() method. For example, for a button added to a window, a
click event on the button would bubble up to the window. Other common parents are
table sections to their rows, table views to their sections, and scrollable views
to their views. Set this property to false to disable the bubbling to the proxy's parent.</p>
*/
/**
* @property GROUPED
* @type Number
* @readonly
* <p>A list view whose sections present distinct groups of rows. The section headers and footers
do not float.</p>
*/
/**
* @property PLAIN
* @type Number
* @readonly
* <p>A plain list view. Any section headers or footers are displayed as inline separators and
float when the list view is scrolled.</p>
*/
/**
* @class Titanium.UI.iPhone.NavigationGroup
* @platform iphone 1.2
* @platform ipad 1.2
* @extends Titanium.UI.View
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/NavigationGroup.yml
* <p>A Navigation Group implements a specialized view that manages the navigation of hierarchical
content.</p>
* @removed 3.2.0 Use <Titanium.UI.iOS.NavigationWindow> instead.
* @description <p>The navigation group is created with the method {@link Titanium.UI.iPhone#method-createNavigationGroup}.</p>
<p><img src="http://img.skitch.com/20100406-rwe44533tkd94fdnbqqudxynpe.png" alt="navgroup" title="" /></p>
<p>The <code>window</code> property must be set initially in the constructor when creating a navigation group
to the root level window. All navigation groups must have at least one root window that cannot
be removed.</p>
* <h3>Examples</h3>
<h4>Simple Navigation Group</h4>
<p>Creates a navigation group with the first window colored red.
Press the button to open the blue window.
Use the back button to return to the red root window.</p>
<pre><code>var win1 = Titanium.UI.createWindow();
var win2 = Titanium.UI.createWindow({
backgroundColor: 'red',
title: 'Red Window'
});
var win3 = Titanium.UI.createWindow({
backgroundColor: 'blue',
title: 'Blue Window'
});
var button = Titanium.UI.createButton({
title: 'Open Blue Window'
});
button.addEventListener('click', function(){
nav.open(win3, {animated:true});
});
var nav = Titanium.UI.iPhone.createNavigationGroup({
window: win2
});
win2.add(button);
win1.add(nav);
win1.open();
</code></pre><h4>Alloy XML Markup</h4>
<p>Previous example as two Alloy views.</p>
<p>navgroup.xml:</p>
<pre><code><Alloy>
<Window>
<NavigationGroup id="nav" platform="ios">
<Window id="win2" title="Red Window" backgroundColor="red">
<Button title="Open Blue Window" onClick="openBlueWindow">
</Window>
</NavigationGroup>
</Window>
</Alloy>
</code></pre>
<p>navgroup.js:</p>
<pre><code>function openBlueWindow(){
var win3 = Alloy.createController('bluewindow').getView();
$.nav.open(win3, {animated : true});
}
</code></pre>
<p>bluewindow.xml:</p>
<pre><code><Alloy>
<Window title="Blue Window" backgroundColor="blue" />
</Alloy>
</code></pre>
*/
/**
* @method removeAllChildren
* @hide
* <p>Removes all child views from this view's hierarchy.</p>
* @platform iphone 3.1.0
* @platform ipad 3.1.0
*/
/**
* @method close
* <p>Closes a window and removes it from the navigation group.</p>
* @param {Titanium.UI.Window} window
<p>Window to close.</p>
* @param {Dictionary} options
<p>Options supporting a single <code>animated</code> boolean property to determine whether the window
will be animated (default) while being closed.</p>
*/
/**
* @method open
* <p>Opens a window within the navigation group.</p>
* @param {Titanium.UI.Window} window
<p>Window to open.</p>
* @param {Dictionary} options
<p>Options supporting a single <code>animated</code> boolean property to determine whether the window
will be animated (default) while being closed.</p>
*/
/**
* @method getWindow
* <p>Gets the value of the {@link Titanium.UI.iPhone.NavigationGroup#property-window} property.</p>
* @returns {Titanium.UI.Window}
*/
/**
* @method setWindow
* <p>Sets the value of the {@link Titanium.UI.iPhone.NavigationGroup#property-window} property.</p>
* @param {Titanium.UI.Window} window
<p>New value for the property.</p>
*/
/**
* @property window
* @type Titanium.UI.Window
* @creationOnly
* <p>Window to add to this navigation group.</p>
*/
/**
* @class Titanium.UI.iPhone.ProgressBarStyle
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/ProgressBarStyle.yml
* <p>A set of constants for the bar styles used on the <code>style</code> property of {@link Titanium.UI.ProgressBar}.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.ProgressBarStyle> instead.
*/
/**
* @property BAR
* @type Number
* @readonly
* <p>The style of progress view that is used in a toolbar.</p>
*/
/**
* @property DEFAULT
* @type Number
* @readonly
* <p>he standard progress-view style. This is the default.</p>
*/
/**
* @property PLAIN
* @type Number
* @readonly
* <p>The standard progress-view style. Same as <code>DEFAULT</code>.</p>
*/
/**
* @class Titanium.UI.iPhone.RowAnimationStyle
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/RowAnimationStyle.yml
* <p>A set of constants for the Animation Styles used for transition on table view rows.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.RowAnimationStyle> instead.
*/
/**
* @property BOTTOM
* @type Number
* @readonly
* <p>The inserted row or rows slides in from the bottom; the deleted row or rows slides out
toward the bottom.</p>
*/
/**
* @property FADE
* @type Number
* @readonly
* <p>The inserted or deleted row or rows fades into or out of the table view.</p>
*/
/**
* @property LEFT
* @type Number
* @readonly
* <p>The inserted row or rows slides in from the left; the deleted row or rows slides out to the
left.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>No animation is performed. The new cell value appears as if the cell had just been reloaded.</p>
*/
/**
* @property RIGHT
* @type Number
* @readonly
* <p>The inserted row or rows slides in from the right; the deleted row or rows slides out to
the right.</p>
*/
/**
* @property TOP
* @type Number
* @readonly
* <p>The inserted row or rows slides in from the top; the deleted row or rows slides out toward
the top.</p>
*/
/**
* @class Titanium.UI.iPhone.ScrollIndicatorStyle
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/ScrollIndicatorStyle.yml
* <p>A set of constants for the styles available for scrollbars used with {@link Titanium.UI.ScrollView#property-scrollIndicatorStyle} and {@link Titanium.UI.TableView#property-scrollIndicatorStyle} properties.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.ScrollIndicatorStyle> instead.
*/
/**
* @property BLACK
* @type Number
* @readonly
* <p>A style of indicator which is black smaller than the default style. This style is good
against a white content background.</p>
*/
/**
* @property DEFAULT
* @type Number
* @readonly
* <p>The default style of scroll indicator, which is black with a white border. This style is
good against any content background.</p>
*/
/**
* @property WHITE
* @type Number
* @readonly
* <p>A style of indicator is white and smaller than the default style. This style is good against
a black content background.</p>
*/
/**
* @class Titanium.UI.iPhone.StatusBar
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/StatusBar.yml
* <p>A set of constants for the status bar style.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.StatusBar> instead.
*/
/**
* @property ANIMATION_STYLE_NONE
* @type Number
* @readonly
* <p>No animation style, when the status bar is hidden or shown.</p>
* @description <p>Used with the {@link Titanium.UI.iPhone#method-showStatusBar} and {@link Titanium.UI.iPhone#method-hideStatusBar}
methods.</p>
<p>One of the group of status bar animation style constants
{@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_NONE ANIMATION_STYLE_NONE},
{@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_SLIDE ANIMATION_STYLE_SLIDE},
and {@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_FADE ANIMATION_STYLE_FADE}.</p>
*/
/**
* @property ANIMATION_STYLE_SLIDE
* @type Number
* @readonly
* <p>Slide animation style, when the status bar is hidden or shown.</p>
* @description <p>Used with the {@link Titanium.UI.iPhone#method-showStatusBar} and {@link Titanium.UI.iPhone#method-hideStatusBar}
methods.</p>
<p>One of the group of status bar animation style constants
{@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_NONE ANIMATION_STYLE_NONE},
{@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_SLIDE ANIMATION_STYLE_SLIDE},
and {@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_FADE ANIMATION_STYLE_FADE}.</p>
*/
/**
* @property ANIMATION_STYLE_FADE
* @type Number
* @readonly
* <p>Fade animation style, when the status bar is hidden or shown.</p>
* @description <p>Used with the {@link Titanium.UI.iPhone#method-showStatusBar} and {@link Titanium.UI.iPhone#method-hideStatusBar}
methods.</p>
<p>One of the group of status bar animation style constants
{@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_NONE ANIMATION_STYLE_NONE},
{@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_SLIDE ANIMATION_STYLE_SLIDE},
and {@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_FADE ANIMATION_STYLE_FADE}.</p>
*/
/**
* @property DEFAULT
* @type Number
* @readonly
* <p>Default status bar style.</p>
* @description <p>Use with the {@link Titanium.UI.iPhone#property-statusBarStyle} and {@link Titanium.UI.Window#property-statusBarStyle} properties.</p>
<p>One of the group of status bar style constants
{@link Titanium.UI.iPhone.StatusBar#property-DEFAULT DEFAULT},
{@link Titanium.UI.iPhone.StatusBar#property-GRAY GRAY},
{@link Titanium.UI.iPhone.StatusBar#property-GREY GREY},
{@link Titanium.UI.iPhone.StatusBar#property-OPAQUE_BLACK OPAQUE_BLACK},
{@link Titanium.UI.iPhone.StatusBar#property-LIGHT_CONTENT LIGHT_CONTENT},
and {@link Titanium.UI.iPhone.StatusBar#property-TRANSLUCENT_BLACK TRANSLUCENT_BLACK}.</p>
*/
/**
* @property GRAY
* @type Number
* @readonly
* <p>Gray-colored status bar style.</p>
* @description <p>Use with the {@link Titanium.UI.iPhone#property-statusBarStyle} and {@link Titanium.UI.Window#property-statusBarStyle} properties.</p>
<p>One of the group of status bar style constants
{@link Titanium.UI.iPhone.StatusBar#property-DEFAULT DEFAULT},
{@link Titanium.UI.iPhone.StatusBar#property-GRAY GRAY},
{@link Titanium.UI.iPhone.StatusBar#property-GREY GREY},
{@link Titanium.UI.iPhone.StatusBar#property-OPAQUE_BLACK OPAQUE_BLACK},
{@link Titanium.UI.iPhone.StatusBar#property-LIGHT_CONTENT LIGHT_CONTENT},
and {@link Titanium.UI.iPhone.StatusBar#property-TRANSLUCENT_BLACK TRANSLUCENT_BLACK}.</p>
*/
/**
* @property GREY
* @type Number
* @readonly
* <p>Gray-colored status bar style.</p>
* @description <p>Alias for {@link Titanium.UI.iPhone.StatusBar#property-GRAY GRAY}.</p>
<p>Use with the {@link Titanium.UI.iPhone#property-statusBarStyle} and {@link Titanium.UI.Window#property-statusBarStyle} properties.</p>
<p>One of the group of status bar style constants
{@link Titanium.UI.iPhone.StatusBar#property-DEFAULT DEFAULT},
{@link Titanium.UI.iPhone.StatusBar#property-GRAY GRAY},
{@link Titanium.UI.iPhone.StatusBar#property-GREY GREY},
{@link Titanium.UI.iPhone.StatusBar#property-OPAQUE_BLACK OPAQUE_BLACK},
{@link Titanium.UI.iPhone.StatusBar#property-LIGHT_CONTENT LIGHT_CONTENT},
and {@link Titanium.UI.iPhone.StatusBar#property-TRANSLUCENT_BLACK TRANSLUCENT_BLACK}.</p>
*/
/**
* @property LIGHT_CONTENT
* @type Number
* @readonly
* <p>Status bar style to use with dark backgrounds. Valid on iOS 7 and above.</p>
* @description <p>Use with the {@link Titanium.UI.iPhone#property-statusBarStyle} and {@link Titanium.UI.Window#property-statusBarStyle} properties.
When used with versions lower than iOS 7, returns {@link Titanium.UI.iPhone.StatusBar#property-TRANSLUCENT_BLACK TRANSLUCENT_BLACK}.</p>
<p>One of the group of status bar style constants
{@link Titanium.UI.iPhone.StatusBar#property-DEFAULT DEFAULT},
{@link Titanium.UI.iPhone.StatusBar#property-GRAY GRAY},
{@link Titanium.UI.iPhone.StatusBar#property-GREY GREY},
{@link Titanium.UI.iPhone.StatusBar#property-OPAQUE_BLACK OPAQUE_BLACK},
{@link Titanium.UI.iPhone.StatusBar#property-LIGHT_CONTENT LIGHT_CONTENT},
and {@link Titanium.UI.iPhone.StatusBar#property-TRANSLUCENT_BLACK TRANSLUCENT_BLACK}.</p>
* @platform iphone 3.1.3
* @platform ipad 3.1.3
*/
/**
* @property OPAQUE_BLACK
* @type Number
* @readonly
* <p>Opaque black-colored status bar style.</p>
* @description <p>Use with the {@link Titanium.UI.iPhone#property-statusBarStyle} and {@link Titanium.UI.Window#property-statusBarStyle} properties.
This is deprecated on iOS 7 and above. Use {@link Titanium.UI.iPhone.StatusBar#property-LIGHT_CONTENT LIGHT_CONTENT}</p>
<p>One of the group of status bar style constants
{@link Titanium.UI.iPhone.StatusBar#property-DEFAULT DEFAULT},
{@link Titanium.UI.iPhone.StatusBar#property-GRAY GRAY},
{@link Titanium.UI.iPhone.StatusBar#property-GREY GREY},
{@link Titanium.UI.iPhone.StatusBar#property-OPAQUE_BLACK OPAQUE_BLACK},
{@link Titanium.UI.iPhone.StatusBar#property-LIGHT_CONTENT LIGHT_CONTENT},
and {@link Titanium.UI.iPhone.StatusBar#property-TRANSLUCENT_BLACK TRANSLUCENT_BLACK}.</p>
*/
/**
* @property TRANSLUCENT_BLACK
* @type Number
* @readonly
* <p>Translucent black-colored status bar style, which provides some degree of transparency to
the device background.</p>
* @description <p>Use with the {@link Titanium.UI.iPhone#property-statusBarStyle} and {@link Titanium.UI.Window#property-statusBarStyle} properties.
This is deprecated on iOS 7 and above. Use {@link Titanium.UI.iPhone.StatusBar#property-LIGHT_CONTENT LIGHT_CONTENT}.</p>
<p>One of the group of status bar style constants
{@link Titanium.UI.iPhone.StatusBar#property-DEFAULT DEFAULT},
{@link Titanium.UI.iPhone.StatusBar#property-GRAY GRAY},
{@link Titanium.UI.iPhone.StatusBar#property-GREY GREY},
{@link Titanium.UI.iPhone.StatusBar#property-OPAQUE_BLACK OPAQUE_BLACK},
{@link Titanium.UI.iPhone.StatusBar#property-LIGHT_CONTENT LIGHT_CONTENT},
and {@link Titanium.UI.iPhone.StatusBar#property-TRANSLUCENT_BLACK TRANSLUCENT_BLACK}.</p>
*/
/**
* @class Titanium.UI.iPhone.SystemButton
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/SystemButton.yml
* <p>A set of constants for creating standard iOS system buttons.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.SystemButton> instead.
* @description <p>Most of these constants are used with the
{@link Titanium.UI.Button#property-systemButton Button.systemButton} property to define a standard
iOS system buttons for use in navigation bars and toolbars. </p>
<p>See {@link Titanium.UI.Button} for more information on the <code>systemButton</code> property, including details
on where system buttons can be used. In an Alloy application you can omit the <code>Ti.UI.iPhone.SystemButton</code>
namespace when assigning a value to the <code><Button></code> element's <code>systemButton</code> attribute, for example:</p>
<pre><code><Button systemButton="CAMERA"/>
<!-- Instead of -->
<Button systemButton="Titanium.UI.iOS.SystemButton.CAMERA"/>
</code></pre>
<p>A few of these constants are used with {@link Titanium.UI.Button#property-style Button.style} to
create standard iOS buttons that can be used in other places, including table view rows.
Note: Starting at Titanium SDK 5.0, all icons have are automatically sized in the native behavior
and are not distorted any more.
These standard button types are:</p>
<ul>
<li>{@link Titanium.UI.iPhone.SystemButton#property-CONTACT_ADD CONTACT_ADD}</li>
<li>{@link Titanium.UI.iPhone.SystemButton#property-DISCLOSURE DISCLOSURE}</li>
<li>{@link Titanium.UI.iPhone.SystemButton#property-INFO_DARK INFO_DARK}</li>
<li>{@link Titanium.UI.iPhone.SystemButton#property-INFO_LIGHT INFO_LIGHT}</li>
</ul>
<p>See Apple's
<a href="https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html">iOS Human Interface Guidelines</a>
in the iOS Developer Library for details on the proper usage of iOS standard buttons
and icons.</p>
*/
/**
* @property ACTION
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify an <strong>Action</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property ACTIVITY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to create an activity indicator that
can be used in navigation bars and toolbars. </p>
* @description <p>When visible, the activity indicator is already started.</p>
*/
/**
* @property ADD
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify an <strong>Add</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property BOOKMARKS
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Bookmarks</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property CAMERA
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Camera</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property CANCEL
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Cancel</strong> button.</p>
* @description <p>This button is displayed as a bordered button with localized text.</p>
<p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property COMPOSE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Compose</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property CONTACT_ADD
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-style Button.style} to specify a <strong>ContactAdd</strong> button.</p>
* @description <p>The resulting button is not restricted to use in navigation bars and toolbars. </p>
*/
/**
* @property DISCLOSURE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-style Button.style} to specify a <strong>Disclosure</strong> button.</p>
* @description <p>The resulting button is not restricted to use in navigation bars and toolbars.</p>
*/
/**
* @property DONE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Done</strong> button.</p>
* @description <p>This button is displayed as a bordered button with localized text.</p>
<p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property EDIT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify an <strong>Edit</strong> button.</p>
* @description <p>This button is displayed as a bordered button with localized text.</p>
<p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property FAST_FORWARD
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Fast Forward</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property FIXED_SPACE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to create a fixed-width blank space
for spacing items in toolbars.</p>
* @description <p>Only the <code>width</code> property is used when this value is set.</p>
*/
/**
* @property FLEXIBLE_SPACE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to create a flexible blank space
for spacing items in toolbars.</p>
* @description <p>The space is distributed equally between the other
items. Other item properties are ignored when this value is set.</p>
*/
/**
* @property INFO_DARK
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-style Button.style} to specify a dark-colored <strong>Info</strong> button.</p>
* @description <p>The resulting button is not restricted to use in navigation bars and toolbars. </p>
*/
/**
* @property INFO_LIGHT
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-style Button.style} to specify a light-colored <strong>Info</strong> button.</p>
* @description <p>The resulting button is not restricted to use in navigation bars and toolbars. </p>
*/
/**
* @property ORGANIZE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify an <strong>Organize</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property PAUSE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Pause</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property PLAY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Play</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property REFRESH
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Refresh</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property REPLY
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Reply</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property REWIND
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Rewind</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property SAVE
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Save</strong> button.</p>
* @description <p>This button is displayed as a bordered button with localized text.</p>
<p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property SPINNER
* @type Number
* @readonly
* <p>Identical to {@link Titanium.UI.iPhone.SystemButton#property-ACTIVITY ACTIVITY}.</p>
*/
/**
* @property STOP
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Stop</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @property TRASH
* @type Number
* @readonly
* <p>Use with {@link Titanium.UI.Button#property-systemButton Button.systemButton} to specify a <strong>Trash</strong> button.</p>
* @description <p>The resulting button can only be used in navigation bars and toolbars.</p>
*/
/**
* @class Titanium.UI.iPhone.SystemButtonStyle
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/SystemButtonStyle.yml
* <p>A set of constants for the system button styles that can be used for the button <code>style</code> property.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.SystemButtonStyle> instead.
* @description <p>These constants represent standard iOS system button styles that affect the
{@link Titanium.UI.Button Button}, {@link Titanium.UI.ButtonBar ButtonBar}, and
{@link Titanium.UI.iOS.TabbedBar TabbedBar} UI elements.</p>
<p>The different styles are used in different places. For normal buttons which are <strong>not</strong>
contained in a nav bar, toolbar, button bar or tabbed bar, the following styles apply:</p>
<ul>
<li><code>BORDERED</code>. Simple button style with a rounded border and a white background.
The default style for normal buttons.</li>
<li><code>DONE</code>. Like the bordered button, but with a blue background. Button style for a button
that indicates completion, such as OK, Save, or Go. </li>
<li><code>PLAIN</code> Button style for an undecorated button. </li>
</ul>
<p>Note that if you specify the <code>PLAIN</code> style, you must style the button using the other button
properties. For example, there is no indication that the button has been pressed unless you set
other properties for the selected state, such as <code>backgroundSelectedImage</code> and <code>selectedColor</code>.</p>
<p>When you add a button to a {@link Titanium.UI.iOS.Toolbar Toolbar}, the styles have a slightly
different effect:</p>
<ul>
<li><code>PLAIN</code> Button style for an undecorated button with large text and a <em>glow</em> effect when the
button is pressed. Default style for buttons in toolbars.</li>
<li><code>BORDERED</code>. Simple button style with a rounded border and a light blue background. </li>
<li><code>DONE</code>. Like the bordered button, but with a dark blue background. </li>
</ul>
<p>For <code>TabbedBar</code> and <code>ButtonBar</code> controls, styles have the following meaning:</p>
<ul>
<li><code>PLAIN</code>. Default style for <code>ButtonBar</code> and <code>TabbedBar</code>.</li>
<li><code>BORDERED</code>. Creates a bar like the <code>PLAIN</code> bar, but with a heavier border.</li>
<li><code>BAR</code>. Used on <code>ButtonBar</code> and <code>TabbedBar</code> controls to produce a more compact bar with
translucent buttons that allow the bar's background color to show through.</li>
</ul>
*/
/**
* @property BAR
* @type Number
* @readonly
* <p>Used with {@link Titanium.UI.ButtonBar ButtonBar} or {@link Titanium.UI.iOS.TabbedBar TabbedBar} only,
to use the more condensed style used in nav bars and tool bars.</p>
* @removed 3.6.0
* @description <p>To use a background color or gradient on a <code>ButtonBar</code> or <code>TabbedBar</code> control, you must use
the <code>BAR</code> style. This style creates translucent buttons that allow the bar's background
color to show through.</p>
*/
/**
* @property BORDERED
* @type Number
* @readonly
* <p>A simple button style with a border.</p>
*/
/**
* @property DONE
* @type Number
* @readonly
* <p>The style for a <strong>Done</strong> button--for example, a button that completes some task and returns
to the previous view.</p>
* @description <p>Used in toolbars and navigation bars.</p>
*/
/**
* @property PLAIN
* @type Number
* @readonly
* <p>Specifies a borderless button, the default style for toolbars, button bars, and tabbed bars.</p>
* @description <p>In toolbars, this specifies an undecorated button with large text. A glow effect is used when
tapped.</p>
<p>In button bars and tabbed bars, specifies a button with large text that is highlighted when
tapped.</p>
<p>When used on a normal button (that is, outside of a navigation bar, toolbar, button bar or
tabbed bar), <code>PLAIN</code> specifies a button with no built-in decoration except its title text.
This is the style you should choose if you want to supply your own background images,
background gradient, and so on.</p>
<p>Note that for tabbed bar or button bars, the {@link Titanium.UI.iPhone.SystemButtonStyle#property-BAR BAR}
style is used to allow the bar's background color or gradient to show through.</p>
*/
/**
* @class Titanium.UI.iPhone.SystemIcon
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/SystemIcon.yml
* <p>A set of constants for the system icon styles that can be used on a tab group tab.</p>
*/
/**
* @property BOOKMARKS
* @type Number
* @readonly
* <p>Bookmark style icon</p>
*/
/**
* @property CONTACTS
* @type Number
* @readonly
* <p>Contacts style icon</p>
*/
/**
* @property DOWNLOADS
* @type Number
* @readonly
* <p>Downloads style icon</p>
*/
/**
* @property FAVORITES
* @type Number
* @readonly
* <p>Favorites style icon</p>
*/
/**
* @property FEATURED
* @type Number
* @readonly
* <p>Featured style icon</p>
*/
/**
* @property HISTORY
* @type Number
* @readonly
* <p>History style icon</p>
*/
/**
* @property MORE
* @type Number
* @readonly
* <p>More style icon</p>
*/
/**
* @property MOST_RECENT
* @type Number
* @readonly
* <p>Most recent style icon</p>
*/
/**
* @property MOST_VIEWED
* @type Number
* @readonly
* <p>Most viewed style icon</p>
*/
/**
* @property RECENTS
* @type Number
* @readonly
* <p>Recents style icon</p>
*/
/**
* @property SEARCH
* @type Number
* @readonly
* <p>Search style icon</p>
*/
/**
* @property TOP_RATED
* @type Number
* @readonly
* <p>Top rated style icon</p>
*/
/**
* @class Titanium.UI.iPhone.TableViewCellSelectionStyle
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/TableViewCellSelectionStyle.yml
* <p>A set of constants for the style that can be used for the <code>selectionStyle</code> property of
{@link Titanium.UI.TableViewRow}.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.TableViewCellSelectionStyle> instead.
*/
/**
* @property BLUE
* @type Number
* @readonly
* <p>The cell when selected has a blue background. This is the default value.</p>
*/
/**
* @property GRAY
* @type Number
* @readonly
* <p>Then cell when selected has a gray background.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>The cell has no distinct style for when it is selected.</p>
*/
/**
* @class Titanium.UI.iPhone.TableViewScrollPosition
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/TableViewScrollPosition.yml
* <p>A set of constants for the position value that can be used for the <code>position</code> property of
{@link Titanium.UI.TableView} when invoking <code>scrollToIndex</code>.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.TableViewScrollPosition> instead.
*/
/**
* @property BOTTOM
* @type Number
* @readonly
* <p>The table view scrolls the row of interest to the bottom of the visible table view.</p>
*/
/**
* @property MIDDLE
* @type Number
* @readonly
* <p>The table view scrolls the row of interest to the middle of the visible table view.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>The table view scrolls the row of interest to be fully visible with a minimum of movement. If the row is already fully visible, no scrolling occurs. For example, if the row is above the visible area, the behavior is identical to that specified by <code>TOP</code>. This is the default.</p>
*/
/**
* @property TOP
* @type Number
* @readonly
* <p>The table view scrolls the row of interest to the top of the visible table view.</p>
*/
/**
* @class Titanium.UI.iPhone.TableViewSeparatorStyle
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/TableViewSeparatorStyle.yml
* <p>A set of constants for the style that can be used for the <code>separatorStyle</code> property of
{@link Titanium.UI.TableView}.</p>
*/
/**
* @property NONE
* @type Number
* @readonly
* <p>The separator cell has no distinct style.</p>
*/
/**
* @property SINGLE_LINE
* @type Number
* @readonly
* <p>The separator cell has a single line running across its width. This is the default value.</p>
*/
/**
* @class Titanium.UI.iPhone.TableViewStyle
* @platform iphone 0.9
* @platform ipad 0.9
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/TableViewStyle.yml
* <p>A set of constants for the style that can be used for the button <code>style</code> property of
{@link Titanium.UI.TableView}.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.TableViewStyle> instead.
*/
/**
* @property GROUPED
* @type Number
* @readonly
* <p>A table view whose sections present distinct groups of rows. The section headers and footers
do not float.</p>
*/
/**
* @property PLAIN
* @type Number
* @readonly
* <p>A plain table view. Any section headers or footers are displayed as inline separators and
float when the table view is scrolled.</p>
*/
/**
* @class Titanium.UI.iPhone
* @platform iphone 0.8
* @platform ipad 0.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/iPhone.yml
* <p>The iPhone/iPad-specific UI capabilities. All properties, methods and events in this namespace
will only work on Apple iOS systems.</p>
* @deprecated 5.4.0 Use the constants on the <Titanium.UI.iOS> namespace instead.
*/
/**
* @method hideStatusBar
* <p>Hides the status bar.</p>
* @removed 3.2.0 This method does not work on iOS 7 and is deprecated on earlier versions. Use the <Titanium.UI.Window.fullscreen>
property of the window to control if the staus bar is shown or not.
* @param {hideStatusBarParams} params (optional)
<p>Determines whether action is animated.</p>
*/
/**
* @method showStatusBar
* <p>Shows the status bar.</p>
* @removed 3.2.0 This method does not work on iOS 7 and is deprecated on earlier versions. Use the <Titanium.UI.Window.fullscreen>
property of the window to control if the staus bar is shown or not.
* @param {showStatusBarParams} params (optional)
<p>Determines whether action is animated.</p>
*/
/**
* @method createNavigationGroup
* <p>Creates and returns an instance of {@link Titanium.UI.iPhone.NavigationGroup}.</p>
* @removed 3.2.0 Use <Titanium.UI.iOS.NavigationWindow> instead.
* @param {Dictionary<Titanium.UI.iPhone.NavigationGroup>} parameters (optional)
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.iPhone.NavigationGroup} except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.iPhone.NavigationGroup}
* @platform iphone 1.2
* @platform ipad 1.2
*/
/**
* @method getAppBadge
* <p>Gets the value of the {@link Titanium.UI.iPhone#property-appBadge} property.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.appBadge> instead.
* @returns {Number}
*/
/**
* @method setAppBadge
* <p>Sets the value of the {@link Titanium.UI.iPhone#property-appBadge} property.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.appBadge> instead.
* @param {Number} appBadge
<p>New value for the property.</p>
*/
/**
* @method getAppSupportsShakeToEdit
* <p>Gets the value of the {@link Titanium.UI.iPhone#property-appSupportsShakeToEdit} property.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.appSupportsShakeToEdit> instead.
* @returns {Boolean}
*/
/**
* @method setAppSupportsShakeToEdit
* <p>Sets the value of the {@link Titanium.UI.iPhone#property-appSupportsShakeToEdit} property.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.appSupportsShakeToEdit> instead.
* @param {Boolean} appSupportsShakeToEdit
<p>New value for the property.</p>
*/
/**
* @method getStatusBarHidden
* <p>Gets the value of the {@link Titanium.UI.iPhone#property-statusBarHidden} property.</p>
* @removed 6.0.0 Use <Titanium.UI.Window.fullscreen> instead.
* @returns {Boolean}
*/
/**
* @method getStatusBarStyle
* <p>Gets the value of the {@link Titanium.UI.iPhone#property-statusBarStyle} property.</p>
* @removed 6.0.0 Use <Titanium.UI.Window.statusBarStyle> instead.
* @returns {Number}
*/
/**
* @property MODAL_PRESENTATION_CURRENT_CONTEXT
* @type Number
* @readonly
* <p>View presented with the same style as its parent window.</p>
* <p> <b>Requires:</b>
iOS 3.2 and later
</p>
* @description <p>Used with the {@link Titanium.UI.Window#method-open} and {@link Titanium.UI.Window#method-close} methods.</p>
<p>One of the group of modal window presentation style constants
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_CURRENT_CONTEXT MODAL_PRESENTATION_CURRENT_CONTEXT},
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FORMSHEET MODAL_PRESENTATION_FORMSHEET},
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FULLSCREEN MODAL_PRESENTATION_FULLSCREEN},
and {@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_PAGESHEET MODAL_PRESENTATION_PAGESHEET}.</p>
*/
/**
* @property MODAL_PRESENTATION_FORMSHEET
* @type Number
* @readonly
* <p>Window width and height are smaller than those of the screen and the view is centered on
the screen.</p>
* <p> <b>Requires:</b>
iOS 3.2 and later
</p>
* @description <p>If the system is in a landscape orientation and the keyboard is visible, the position of the
view is adjusted upward so that the view remains visible. All uncovered areas are dimmed
and do not respond to touch to prevent the user from interacting with them.</p>
<p>Used with the {@link Titanium.UI.Window#method-open} and {@link Titanium.UI.Window#method-close} methods.</p>
<p>One of the group of modal window presentation style constants
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_CURRENT_CONTEXT MODAL_PRESENTATION_CURRENT_CONTEXT},
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FORMSHEET MODAL_PRESENTATION_FORMSHEET},
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FULLSCREEN MODAL_PRESENTATION_FULLSCREEN},
and {@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_PAGESHEET MODAL_PRESENTATION_PAGESHEET}.</p>
*/
/**
* @property MODAL_PRESENTATION_FULLSCREEN
* @type Number
* @readonly
* <p>Window covers the screen.</p>
* <p> <b>Requires:</b>
iOS 3.2 and later
</p>
* @description <p>Used with the {@link Titanium.UI.Window#method-open} and {@link Titanium.UI.Window#method-close} methods.</p>
<p>One of the group of modal window presentation style constants
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_CURRENT_CONTEXT MODAL_PRESENTATION_CURRENT_CONTEXT},
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FORMSHEET MODAL_PRESENTATION_FORMSHEET},
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FULLSCREEN MODAL_PRESENTATION_FULLSCREEN},
and {@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_PAGESHEET MODAL_PRESENTATION_PAGESHEET}.</p>
*/
/**
* @property MODAL_PRESENTATION_PAGESHEET
* @type Number
* @readonly
* <p>Window height is the height of the screen and width is equal to screen width in a portrait
orientation.</p>
* <p> <b>Requires:</b>
iOS 3.2 and later
</p>
* @description <p>Any uncovered areas are dimmed and do not respond to touch, to prevent the user from
interacting with them. In portrait orientations, this option is essentially the same as
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FULLSCREEN}.</p>
<p>Used with the {@link Titanium.UI.Window#method-open} and {@link Titanium.UI.Window#method-close} methods.</p>
<p>One of the group of modal window presentation style constants
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_CURRENT_CONTEXT MODAL_PRESENTATION_CURRENT_CONTEXT},
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FORMSHEET MODAL_PRESENTATION_FORMSHEET},
{@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FULLSCREEN MODAL_PRESENTATION_FULLSCREEN},
and {@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_PAGESHEET MODAL_PRESENTATION_PAGESHEET}.</p>
*/
/**
* @property MODAL_TRANSITION_STYLE_COVER_VERTICAL
* @type Number
* @readonly
* <p>When the window is presented, its view slides up from the bottom of the screen. On dismissal,
the view slides back down (default.)</p>
* <p> <b>Requires:</b>
iOS 3.2 and later
</p>
* @description <p>Used with the {@link Titanium.UI.Window#method-open} and {@link Titanium.UI.Window#method-close} methods.</p>
<p>One of the group of modal window transition style constants
{@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_COVER_VERTICAL MODAL_TRANSITION_STYLE_COVER_VERTICAL},
{@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_CROSS_DISSOLVE MODAL_TRANSITION_STYLE_CROSS_DISSOLVE},
{@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL},
and {@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_PARTIAL_CURL MODAL_TRANSITION_STYLE_PARTIAL_CURL}.</p>
*/
/**
* @property MODAL_TRANSITION_STYLE_CROSS_DISSOLVE
* @type Number
* @readonly
* <p>When the window is presented, the current view fades out while the new view fades in at the
same time. On dismissal, a similar type of cross-fade is used to return to the original view.</p>
* <p> <b>Requires:</b>
iOS 3.2 and later
</p>
* @description <p>Used with the {@link Titanium.UI.Window#method-open} and {@link Titanium.UI.Window#method-close} methods.</p>
<p>One of the group of modal window transition style constants
{@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_COVER_VERTICAL MODAL_TRANSITION_STYLE_COVER_VERTICAL},
{@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_CROSS_DISSOLVE MODAL_TRANSITION_STYLE_CROSS_DISSOLVE},
{@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL},
and {@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_PARTIAL_CURL MODAL_TRANSITION_STYLE_PARTIAL_CURL}.</p>
*/
/**
* @property MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL
* @type Number
* @readonly
* <p>When the window is presented, the current view initiates a horizontal 3D flip from
right-to-left, resulting in the revealing of the new view as if it were on the back of the
previous view. On dismissal, the flip occurs from left-to-right, returning to the original
view.</p>
* <p> <b>Requires:</b>
iOS 3.2 and later
</p>
* @description <p>Used with the {@link Titanium.UI.Window#method-open} and {@link Titanium.UI.Window#method-close} methods.</p>
<p>One of the group of modal window transition style constants
{@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_COVER_VERTICAL MODAL_TRANSITION_STYLE_COVER_VERTICAL},
{@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_CROSS_DISSOLVE MODAL_TRANSITION_STYLE_CROSS_DISSOLVE},
{@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL},
and {@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_PARTIAL_CURL MODAL_TRANSITION_STYLE_PARTIAL_CURL}.</p>
*/
/**
* @property MODAL_TRANSITION_STYLE_PARTIAL_CURL
* @type Number
* @readonly
* <p>When the window is presented, one corner of the current view curls up to reveal the modal
view underneath. On dismissal, the curled up page unfurls itself back on top of the modal
view.</p>
* <p> <b>Requires:</b>
iOS 3.2 and later
</p>
* @description <p>A modal view presented using this transition is itself prevented from presenting any
additional modal views. This transition style is supported only if the window is presenting
a {@link Titanium.UI.iPhone#property-MODAL_PRESENTATION_FULLSCREEN} modal presentation style.</p>
<p>Used with the {@link Titanium.UI.Window#method-open} and {@link Titanium.UI.Window#method-close} methods.</p>
<p>One of the group of modal window transition style constants
{@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_COVER_VERTICAL MODAL_TRANSITION_STYLE_COVER_VERTICAL},
{@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_CROSS_DISSOLVE MODAL_TRANSITION_STYLE_CROSS_DISSOLVE},
{@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL},
and {@link Titanium.UI.iPhone#property-MODAL_TRANSITION_STYLE_PARTIAL_CURL MODAL_TRANSITION_STYLE_PARTIAL_CURL}.</p>
*/
/**
* @property appBadge
* @type Number
* <p>Value of the badge for the application's springboard icon.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.appBadge> instead.
*/
/**
* @property appSupportsShakeToEdit
* @type Boolean
* <p>Determines whether the shake to edit system-wide capability is enabled.</p>
* @deprecated 5.4.0 Use <Titanium.UI.iOS.appSupportsShakeToEdit> instead.
*/
/**
* @property statusBarHidden
* @type Boolean
* @readonly
* <p>Determines whether the status bar is hidden.</p>
* @removed 6.0.0 Use <Titanium.UI.Window.fullscreen> instead.
* @description <p>The setter for this property does not work on iOS 7 and is deprecated for earlier iOS versions since <strong>Release 3.1.3</strong>.
Use the {@link Titanium.UI.Window#property-fullscreen fullscreen} property of the window to control if the staus bar is shown or not.</p>
*/
/**
* @property statusBarStyle
* @type Number
* @readonly
* <p>Determines the status bar color style.</p>
* @removed 6.0.0 Use <Titanium.UI.Window.statusBarStyle> instead.
* @description <p>The setter for this property does not work on iOS 7 and is deprecated for earlier iOS versions since <strong>Release 3.1.3</strong>.
Use the {@link Titanium.UI.Window#property-statusBarStyle statusBarStyle} property of the window to control the status bar style.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.iPhone.StatusBar#property-DEFAULT}
<li> {@link Titanium.UI.iPhone.StatusBar#property-GRAY}
<li> {@link Titanium.UI.iPhone.StatusBar#property-GREY}
<li> {@link Titanium.UI.iPhone.StatusBar#property-LIGHT_CONTENT}
<li> {@link Titanium.UI.iPhone.StatusBar#property-OPAQUE_BLACK}
<li> {@link Titanium.UI.iPhone.StatusBar#property-TRANSLUCENT_BLACK}
</ul></p>
*/
/**
* @class hideStatusBarParams
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/iPhone.yml
* <p>Dictionary of options for the {@link Titanium.UI.iPhone#method-hideStatusBar} method.</p>
*/
/**
* @property animated
* @type Boolean
* <p>Determines whether to animate the dialog as it is hidden.</p>
*/
/**
* @property animationStyle
* @type Number
* <p>Style of the animation.</p>
* @description <p>One of the status bar animation style constants
{@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_NONE},
{@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_SLIDE},
or {@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_FADE}.</p>
*/
/**
* @class showStatusBarParams
* @platform iphone 2.0.0
* @platform ipad 2.0.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/iPhone/iPhone.yml
* <p>Dictionary of options for the {@link Titanium.UI.iPhone#method-showStatusBar} method.</p>
*/
/**
* @property animated
* @type Boolean
* <p>Determines whether to animate the dialog as it is shown.</p>
*/
/**
* @property animationStyle
* @type Number
* <p>Style of the animation.</p>
* @description <p>One of the status bar animation style constants
[{@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_NONE},
{@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_SLIDE},
or {@link Titanium.UI.iPhone.StatusBar#property-ANIMATION_STYLE_FADE}.</p>
*/
/**
* @class Titanium.Utils
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Utils/Utils.yml
* <p>The top-level Utils module, containing a set of JavaScript methods that are often useful when
building applications.</p>
*/
/**
* @method base64decode
* <p>Returns the specified data decoded from Base64.</p>
* @description <p>On Mobile Web, if <code>obj</code> is a [Titanium.Blob] containing binary data, then <code>obj</code> is
returned unmodified because the binary blob would be decoded only to be re-encoded
in the returned blob object.</p>
* @param {String/Titanium.Blob} obj
<p>Data to decode.</p>
* @returns {Titanium.Blob}
*/
/**
* @method base64encode
* <p>Returns the specified data encoded to Base64.</p>
* @description <p>On Mobile Web, if <code>obj</code> is a [Titanium.Blob] containing binary data, then <code>obj</code> is
returned unmodified because the binary blob is already base64 encoded.</p>
<p>Starting from Titanium 3.3.0, <code>obj</code> can be a {@link Titanium.Filesystem.File File} object
on Android.</p>
* @param {String/Titanium.Blob/Titanium.Filesystem.File} obj
<p>Data to encode.</p>
* @returns {Titanium.Blob}
*/
/**
* @method md5HexDigest
* <p>Returns a MD5 digest of the specified data as a hex-based String.</p>
* @param {String/Titanium.Blob} obj
<p>Data to calculate.</p>
* @returns {String}
*/
/**
* @method sha1
* <p>Returns a SHA-1 hash of the specified data as a hex-based String.</p>
* @param {String/Titanium.Blob} obj
<p>Data to calculate.</p>
* @returns {String}
* @platform android 1.3.2
* @platform iphone 1.3.2
* @platform ipad 1.3.2
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method sha256
* <p>Returns a SHA-256 hash of the specified data as a hex-based String.</p>
* @param {String/Titanium.Blob} obj
<p>Data to calculate.</p>
* @returns {String}
* @platform android 1.8.0
* @platform iphone 1.8.0
* @platform ipad 1.8.0
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.WatchSession
* @platform iphone 5.0.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/WatchSession/WatchSession.yml
* <p>Used to enable data and file transfers between a watchOS and iOS application.</p>
* @description <p>WatchSession enables data and file transfers between a WatchKit application and a Titanium application
using the iOS Watch Connectivity framework introduced in iOS 9 and watchOS 2.</p>
*/
/**
* @event receivemessage
* <p>App received message from apple watch in foreground. Will be called on startup if the
incoming message caused the receiver to launch.</p>
* @param {Dictionary} (iphone) message
<p>The message content</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event receiveapplicationcontext
* <p>App received app context from apple watch. Will be called on startup if an applicationContext is available.</p>
* @param {Dictionary} (iphone) applicationContext
<p>The application Context</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event receiveuserinfo
* <p>App received user info from apple watch in background. Will be called on startup if the user info finished
transferring when the receiver was not running.</p>
* @param {Dictionary} (iphone) userInfo
<p>The user info content</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event receivefile
* <p>App received file from apple watch in background.</p>
* @param {Titanium.Blob} (iphone) data
<p>The downloaded data as a Titanium.Blob object.</p>
* @param {Dictionary} (iphone) metaData
<p>Information about the file.</p>
* @param {Boolean} (iphone) success
<p>If the transfer was successful.</p>
* @param {Number} (iphone) errorCode
<p>Error code if transfer failed.</p>
* @param {String} (iphone) message
<p>Error message if any.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event watchstatechanged
* <p>The watch state has changed.</p>
* @param {Boolean} (iphone) isPaired
<p>If the device is paired with the apple watch.</p>
* @param {Boolean} (iphone) isReachable
<p>If apple watch is currently reachable.</p>
* @param {Boolean} (iphone) isWatchAppInstalled
<p>If the watch app is installed in the apple watch.</p>
* @param {Boolean} (iphone) isComplicationEnabled
<p>If the complication is enabled in the apple watch.</p>
* @param {Boolean} (iphone) isActivated
<p>If the apple watch is currently activated. Only available on iOS 9.3
and later. See <Ti.WatchSession.isActivated> for more infos.</p>
* @param {Number} (iphone) activationState
<p>Returns the current activation state of the watch. Only available on iOS 9.3
and later. See <Ti.WatchSession.activationState> for more infos.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_NOT_ACTIVATED}
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_INACTIVE}
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_ACTIVATED}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event reachabilitychanged
* <p>The watch reachability state has changed.</p>
* @param {Boolean} (iphone) isPaired
<p>If the device is paired with the apple watch.</p>
* @param {Boolean} (iphone) isReachable
<p>If apple watch is currently reachable.</p>
* @param {Boolean} (iphone) isWatchAppInstalled
<p>If the watch app is installed in the apple watch.</p>
* @param {Boolean} (iphone) isComplicationEnabled
<p>If the complication is enabled in the apple watch.</p>
* @param {Boolean} (iphone) isActivated
<p>If the apple watch is currently activated. Only available on iOS 9.3
and later. See <Ti.WatchSession.isActivated> for more infos.</p>
* @param {Number} (iphone) activationState
<p>Returns the current activation state of the watch. Only available on iOS 9.3
and later. See <Ti.WatchSession.activationState> for more infos.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_NOT_ACTIVATED}
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_INACTIVE}
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_ACTIVATED}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event finishuserinfotransfer
* <p>Fired when the application completed user info transfer to the watch app.</p>
* @param {Dictionary} (iphone) userInfo
<p>The downloaded data as a Titanium.Blob object.</p>
* @param {Boolean} (iphone) success
<p>If the transfer was successful.</p>
* @param {Number} (iphone) errorCode
<p>Error code if transfer failed.</p>
* @param {String} (iphone) message
<p>Error message if any.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event finishfiletransfer
* <p>App completed file transfer to watch app.</p>
* @param {String} (iphone) fileURL
<p>URL of the file transferred.</p>
* @param {Dictionary} (iphone) metaData
<p>meta data of the file transferred.</p>
* @param {Boolean} (iphone) success
<p>If the transfer was successful.</p>
* @param {Number} (iphone) errorCode
<p>Error code if transfer failed.</p>
* @param {String} (iphone) message
<p>Error message if any.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @event inactive
* <p>Called when the session can no longer be used to modify or add any new transfers and,
all interactive messages will be cancelled, but events for background transfers can still fire.
This will happen when the selected watch is being changed. </p>
* <p> <b>Requires:</b>
iOS 9.3 and later
</p>
* @param {Boolean} (iphone) isPaired
<p>If the device is paired with the apple watch.</p>
* @param {Boolean} (iphone) isReachable
<p>If apple watch is currently reachable.</p>
* @param {Boolean} (iphone) isWatchAppInstalled
<p>If the watch app is installed in the apple watch.</p>
* @param {Boolean} (iphone) isComplicationEnabled
<p>If the complication is enabled in the apple watch.</p>
* @param {Boolean} (iphone) isActivated
<p>If the apple watch is currently activated. Only available on iOS 9.3
and later. See <Ti.WatchSession.isActivated> for more infos.</p>
* @param {Number} (iphone) activationState
<p>Returns the current activation state of the watch. Only available on iOS 9.3
and later. See <Ti.WatchSession.activationState> for more infos.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_NOT_ACTIVATED}
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_INACTIVE}
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_ACTIVATED}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 5.4.0
*/
/**
* @event deactivate
* <p>Called when all events for the previously selected watch has occurred.
The session can be re-activated for the now selected watch using activateSession.</p>
* <p> <b>Requires:</b>
iOS 9.3 and later
</p>
* @param {Boolean} (iphone) isPaired
<p>If the device is paired with the apple watch.</p>
* @param {Boolean} (iphone) isReachable
<p>If apple watch is currently reachable.</p>
* @param {Boolean} (iphone) isWatchAppInstalled
<p>If the watch app is installed in the apple watch.</p>
* @param {Boolean} (iphone) isComplicationEnabled
<p>If the complication is enabled in the apple watch.</p>
* @param {Boolean} (iphone) isActivated
<p>If the apple watch is currently activated. Only available on iOS 9.3
and later. See <Ti.WatchSession.isActivated> for more infos.</p>
* @param {Boolean} (iphone) hasContentPending
<p>If the apple watch has currently content pending. Only available on iOS 10.0
and later. See <Ti.WatchSession.hasContentPending> for more infos.</p>
* @param {Boolean} (iphone) remainingComplicationUserInfoTransfers
<p>If the apple watch has complication userInfo transfers left. Only available on iOS 10.0
and later. See <Ti.WatchSession.remainingComplicationUserInfoTransfers> for more infos.</p>
* @param {Number} (iphone) activationState
<p>Returns the current activation state of the watch. Only available on iOS 9.3
and later. See <Ti.WatchSession.activationState> for more infos.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_NOT_ACTIVATED}
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_INACTIVE}
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_ACTIVATED}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 5.4.0
*/
/**
* @event activationCompleted
* <p>Called when the session has completed activation. If session state is
{@link Titanium.WatchSession#property-ACTIVATION_STATE_NOT_ACTIVATED} there will be an error
with more details. </p>
* <p> <b>Requires:</b>
iOS 9.3 and later
</p>
* @param {Boolean} (iphone) isPaired
<p>If the device is paired with the apple watch.</p>
* @param {Boolean} (iphone) isReachable
<p>If apple watch is currently reachable.</p>
* @param {Boolean} (iphone) isWatchAppInstalled
<p>If the watch app is installed in the apple watch.</p>
* @param {Boolean} (iphone) isComplicationEnabled
<p>If the complication is enabled in the apple watch.</p>
* @param {Boolean} (iphone) isActivated
<p>If the apple watch is currently activated. Only available on iOS 9.3
and later. See <Ti.WatchSession.isActivated> for more infos.</p>
* @param {Number} (iphone) activationState
<p>Returns the current activation state of the watch. Only available on iOS 9.3
and later. See <Ti.WatchSession.activationState> for more infos.</p>
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_NOT_ACTIVATED}
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_INACTIVE}
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_ACTIVATED}
</ul></p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
* @platform iphone 5.4.0
*/
/**
* @method activateSession
* <p>Activates the watch session</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Activates the watch session to make the app ready to receive messages from the watch app.</p>
*/
/**
* @method sendMessage
* <p>Sends a message to the apple watch.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Sends a message to the installed watchapp on the apple watch in the foreground. </p>
* @param {Dictionary} message
<p>Message to send to apple watch. This property is required and the key of the dictionary
needs to be a String.</p>
* @param {Callback<MessageReply>} reply (optional)
<p>Function to be called upon receiving a reply from the watch app.</p>
<p><strong>Since Release 5.1.0</strong></p>
<p>This function is used to process the direct reply from the watch app after sending one.</p>
*/
/**
* @method updateApplicationContext
* <p>Sends an app context update to the apple watch.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Sends an app context update to the apple watch. If watchapp is in background during transfer,
watchapp will fire the {@link Titanium.WatchSession#event-receiveapplicationcontext} event immediately when
it becomes active. Only one app context is stored at any one time. Subsequent updates will simply
replace the earlier one sent.</p>
* @param {Dictionary} params
<p>App context to be updated in apple watch.</p>
*/
/**
* @method transferUserInfo
* <p>Transfers an user info to the apple watch.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Transfers an user info object to the installed watchapp on the apple watch in the background.
Subsequent transfers are queued. </p>
* @param {Dictionary} params
<p>userInfo to be transferred to apple watch.</p>
*/
/**
* @method transferFile
* <p>Transfers a file to the apple watch.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Transfers a file to the installed watchapp on the apple watch in the background. Subsequent
transfers are queued. </p>
* @param {Dictionary} params
<p>Pass an object with the following key-value pairs:</p>
<ul>
<li><code>fileURL</code> (String) (required): Local filesystem path of file to send to the watch app.</li>
<li><code>metaData</code> (Dictionary) (optional): Additional information about the file to send to the watch app.</li>
</ul>
*/
/**
* @method transferCurrentComplication
* <p>Transfers complication data to the watch application.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Transfers complication data to the installed watch app. This is only for
watch apps with complications enabled.</p>
* @param {Dictionary} params
<p>Complication to be transferred to watch app.</p>
*/
/**
* @method cancelAllUserInfoTransfers
* <p>Cancels all incomplete user info and complication transfers to the apple watch.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Cancels all incomplete user info and complication transfers to the apple watch.</p>
*/
/**
* @method cancelAllFileTransfers
* <p>Cancels all incomplete file transfers to the apple watch.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Cancels all incomplete file transfers to the apple watch.</p>
*/
/**
* @method cancelAllTransfers
* <p>Cancels all incomplete transfers to the apple watch.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* @description <p>Cancels all incomplete transfers to the apple watch, including user info, complication and file.</p>
*/
/**
* @method getActivationState
* <p>Gets the value of the {@link Titanium.WatchSession#property-activationState} property.</p>
* @returns {Number}
* @platform iphone 5.4.0
*/
/**
* @method getHasContentPending
* <p>Gets the value of the {@link Titanium.WatchSession#property-hasContentPending} property.</p>
* @returns {Boolean}
* @platform iphone 6.0.0
*/
/**
* @method getRemainingComplicationUserInfoTransfers
* <p>Gets the value of the {@link Titanium.WatchSession#property-remainingComplicationUserInfoTransfers} property.</p>
* @returns {Number}
* @platform iphone 6.0.0
*/
/**
* @method getIsSupported
* <p>Gets the value of the {@link Titanium.WatchSession#property-isSupported} property.</p>
* @returns {Boolean}
*/
/**
* @method getIsPaired
* <p>Gets the value of the {@link Titanium.WatchSession#property-isPaired} property.</p>
* @returns {Boolean}
*/
/**
* @method getIsWatchAppInstalled
* <p>Gets the value of the {@link Titanium.WatchSession#property-isWatchAppInstalled} property.</p>
* @returns {Boolean}
*/
/**
* @method getIsComplicationEnabled
* <p>Gets the value of the {@link Titanium.WatchSession#property-isComplicationEnabled} property.</p>
* @returns {Boolean}
*/
/**
* @method getIsReachable
* <p>Gets the value of the {@link Titanium.WatchSession#property-isReachable} property.</p>
* @returns {Boolean}
*/
/**
* @method getIsActivated
* <p>Gets the value of the {@link Titanium.WatchSession#property-isActivated} property.</p>
* @returns {Boolean}
* @platform iphone 5.4.0
*/
/**
* @method getRecentApplicationContext
* <p>Gets the value of the {@link Titanium.WatchSession#property-recentApplicationContext} property.</p>
* @returns {Dictionary}
*/
/**
* @property activationState
* @type Number
* @readonly
* <p>Returns the current activation state of the watch.</p>
* <p> <b>Requires:</b>
iOS 9.3 and later
</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_NOT_ACTIVATED}
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_INACTIVE}
<li> {@link Titanium.WatchSession#property-ACTIVATION_STATE_ACTIVATED}
</ul></p>
* @platform iphone 5.4.0
*/
/**
* @property ACTIVATION_STATE_NOT_ACTIVATED
* @type Number
* @readonly
* <p>The watch is currently not activated.</p>
* <p> <b>Requires:</b>
iOS 9.3 and later
</p>
* @platform iphone 5.4.0
*/
/**
* @property ACTIVATION_STATE_INACTIVE
* @type Number
* @readonly
* <p>The watch is currently inactive.</p>
* <p> <b>Requires:</b>
iOS 9.3 and later
</p>
* @platform iphone 5.4.0
*/
/**
* @property ACTIVATION_STATE_ACTIVATED
* @type Number
* @readonly
* <p>The watch is currently activated.</p>
* <p> <b>Requires:</b>
iOS 9.3 and later
</p>
* @platform iphone 5.4.0
*/
/**
* @property hasContentPending
* @type Boolean
* @readonly
* <p>Returns <code>true</code> if there is more content for the session to deliver.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
*/
/**
* @property [remainingComplicationUserInfoTransfers=0]
* @type Number
* @readonly
* <p>The number of calls remaining to <code>transferCurrentComplication</code> before the system starts
transferring the complicationUserInfo as regular userInfos.</p>
* <p> <b>Requires:</b>
iOS 10.0 and later
</p>
* @platform iphone 6.0.0
*/
/**
* @property isSupported
* @type Boolean
* @readonly
* <p>Returns <code>true</code> if the device supports watch connectivity.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property isPaired
* @type Boolean
* @readonly
* <p>Returns <code>true</code> if the device is paired with a watch.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property isWatchAppInstalled
* @type Boolean
* @readonly
* <p>Returns <code>true</code> if the accompanying watch app is installed.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property isComplicationEnabled
* @type Boolean
* @readonly
* <p>Returns <code>true</code> if complication is enabled on the installed watch app.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property isReachable
* @type Boolean
* @readonly
* <p>Returns <code>true</code> if the watch is currently reachable.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @property isActivated
* @type Boolean
* @readonly
* <p>Returns <code>true</code> if the watch is currently activated.</p>
* <p> <b>Requires:</b>
iOS 9.3 and later
</p>
* @platform iphone 5.4.0
*/
/**
* @property recentApplicationContext
* @type Dictionary
* @readonly
* <p>The most recent application context sent to the watch app.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
*/
/**
* @class MessageReply
* @platform iphone 5.1.0
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/WatchSession/WatchSession.yml
* <p>Reply message received from watch app.</p>
* <p> <b>Requires:</b>
iOS 9.0 and later
</p>
* <h3>Examples</h3>
<h4>Creating a Watch Session</h4>
<p>The following example demonstrates how to create a new watch session, and call methods to transfer
data to the watch. Also include event listeners for receiving data from the watch.</p>
<p>It is important to note that this only works if there is a corresponding watchOS2 app written
in Objective-C in the Xcode project inside the extensions folder of the Titanium Project.</p>
<h4>app.js</h4>
<pre><code>Ti.WatchSession.activateSession();
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var eventsArea = Ti.UI.createTextArea({
borderWidth: 2,
borderColor: '#bbb',
borderRadius: 5,
color: '#888',
font: {fontSize:16},
textAlign: 'left',
value: 'This is where we listen for events',
bottom: 10,
width: 300, height : 140
});
win.add(eventsArea);
var imageView = Ti.UI.createImageView ({
top: 240,
width: 80,
height: 80
});
win.add(imageView);
var statusBtn = Ti.UI.createButton({
title: 'status me',
top: 40
});
statusBtn.addEventListener('click', function(e) {
eventsArea.value += '\nbtn pressed '
+ '\nwatchOS2 is supported: ' + Ti.WatchSession.isSupported
+ '\nwatch is paired: ' + Ti.WatchSession.isPaired
+ '\nwatchApp is installed: ' + Ti.WatchSession.isWatchAppInstalled
+ '\nwatchComplication is enabled: ' + Ti.WatchSession.isComplicationEnabled
+ '\nwatch is reachable: ' + Ti.WatchSession.isReachable
+ '\nMost recent app context: ' + JSON.stringify(Ti.WatchSession.recentApplicationContext);
})
win.add(statusBtn);
var sendMsgBtn = Ti.UI.createButton({
title: 'send Message to watch',
top: 80
});
sendMsgBtn.addEventListener('click', function(e) {
Ti.WatchSession.sendMessage({
message: 'Hi',
from: 'app',
type: 'message'
});
});
var sendUserInfoBtn = Ti.UI.createButton({
title: 'send User Info to watch',
top: 120
});
sendUserInfoBtn.addEventListener('click', function(e) {
Ti.WatchSession.transferUserInfo({
data: 'user info from app',
created: '2015'
});
});
var sendAppContextBtn = Ti.UI.createButton({
title: 'update app context to watch',
top: 160
});
sendAppContextBtn.addEventListener('click', function(e) {
Ti.WatchSession.updateApplicationContext({
status: 'Application Context from app',
updates: 2
});
});
var sendFileBtn = Ti.UI.createButton({
title: 'send File to watch',
top: 200
});
sendFileBtn.addEventListener('click', function(e) {
Ti.WatchSession.transferFile({
fileURL: '/images/default_app_logo.png',
metaData: {
data: 'appcelerator logo'
}
});
});
Ti.WatchSession.addEventListener('receivemessage', function(e) {
eventsArea.value += '\nreceivemessage '
+ '\n' + JSON.stringify(e);
});
Ti.WatchSession.addEventListener('receiveuserinfo', function(e) {
eventsArea.value += '\nreceiveuserinfo '
+ '\n' + JSON.stringify(e);
});
Ti.WatchSession.addEventListener('receivefile', function(e) {
eventsArea.value += '\nreceivefile ' + '\n' + JSON.stringify(e);
var cacheFile = e.data.getFile();
var downloadedFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, cacheFile.getName());
downloadedFile.write(e.data);
imageView.setImage(downloadedFile);
});
Ti.WatchSession.addEventListener('receiveapplicationcontext', function(e) {
eventsArea.value += '\nreceiveapplicationcontext '
+ '\n' + JSON.stringify(e);
});
Ti.WatchSession.addEventListener('watchstatechanged', function(e) {
eventsArea.value += '\nwatchstatechanged '
+ '\n' + JSON.stringify(e);
});
Ti.WatchSession.addEventListener('reachabilitychanged', function(e) {
eventsArea.value += '\nreachabilitychanged '
+ '\n' + JSON.stringify(e);
});
Ti.WatchSession.addEventListener('finishfiletransfer', function(e) {
eventsArea.value += '\nfinishfiletransfer '
+ '\n' + JSON.stringify(e);
});
Ti.WatchSession.addEventListener('finishuserinfotransfer', function(e) {
eventsArea.value += '\nfinishuserinfotransfer '
+ '\n' + JSON.stringify(e);
});
win.add(sendMsgBtn);
win.add(sendUserInfoBtn);
win.add(sendFileBtn);
win.add(sendAppContextBtn);
win.open();
</code></pre>
*/
/**
* @property message
* @type Dictionary
* <p>Reply message from watchapp.</p>
* @description <p>Will be undefined if <code>success</code> is <code>false</code>.</p>
*/
/**
* @property success
* @type Boolean
* <p>Indicates if the operation succeeded.</p>
* @description <p>Returns <code>true</code> if request succeeded, <code>false</code> otherwise.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Will be undefined if <code>success</code> is <code>true</code>.</p>
*/
/**
* @property code
* @type Number
* <p>Error code. Returns 0 if <code>success</code> is <code>true</code>.</p>
* @description <p>Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
*/
/**
* @class Titanium.XML.Attr
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.XML.Node
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/Attr.yml
* <p>Represents an attribute of an {@link Titanium.XML.Element Element}.</p>
* @description <p>Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-637646024">DOM Level 2 API</a> on
Android and iOS. Exposes the
<a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-637646024">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @method getValue
* <p>Gets the value of the {@link Titanium.XML.Attr#property-value} property.</p>
* @returns {String}
*/
/**
* @method setValue
* <p>Sets the value of the {@link Titanium.XML.Attr#property-value} property.</p>
* @param {String} value
<p>New value for the property.</p>
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.XML.Attr#property-name} property.</p>
* @returns {String}
*/
/**
* @method getSpecified
* <p>Gets the value of the {@link Titanium.XML.Attr#property-specified} property.</p>
* @returns {Boolean}
*/
/**
* @method getOwnerElement
* <p>Gets the value of the {@link Titanium.XML.Attr#property-ownerElement} property.</p>
* @returns {Titanium.XML.Element}
*/
/**
* @property value
* @type String
* <p>The attribute value as a string.</p>
*/
/**
* @property name
* @type String
* @readonly
* <p>Attribute name</p>
*/
/**
* @property specified
* @type Boolean
* @readonly
* <p>True if this attribute was explicitly given a value in the instance document, false otherwise.</p>
*/
/**
* @property ownerElement
* @type Titanium.XML.Element
* @readonly
* <p>The {@link Titanium.XML.Element} to which the attribute belongs.</p>
*/
/**
* @class Titanium.XML.CDATASection
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.XML.Text
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/CDATASection.yml
* <p>Used to include blocks of literal text containing characters that would otherwise need
to be escaped.</p>
* @description <p>Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-667469212">DOM Level 2 API</a> on
Android and iOS with some non-standard extensions. Exposes the
<a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-667469212">DOM Level 3 API</a> implementation on Mobile Web. On Mobile
Web, there is no Titanium.XML.CDATASection object. A string object containing the data is used directly instead.</p>
*/
/**
* @class Titanium.XML.CharacterData
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.XML.Node
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/CharacterData.yml
* <p>An interface extending {@link Titanium.XML.Node} with a set of attributes and methods for accessing character data in the DOM.
Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-FF21A306">DOM Level 2 API</a> on Android and iOS. For reasons of compatibility with the javascript engine, text is represented by UTF-8 instead of UTF-16 on Android and iOS. Exposes the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-FF21A306">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @method substringData
* <p>Extracts a range of data from the node. Throws an exception if offset is negative, offset is beyond the data's length, or if count is negative.</p>
* @param {Number} offset
<p>Start offset of substring to extract.</p>
* @param {Number} count
<p>The number of characters units to extract.</p>
* @returns {String}The specified substring. If the sum of offset and count exceeds the length, then all 16-bit units to the end of the data are returned.
*/
/**
* @method appendData
* <p>Append the string to the end of the character data of the node. Upon success, data provides access to the concatenation of data and the string specified. Throws an exception if this node is readonly.</p>
* @param {String} arg
<p>The string to append.</p>
*/
/**
* @method insertData
* <p>Insert a string at the specified offset. Throws an exception if this node is readonly, if offset is negative, or if offset is beyond the data's length.</p>
* @param {Number} offset
<p>The character offset at which to insert.</p>
* @param {String} arg
<p>The string to insert.</p>
*/
/**
* @method deleteData
* <p>Remove a range of characters from the node. Upon success, data and length reflect the change. Throws an exception if this node is readonly, if offset is negative, offset is beyond the data's length, or if count is negative.</p>
* @param {Number} offset
<p>The offset from which to start removing.</p>
* @param {Number} count
<p>The number of characters to delete. If the sum of offset and count exceeds length then all characters from offset to the end of the data are deleted.</p>
*/
/**
* @method replaceData
* <p>Replace the characters starting at the specified offset with the specified string. Throws an exception if this node is readonly, if offset is negative, offset is beyond the data's length, or if count is negative.</p>
* @param {Number} offset
<p>The offset from which to start replacing.</p>
* @param {Number} count
<p>The number of characters to replace. If the sum of offset and count exceeds length, then all characters to the end of the data are replaced; (i.e., the effect is the same as a remove method call with the same range, followed by an append method invocation).</p>
* @param {String} arg
<p>The string with which the range must be replaced.</p>
*/
/**
* @method getData
* <p>Gets the value of the {@link Titanium.XML.CharacterData#property-data} property.</p>
* @returns {String}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method setData
* <p>Sets the value of the {@link Titanium.XML.CharacterData#property-data} property.</p>
* @param {String} data
<p>New value for the property.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @method getLength
* <p>Gets the value of the {@link Titanium.XML.CharacterData#property-length} property.</p>
* @returns {Number}
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property data
* @type String
* <p>The character data of the node that implements this interface. Throws an exception during setting if this node is readonly.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
/**
* @property length
* @type Number
* @readonly
* <p>The number of characters that are available through data and the substringData method. This may have the value zero, i.e., {@link Titanium.XML.CharacterData} may be empty.</p>
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
*/
* @class Titanium.XML.Comment
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.XML.CharacterData
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/Comment.yml
* <p>Represents the contents of an XML comment.</p>
* @description <p>Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1728279322">DOM Level 2 API</a> on
Android and iOS with some non-standard extensions. Exposes the
<a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1728279322">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @class Titanium.XML.DOMImplementation
* @platform android 1.8
* @platform iphone 1.8
* @platform ipad 1.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/DOMImplementation.yml
* <p>The {@link Titanium.XML.DOMImplementation} interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490">DOM Level 2 API</a> on Android and iOS. Exposes the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @method hasFeature
* <p>Test if the {@link Titanium.XML.DOMImplementation} implements a specific feature.</p>
* @param {String} feature
<p>The name of the feature to test (case-insensitive). The values used by DOM features are defined throughout the DOM Level 2 specifications and listed in the Conformance section. The name must be an XML name. To avoid possible conflicts, as a convention, names referring to features defined outside the DOM specification should be made unique by reversing the name of the Internet domain name of the person (or the organization that the person belongs to) who defines the feature, component by component, and using this as a prefix. For instance, the W3C SVG Working Group defines the feature "org.w3c.dom.svg".</p>
* @param {String} version
<p>This is the version number of the feature to test. In Level 2, the string can be either "2.0" or "1.0". If the version is not specified, supporting any version of the feature causes the method to return true.</p>
* @returns {Boolean}true if the feature is implemented in the specified version, false otherwise.
*/
/**
* @method createDocumentType
* <p>Creates an empty {@link Titanium.XML.DocumentType} node. Entity declarations and notations are not made available. Entity reference expansions and default attribute additions do not occur. Raises an exception if qualifiedName is malformed or contains an illegal character.</p>
* @param {String} qualifiedName
<p>The qualified name of the document type to be created.</p>
* @param {String} publicId
<p>The external subset public identifier.</p>
* @param {String} systemId
<p>The external subset system identifier.</p>
* @returns {Titanium.XML.DocumentType}A new <Titanium.XML.DocumentType> node with Node.ownerDocument set to null.
*/
/**
* @method createDocument
* <p>Creates an {@link Titanium.XML.Document} object of the specified type with its document element. Raises an exception if qualifiedName is malformed, contains an illegal character, or is inconsistent with namespaceURI. Also raises an exception if doctype has already been used with a different document.</p>
* @param {String} namespaceURI
<p>The namespace URI of the document element to create.</p>
* @param {String} qualifiedName
<p>The qualified name of the document element to be created.</p>
* @param {Titanium.XML.DocumentType} doctype
<p>The type of document to be created or null. When doctype is not null, its Node.ownerDocument attribute is set to the document being created.</p>
* @returns {Titanium.XML.Document}A new <Titanium.XML.Document> object
*/
/**
* @class Titanium.XML.Document
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.XML.Node
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/Document.yml
* <p>The DOM Document returned from {@link Titanium.XML#method-parseString}.</p>
* @description <p>Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#i-Document">DOM Level 2 API</a> on
Android and iOS. Exposes the
<a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#i-Document">DOM Level 3 API</a> implementation on
Mobile Web.</p>
<p>As of version 3.1, Android does not truly support DTDs. A document with a DTD can be
parsed, however it is not validated, its default attributes are not be automatically
added into the DOM tree, and so on.</p>
<p>This has been reported as <a href="http://code.google.com/p/android/issues/detail?id=7395">Android Issue #7395</a>.</p>
*/
/**
* @method createElement
* <p>Creates an element with the given tag name.</p>
* @param {String} tagName
<p>Name for the created element.</p>
* @returns {Titanium.XML.Element}Newly created element.
*/
/**
* @method createDocumentFragment
* <p>Creates an empty {@link Titanium.XML.DocumentFragment DocumentFragment}.</p>
* @returns {Titanium.XML.DocumentFragment}The empty <Titanium.XML.DocumentFragment>.
*/
/**
* @method createTextNode
* <p>Creates a text node.</p>
* @param {String} data
<p>The string value for the text node.</p>
* @returns {Titanium.XML.Text}Newly-created text node.
*/
* @method createComment
* <p>Creates a {@link Titanium.XML.Comment Comment} with the supplied string data.</p>
* @param {String} data
<p>Comment text.</p>
* @returns {Titanium.XML.Comment}Comment object, ready to be appended to the DOM tree.
*/
/**
* @method createCDATASection
* <p>Creates and returns a {@link Titanium.XML.CDATASection CDATASection}.</p>
* @param {String} data
<p>String data to go into the CDATA section.</p>
* @returns {Titanium.XML.CDATASection}CDATA section with the given data, ready to be added to an element.
*/
/**
* @method createProcessingInstruction
* <p>Creates a processing instruction for inserting into the DOM tree.</p>
* @param {String} target
<p>Target part for the processing instruction.</p>
* @param {String} data
<p>Data for the processing instruction node.</p>
* @returns {Titanium.XML.ProcessingInstruction}New processing instruction.
*/
/**
* @method createAttribute
* <p>Creates an attribute with the given name.</p>
* @param {String} name
<p>Name for the new attribute.</p>
* @returns {Titanium.XML.Attr}Attribute object, ready to be added to an element.
*/
/**
* @method createEntityReference
* <p>Creates an {@link Titanium.XML.EntityReference EntityReference} with the given name.</p>
* @param {String} name
<p>Name for the new entity reference.</p>
* @returns {Titanium.XML.EntityReference}Newly-created entity reference.
*/
/**
* @method getElementsByTagName
* <p>Returns a node list of elements in the document which have the given tag.</p>
* @param {String} tagname
<p>Tag name to search for.</p>
* @returns {Titanium.XML.NodeList}List of elements in the document which have the given tag name.
*/
/**
* @method importNode
* <p>Imports a node from another document to this document,
without altering or removing the source node from the original document.</p>
* @description <p>This method creates a new copy of the source node, ready to be inserted into
this document. The returned node has an {@link Titanium.XML.Node#property-ownerDocument ownerDocument}
property that points to this document, but its {@link Titanium.XML.Node#property-parentNode parentNode}
property is <code>null</code>, since it has not been inserted into the current document.</p>
<p>For more on node ownership, see <a href="http://www.w3.org/DOM/faq.html#ownerdoc">ownerDocument issues</a>
in the W3C DOM FAQ.</p>
* @param {Titanium.XML.Node} importedNode
<p>Node to import.</p>
* @param {Boolean} deep
<p>If true, recursively import the subtree under the specified node; if false, import only the node itself.</p>
* @returns {Titanium.XML.Node}Imported node that belongs now to this document.
*/
/**
* @method createElementNS
* <p>Create a new element with the given namespace and name.</p>
* @param {String} namespaceURI
<p>URI for the namespace the new element belongs to.</p>
* @param {String} name
<p>Qualified for the new element (can include a prefix).</p>
* @returns {Titanium.XML.Element}New namespace-qualified element.
*/
/**
* @method createAttributeNS
* <p>Creates an attribute with the given name and namespace.</p>
* @param {String} namespaceURI
<p>Namespace URI for the new attribute.</p>
* @param {String} name
<p>Qualified name for the new attribute (can include a prefix).</p>
* @returns {Titanium.XML.Attr}Attribute object, ready to be added to an element.
*/
/**
* @method getElementsByTagNameNS
* <p>Returns a node list of elements in the document which belong to the given namespace and have the given tag name.</p>
* @param {String} namespaceURI
<p>Namespace URI used for matching elements.</p>
* @param {String} localname
<p>Tag name to search for.</p>
* @returns {Titanium.XML.NodeList}List of elements in the document which belong to the given namespace and have the given tag name.
*/
/**
* @method getElementById
* <p>Returns an {@link Titanium.XML.Element Element} that has an ID attribute with the given value.</p>
* @param {String} elementId
<p>A unique ID value for an element to search for.</p>
* @returns {Titanium.XML.Element}The Element matching the given ID, if any.
*/
/**
* @method getDoctype
* <p>Gets the value of the {@link Titanium.XML.Document#property-doctype} property.</p>
* @returns {Titanium.XML.DocumentType}
*/
/**
* @method getImplementation
* <p>Gets the value of the {@link Titanium.XML.Document#property-implementation} property.</p>
* @returns {Titanium.XML.DOMImplementation}
*/
/**
* @method getDocumentElement
* <p>Gets the value of the {@link Titanium.XML.Document#property-documentElement} property.</p>
* @returns {Titanium.XML.Element}
*/
/**
* @property doctype
* @type Titanium.XML.DocumentType
* @readonly
* <p>An interface to the list of entities that are defined for the document, such as via a Document Type Definition (DTD).</p>
* @description <p>See note about Android and DTDs.</p>
*/
/**
* @property implementation
* @type Titanium.XML.DOMImplementation
* @readonly
* <p>{@link Titanium.XML.DOMImplementation DOMImplementation} object associated with this
document.</p>
*/
/**
* @property documentElement
* @type Titanium.XML.Element
* @readonly
* <p>Root element of this document.</p>
*/
/**
* @class Titanium.XML.DocumentFragment
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.XML.Node
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/DocumentFragment.yml
* <p>A lightweight document object used as a container for a group of nodes.</p>
* @description <p>When a <code>DocumentFragment</code> is inserted into a DOM tree, children of the <code>DocumentFragment</code> are
added, not the <code>DocumentFragment</code> itself. </p>
<p>Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-B63ED1A3">DOM Level 2 API</a> on
Android and iOS with some non-standard extensions. Exposes the
<a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-B63ED1A3">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @class Titanium.XML.DocumentType
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.XML.Node
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/DocumentType.yml
* <p>Each {@link Titanium.XML.Document} has a <code>doctype</code> attribute whose value is either 'null' or a {@link Titanium.XML.DocumentType} object.</p>
* @description <p>This provides an interface to the list of entities that are defined for the document. Implements the
<a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-412266927">DOM Level 2 API</a> on Android and iOS. Exposes the
<a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-412266927">DOM Level 3 API</a> implementation on Mobile Web.</p>
<p>As of version 3.1, Android still does not truly support DTDs. A document with a DTD can be
parsed, however it is not validated, none of its default attributes will automatically be put
into the tree, etc. <a href="http://code.google.com/p/android/issues/detail?id=7395">Google is aware of the issue</a>.</p>
*/
/**
* @method getName
* <p>Gets the value of the {@link Titanium.XML.DocumentType#property-name} property.</p>
* @returns {String}
*/
/**
* @method getEntities
* <p>Gets the value of the {@link Titanium.XML.DocumentType#property-entities} property.</p>
* @returns {Titanium.XML.NamedNodeMap}
*/
/**
* @method getNotations
* <p>Gets the value of the {@link Titanium.XML.DocumentType#property-notations} property.</p>
* @returns {Titanium.XML.NamedNodeMap}
*/
/**
* @method getPublicId
* <p>Gets the value of the {@link Titanium.XML.DocumentType#property-publicId} property.</p>
* @returns {String}
*/
/**
* @method getSystemId
* <p>Gets the value of the {@link Titanium.XML.DocumentType#property-systemId} property.</p>
* @returns {String}
*/
/**
* @method getInternalSubset
* <p>Gets the value of the {@link Titanium.XML.DocumentType#property-internalSubset} property.</p>
* @returns {String}
*/
/**
* @property name
* @type String
* @readonly
* <p>The name of DTD; i.e., the name immediately following the <code>DOCTYPE</code> keyword.</p>
*/
/**
* @property entities
* @type Titanium.XML.NamedNodeMap
* @readonly
* <p>A {@link Titanium.XML.NamedNodeMap} containing the general entities, both external and internal, declared in the DTD. Parameter entities are not contained. Duplicates are discarded.</p>
*/
/**
* @property notations
* @type Titanium.XML.NamedNodeMap
* @readonly
* <p>A {@link Titanium.XML.NamedNodeMap} containing the notations declared in the DTD. Duplicates are discarded. Every node in this map also implements the {@link Titanium.XML.Notation} interface.</p>
*/
/**
* @property publicId
* @type String
* @readonly
* <p>The public identifier of the external subset.</p>
*/
/**
* @property systemId
* @type String
* @readonly
* <p>The system identifier of the external subset.</p>
*/
/**
* @property internalSubset
* @type String
* @readonly
* <p>The internal subset as a string.</p>
*/
/**
* @class Titanium.XML.Element
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.XML.Node
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/Element.yml
* <p>Represents an element in a DOM document, a {@link Titanium.XML.Node} defined by a start-tag and end-tag (or an empty tag). Elements may have {@link Titanium.XML.Attr attributes} associated with them.
Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-745549614">DOM Level 2 API</a> on Android and iOS with some non-standard extensions. Exposes the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-745549614">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @method getAttribute
* <p>Retrieves an attribute value by name, returning it as a string.</p>
* @param {String} name
<p>The name of the attribute</p>
* @returns {String}The <Titanium.XML.Attr> value as a string, or empty string if the attribute has no specified or default value.
*/
/**
* @method setAttribute
* <p>Adds a new attribute. Any attribute with the same name is replaced. Throws an exception if the element is read-only, or if the name contains an illegal character.</p>
* @param {String} name
<p>The name of the attribute.</p>
* @param {String} value
<p>The value of the attribute. This is value is <strong>not</strong> parsed as part of the assignment. Any markup is treated as literal text, and needs to be escaped.</p>
*/
/**
* @method removeAttribute
* <p>Removes an attribute by name. If the attribute has a default value, it is immediately replaced with this default, including namespace URI and local name. Throws an exception if the element is read-only.</p>
* @param {String} name
<p>The name of the attribute to remove.</p>
*/
/**
* @method getAttributeNode
* <p>Retrieves an attribute value by name, returning it as a {@link Titanium.XML.Attr} object.</p>
* @param {String} name
<p>The name of the attribute</p>
* @returns {Titanium.XML.Attr}The <Titanium.XML.Attr> value, or null if there is no such attribute.
*/
/**
* @method setAttributeNode
* <p>Adds a new attribute. Any attribute with the same <code>nodeName</code> as the argument is replaced. Throws an exception if the element is read-only, if <code>newAttr</code> is from a different document, or if <code>newAttr</code> is already an attribute of another element.</p>
* @param {Titanium.XML.Attr} newAttr
<p>The attribute node to add to the element.</p>
* @returns {Titanium.XML.Attr}The attribute that was replaced, or `null` otherwise.
*/
/**
* @method removeAttributeNode
* <p>Removes the specified attribute node. If the removed attribute has a default value, it is replaced immediately, with the same namespace and local name as the removed attribute, if applicable. Throws an exception if the element is read-only, or the attribute is not an attribute of the element.</p>
* @param {Titanium.XML.Attr} oldAttr
<p>The attribute to remove.</p>
*/
/**
* @method getElementsByTagName
* <p>Retrieves a {@link Titanium.XML.NodeList} of all descendant elements with a given tag name, in preorder traversal.</p>
* @param {String} name
<p>The name of the element. The value <code>*</code> matches all tags.</p>
* @returns {Titanium.XML.NodeList}
*/
/**
* @method getAttributeNS
* <p>Retrieves an attribute value by local name and namespace URI, returning it as a string.</p>
* @param {String} namespaceURI
<p>The namespace URI of the attribute to retrieve.</p>
* @param {String} localName
<p>The local name of the attribute to retrieve.</p>
* @returns {String}The <Titanium.XML.Attr> value as a string, or empty string if the attribute has no specified or default value.
*/
/**
* @method setAttributeNS
* <p>Adds a new attribute. Any attribute with the same local name and namespace URI is present on the element is replaced, with its prefix changed to that of the <code>qualifiedName</code> parameter. Throws an exception if the element is read-only, if the name contains an illegal character, or if the qualified name contains an error.</p>
* @param {String} namespaceURI
<p>The namespace URI of the attribute.</p>
* @param {String} qualifiedName
<p>The qualified name of the attribute. If it is malformed, has a prefix and namespaceURI is <code>null</code>, or if the prefix is <code>xml</code> or <code>xmlns</code> but does not correspond to a property defined in the <a href="http://www.w3.org/XML/1998/namespace">XML</a> or <a href="http://www.w3.org/2000/xmlns/">XMLNS</a> specifications, then it contains an error.</p>
* @param {String} value
<p>The value of the attribute. This is value is <strong>not</strong> parsed as part of the assignment. Any markup is treated as literal text, and needs to be escaped.</p>
*/
/**
* @method removeAttributeNS
* <p>Removes an attribute by local name and namespace URI. If the attribute has a default value, it is immediately replaced with this default, including namespace URI and local name. Throws an exception if the element is read-only.</p>
* @param {String} namespaceURI
<p>The namespace URI of the attribute to remove.</p>
* @param {String} localName
<p>The local name of the attribute to remove.</p>
*/
/**
* @method getAttributeNodeNS
* <p>Retrieves an attribute value by local name and namespace URI, returning it as a {@link Titanium.XML.Attr} object.</p>
* @param {String} namespaceURI
<p>The namespace URI of the attribute to retrieve.</p>
* @param {String} localName
<p>The local name of the attribute to retrieve.</p>
* @returns {Titanium.XML.Attr}The <Titanium.XML.Attr> value, or null if there is no such attribute.
*/
/**
* @method setAttributeNodeNS
* <p>Adds a new attribute. Any attribute with the same local name and namespace URI is replaced. Throws an exception if the element is read-only, if <code>newAttr</code> is from a different document, or if <code>newAttr</code> is already an attribute of another element.</p>
* @param {Titanium.XML.Attr} newAttr
<p>The attribute node to add to the element.</p>
* @returns {Titanium.XML.Attr}The attribute that was replaced, or `null` otherwise.
*/
/**
* @method getElementsByTagNameNS
* <p>Retrieves a {@link Titanium.XML.NodeList} of all descendant elements with a given local name and namespace URI, in preorder traversal.</p>
* @param {String} namespaceURI
<p>The namespace URI of the element. The value <code>*</code> matches all namespaces.</p>
* @param {String} localName
<p>The local name of the element. The value <code>*</code> matches all local names.</p>
* @returns {Titanium.XML.NodeList}
*/
/**
* @method hasAttribute
* <p>Determines whether or not an attribute with the given name is available in the element, or has a default value.</p>
* @param {String} name
<p>The name of the attribute to search for.</p>
* @returns {Boolean}
*/
/**
* @method hasAttributeNS
* <p>Determines whether or not an attribute with the given name is available in the element, or has a default value.</p>
* @param {String} namespaceURI
<p>The namespace URI of the attribute to search for.</p>
* @param {String} localName
<p>The local name of the attribute to search for.</p>
* @returns {Boolean}
*/
/**
* @method getText
* <p>Gets the value of the {@link Titanium.XML.Element#property-text} property.</p>
* @deprecated 2.0.0 Use <Titanium.XML.Element.textContent> instead.
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @method getTextContent
* <p>Gets the value of the {@link Titanium.XML.Element#property-textContent} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @method getTagName
* <p>Gets the value of the {@link Titanium.XML.Element#property-tagName} property.</p>
* @returns {String}
*/
/**
* @property text
* @type String
* @readonly
* <p>Content (value) of all text nodes within this node.</p>
* @deprecated 2.0.0 Use <Titanium.XML.Element.textContent> instead.
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
*/
/**
* @property textContent
* @type String
* @readonly
* <p>Content (value) of all text nodes within this node.</p>
* @description <p>On Android, <code>textContent</code> is supported on {@link Titanium.XML.Element Element} and
{@link Titanium.XML.Text Text} nodes only.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property tagName
* @type String
* @readonly
* <p>The name of the element, as defined by its tag.</p>
*/
/**
* @class Titanium.XML.Entity
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.XML.Node
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/Entity.yml
* <p>This interface represents an entity, either parsed or unparsed, in an XML document. Note that this models the entity itself not the entity declaration. The nodeName attribute that is inherited from Node contains the name of the entity. An Entity node does not have any parent.
Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-527DCFF2">DOM Level 2 API</a> on Android and iOS. Exposes the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-527DCFF2">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @method getPublicId
* <p>Gets the value of the {@link Titanium.XML.Entity#property-publicId} property.</p>
* @returns {String}
*/
/**
* @method getSystemId
* <p>Gets the value of the {@link Titanium.XML.Entity#property-systemId} property.</p>
* @returns {String}
*/
/**
* @method getNotationName
* <p>Gets the value of the {@link Titanium.XML.Entity#property-notationName} property.</p>
* @returns {String}
*/
/**
* @property publicId
* @type String
* @readonly
* <p>The public identifier associated with the entity, if specified. If the public identifier was not specified, this is <code>null</code>.</p>
*/
/**
* @property systemId
* @type String
* @readonly
* <p>The system identifier associated with the entity, if specified. If the system identifier was not specified, this is null.</p>
*/
/**
* @property notationName
* @type String
* @readonly
* <p>For unparsed entities, the name of the notation for the entity. For parsed entities, this is <code>null</code>.</p>
*/
/**
* @class Titanium.XML.EntityReference
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.XML.Node
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/EntityReference.yml
* <p>Represents an XML entity reference.</p>
* @description <p>Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-11C98490">DOM Level 2 API</a>
on Android and iOS. Exposes the
<a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-11C98490">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @class Titanium.XML.NamedNodeMap
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/NamedNodeMap.yml
* <p>A key-value paired map that maps String objects to {@link Titanium.XML.Node} objects.
Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1780488922">DOM Level 2 API</a> on Android and iOS. Exposes the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1780488922">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @method getNamedItem
* <p>Retrieves a node specified by name.</p>
* @param {String} name
<p>The name of the node to retrieve.</p>
* @returns {Titanium.XML.Node}The specified node, or `null` if no node with the name is in the map
*/
/**
* @method setNamedItem
* <p>Adds a node using its <code>nodeName</code> attribute. If a node with that name is already present, it is replaced. Throws an exception if the argument is from a different document, the map is read-only, or the argument is an attribute of another element.</p>
* @param {Titanium.XML.Node} node
<p>The node to insert into the map.</p>
* @returns {Titanium.XML.Node}The node replaced, or `null` if no node was replaced.
*/
/**
* @method removeNamedItem
* <p>Removes a node from the map specified by name. When this map contains attributes attached to an element, if the removed attribtue is known to have a default, it is replaced with that value.</p>
* @param {String} name
<p>The name of the node to remove.</p>
* @returns {Titanium.XML.Node}The node removed from the map, or `null` if nothing removed.
*/
/**
* @method item
* <p>Retrieves the node at the specified index of the map. Note that NamedNodeMaps are not ordered.</p>
* @param {Number} index
<p>The index of the node to retrieve.</p>
* @returns {Titanium.XML.Node}The node at the specified index, or `null` if the index is invalid
*/
/**
* @method getNamedItemNS
* <p>Retrieves a node specified by name and namespace. Returns <code>null</code> if no matching node is in the map.</p>
* @param {String} namespaceURI
<p>The namespace URI of the node to retrieve.</p>
* @param {String} localName
<p>The local name of the node within the namespace to retrieve.</p>
* @returns {Titanium.XML.Node}The specified node, or `null` if there is no matching node.
*/
/**
* @method setNamedItemNS
* <p>Adds a node using its <code>namespaceURI</code> and <code>localName</code> attributes. If a node with that name is already present, it is replaced. Throws an exception if the argument is from a different document, the map is read-only, or the argument is an attribute of another element.</p>
* @param {Titanium.XML.Node} node
<p>The node to insert into the map.</p>
* @returns {Titanium.XML.Node}Returns the node replaced, or `null`.
*/
/**
* @method removeNamedItemNS
* <p>Removes a node from the map specified by local name and namespace URI. When this map contains attributes attached to an element, if the removed attribtue is known to have a default, it is replaced with that value. Returns the node removed from the map, or <code>null</code> if there is no corresponding node.</p>
* @param {String} namespaceURI
<p>The namespace URI of the node to remove.</p>
* @param {String} localName
<p>The local name of the node within the namespace to remove.</p>
* @returns {Titanium.XML.Node}The node removed from the map, or `null` if nothing removed.
*/
/**
* @method getLength
* <p>Gets the value of the {@link Titanium.XML.NamedNodeMap#property-length} property.</p>
* @returns {Number}
*/
/**
* @property length
* @type Number
* @readonly
* <p>The number of nodes in the map. The valid range of child node indices is 0-<code>length</code>-1, inclusive.</p>
*/
/**
* @class Titanium.XML.Node
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/Node.yml
* <p>A single node in the {@link Titanium.XML.Document Document} tree.</p>
* @description <p>Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247">DOM Level 2 API</a>
on Android and iOS. Exposes the
<a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1950641247">DOM Level 3 API</a>
implementation on Mobile Web. For full property and method description, see the W3C specifications.</p>
<p>Note that on iOS, only {@link Titanium.XML.Element Element} nodes are mutable. This means
that the methods <code>appendChild</code>, <code>insertBefore</code>, <code>removeChild</code>, and
<code>replaceChild</code> only work on <code>Element</code> objects. If one of these methods is called on
another type of node, it throws an exception.</p>
*/
/**
* @method insertBefore
* <p>Inserts the node <code>newChild</code> before the node <code>refChild</code>.</p>
* @description <p>On iOS, <code>insertBefore</code> is supported on {@link Titanium.XML.Element Element}
nodes <strong>only</strong>.</p>
* @param {Titanium.XML.Node} newChild
<p>Node to insert.</p>
* @param {Titanium.XML.Node} refChild
<p>Node to insert <code>newChild</code> before.</p>
* @returns {Titanium.XML.Node}The inserted node.
*/
/**
* @method replaceChild
* <p>Replaces the node <code>oldChild</code> with the node <code>newChild</code>.</p>
* @description <p>On iOS, <code>replaceChild</code> is supported on {@link Titanium.XML.Element Element}
nodes <strong>only</strong>.</p>
* @param {Titanium.XML.Node} newChild
<p>New node.</p>
* @param {Titanium.XML.Node} oldChild
<p>Node being replaced.</p>
* @returns {Titanium.XML.Node}Node that was replaced.
*/
/**
* @method removeChild
* <p>Removes a child node from this node.</p>
* @description <p>On iOS, <code>removeChild</code> is supported on {@link Titanium.XML.Element Element}
nodes <strong>only</strong>.</p>
* @param {Titanium.XML.Node} oldChild
<p>Node to remove.</p>
* @returns {Titanium.XML.Node}Node that was removed.
*/
/**
* @method appendChild
* <p>Appends the node <code>newChild</code> as a child of this node.</p>
* @description <p>On iOS, <code>appendChild</code> is supported on {@link Titanium.XML.Element Element}
nodes <strong>only</strong>.</p>
* @param {Titanium.XML.Node} newChild
<p>New node to append.</p>
* @returns {Titanium.XML.Node}Newly-appended node.
*/
/**
* @method hasChildNodes
* <p>Returns <code>true</code> if this node has child nodes.</p>
* @returns {Boolean}True if this node has children, false if it does not.
*/
/**
* @method cloneNode
* <p>Returns a duplicate of this node.</p>
* @param {Boolean} deep
<p>Whether or not to perform a deep copy of this node.</p>
* @returns {Titanium.XML.Node}Cloned node.
*/
/**
* @method normalize
* <p>Normalizes text and attribute nodes in this node's child hierarchy.</p>
* @platform android 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @method isSupported
* <p>Tests whether the DOM implementation supports a specific feature.</p>
* @param {String} feature
<p>Name of the feature.</p>
* @param {String} version
<p>Version number of the feature.</p>
* @returns {Boolean}True if the feature is supported, false if it is not.
*/
/**
* @method hasAttributes
* <p>Returns <code>true</code> if this node has attributes.</p>
* @returns {Boolean}True if this node has attributes, false if it does not.
*/
/**
* @method getNodeValue
* <p>Gets the value of the {@link Titanium.XML.Node#property-nodeValue} property.</p>
* @returns {String}
*/
/**
* @method setNodeValue
* <p>Sets the value of the {@link Titanium.XML.Node#property-nodeValue} property.</p>
* @param {String} nodeValue
<p>New value for the property.</p>
*/
/**
* @method getPrefix
* <p>Gets the value of the {@link Titanium.XML.Node#property-prefix} property.</p>
* @returns {String}
*/
/**
* @method setPrefix
* <p>Sets the value of the {@link Titanium.XML.Node#property-prefix} property.</p>
* @param {String} prefix
<p>New value for the property.</p>
*/
/**
* @method getNodeName
* <p>Gets the value of the {@link Titanium.XML.Node#property-nodeName} property.</p>
* @returns {String}
*/
/**
* @method getNodeType
* <p>Gets the value of the {@link Titanium.XML.Node#property-nodeType} property.</p>
* @returns {Number}
*/
/**
* @method getParentNode
* <p>Gets the value of the {@link Titanium.XML.Node#property-parentNode} property.</p>
* @returns {Titanium.XML.Node}
*/
/**
* @method getChildNodes
* <p>Gets the value of the {@link Titanium.XML.Node#property-childNodes} property.</p>
* @returns {Titanium.XML.NodeList}
*/
/**
* @method getFirstChild
* <p>Gets the value of the {@link Titanium.XML.Node#property-firstChild} property.</p>
* @returns {Titanium.XML.Node}
*/
/**
* @method getLastChild
* <p>Gets the value of the {@link Titanium.XML.Node#property-lastChild} property.</p>
* @returns {Titanium.XML.Node}
*/
/**
* @method getPreviousSibling
* <p>Gets the value of the {@link Titanium.XML.Node#property-previousSibling} property.</p>
* @returns {Titanium.XML.Node}
*/
/**
* @method getNextSibling
* <p>Gets the value of the {@link Titanium.XML.Node#property-nextSibling} property.</p>
* @returns {Titanium.XML.Node}
*/
/**
* @method getAttributes
* <p>Gets the value of the {@link Titanium.XML.Node#property-attributes} property.</p>
* @returns {Titanium.XML.NamedNodeMap}
*/
/**
* @method getOwnerDocument
* <p>Gets the value of the {@link Titanium.XML.Node#property-ownerDocument} property.</p>
* @returns {Titanium.XML.Document}
*/
/**
* @method getNamespaceURI
* <p>Gets the value of the {@link Titanium.XML.Node#property-namespaceURI} property.</p>
* @returns {String}
*/
/**
* @method getLocalName
* <p>Gets the value of the {@link Titanium.XML.Node#property-localName} property.</p>
* @returns {String}
*/
/**
* @method setLocalName
* <p>Sets the value of the {@link Titanium.XML.Node#property-localName} property.</p>
* @param {String} localName
<p>New value for the property.</p>
*/
/**
* @method getText
* <p>Gets the value of the {@link Titanium.XML.Node#property-text} property.</p>
* @deprecated 2.0.0 Use <Titanium.XML.Node.textContent> instead.
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @method getTextContent
* <p>Gets the value of the {@link Titanium.XML.Node#property-textContent} property.</p>
* @returns {String}
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @property ATTRIBUTE_NODE
* @type Number
* @readonly
* <p>Used with {@link Titanium.XML.Node#property-nodeType nodeType} to identify an
{@link Titanium.XML.Attr Attr} node. </p>
* <p><b>Constant value:</b>2</p>
*/
/**
* @property CDATA_SECTION_NODE
* @type Number
* @readonly
* <p>Used with {@link Titanium.XML.Node#property-nodeType nodeType} to identify a
{@link Titanium.XML.CDATASection CDATASection} node. </p>
* <p><b>Constant value:</b>4</p>
*/
* @property COMMENT_NODE
* @type Number
* @readonly
* <p>Used with {@link Titanium.XML.Node#property-nodeType nodeType} to identify a
{@link Titanium.XML.Comment Comment} node. </p>
* <p><b>Constant value:</b>8</p>
*/
/**
* @property DOCUMENT_FRAGMENT_NODE
* @type Number
* @readonly
* <p>Used with {@link Titanium.XML.Node#property-nodeType nodeType} to identify a
{@link Titanium.XML.DocumentFragment DocumentFragment} node. </p>
* <p><b>Constant value:</b>11</p>
*/
/**
* @property DOCUMENT_NODE
* @type Number
* @readonly
* <p>Used with {@link Titanium.XML.Node#property-nodeType nodeType} to identify a
{@link Titanium.XML.Document Document} node. </p>
* <p><b>Constant value:</b>9</p>
*/
/**
* @property DOCUMENT_TYPE_NODE
* @type Number
* @readonly
* <p>Used with {@link Titanium.XML.Node#property-nodeType nodeType} to identify a
{@link Titanium.XML.DocumentType DocumentType} node. </p>
* <p><b>Constant value:</b>10</p>
*/
/**
* @property ELEMENT_NODE
* @type Number
* @readonly
* <p>Used with {@link Titanium.XML.Node#property-nodeType nodeType} to identify an
{@link Titanium.XML.Element Element} node. </p>
* <p><b>Constant value:</b>1</p>
*/
/**
* @property ENTITY_NODE
* @type Number
* @readonly
* <p>Used with {@link Titanium.XML.Node#property-nodeType nodeType} to identify an
{@link Titanium.XML.Entity Entity} node. </p>
* <p><b>Constant value:</b>6</p>
*/
/**
* @property ENTITY_REFERENCE_NODE
* @type Number
* @readonly
* <p>Used with {@link Titanium.XML.Node#property-nodeType nodeType} to identify an
{@link Titanium.XML.EntityReference EntityReference} node. </p>
* <p><b>Constant value:</b>5</p>
*/
/**
* @property NOTATION_NODE
* @type Number
* @readonly
* <p>Used with {@link Titanium.XML.Node#property-nodeType nodeType} to identify a
{@link Titanium.XML.Notation Notation} node. </p>
* <p><b>Constant value:</b>12</p>
*/
/**
* @property PROCESSING_INSTRUCTION_NODE
* @type Number
* @readonly
* <p>Used with {@link Titanium.XML.Node#property-nodeType nodeType} to identify a
{@link Titanium.XML.ProcessingInstruction ProcessingInstruction} node. </p>
* <p><b>Constant value:</b>7</p>
*/
/**
* @property TEXT_NODE
* @type Number
* @readonly
* <p>Used with {@link Titanium.XML.Node#property-nodeType nodeType} to identify a
{@link Titanium.XML.Text Text} node. </p>
* <p><b>Constant value:</b>3</p>
*/
/**
* @property nodeValue
* @type String
* <p>Content (value) of this node.</p>
* @description <p>As defined in the DOM specification, the node value is always <code>null</code> for
Document, DocumentFragment, DocumentType, Element, Entity, EntityReference, and
Notation nodes.</p>
*/
/**
* @property prefix
* @type String
* <p>Namespace prefix of this node.</p>
* @description <p>Read-only on iOS, read-write on other platforms.</p>
*/
/**
* @property nodeName
* @type String
* @readonly
* <p>Name of this node.</p>
* @description <p>Certain node types have constant values defined by the DOM specification:</p>
<ul>
<li>Text node: <code>#text</code></li>
<li>Comment node: <code>#comment</code></li>
<li>CDATA section node: <code>#cdata-section</code></li>
<li>Document node: <code>#document</code></li>
<li>Document fragment node: <code>#document-fragment</code></li>
</ul>
*/
/**
* @property nodeType
* @type Number
* @readonly
* <p>This node's type. One of <code>ELEMENT_NODE</code>, <code>ATTRIBUTE_NODE</code>, <code>TEXT_NODE</code>, <code>CDATA_SECTION_NODE</code>,
<code>ENTITY_REFERENCE_NODE</code>, <code>ENTITY_NODE</code>, <code>PROCESSING_INSTRUCTION_NODE</code>, <code>COMMENT_NODE</code>,
<code>DOCUMENT_NODE</code>, <code>DOCUMENT_TYPE_NODE</code>, <code>DOCUMENT_FRAGMENT_NODE</code>, <code>NOTATION_NODE</code>.</p>
*/
/**
* @property parentNode
* @type Titanium.XML.Node
* @readonly
* <p>This node's parent node.</p>
*/
/**
* @property childNodes
* @type Titanium.XML.NodeList
* @readonly
* <p>A {@link Titanium.XML.NodeList} of this node's children.</p>
*/
/**
* @property firstChild
* @type Titanium.XML.Node
* @readonly
* <p>This node's first child.</p>
*/
/**
* @property lastChild
* @type Titanium.XML.Node
* @readonly
* <p>This node's last child.</p>
*/
/**
* @property previousSibling
* @type Titanium.XML.Node
* @readonly
* <p>This node's previous sibling.</p>
*/
/**
* @property nextSibling
* @type Titanium.XML.Node
* @readonly
* <p>This node's next sibling.</p>
*/
/**
* @property attributes
* @type Titanium.XML.NamedNodeMap
* @readonly
* <p>A map of this node's attributes.</p>
* @description <p>As defined by the DOM specification, only {@link Titanium.XML.Element Element} nodes have attributes.
For all other node types, this property is always <code>null</code>.</p>
*/
/**
* @property ownerDocument
* @type Titanium.XML.Document
* @readonly
* <p>This node's owning document.</p>
* @description <p>Note that a node always has an owning document, even if it is not part of the
document tree. </p>
<p>For more on node ownership, see <a href="http://www.w3.org/DOM/faq.html#ownerdoc">ownerDocument issues</a>
in the W3C DOM FAQ.</p>
*/
/**
* @property namespaceURI
* @type String
* @readonly
* <p>Namespace URI of this node.</p>
*/
/**
* @property localName
* @type String
* <p>Local part of the qualified name of this node.</p>
* @description <p>The local part of the qualified name that comes after the colon. That is,
the name without the namespace prefix.</p>
*/
/**
* @property text
* @type String
* @readonly
* <p>Content (value) of all text nodes within this node.</p>
* @deprecated 2.0.0 Use <Titanium.XML.Node.textContent> instead.
* @platform iphone 0.8
* @platform ipad 0.8
* @platform windowsphone 4.1.0
*/
/**
* @property textContent
* @type String
* @readonly
* <p>Content (value) of all text nodes within this node.</p>
* @description <p>On Android, <code>textContent</code> is supported on {@link Titanium.XML.Element Element} and
{@link Titanium.XML.Text Text} nodes only.</p>
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
*/
/**
* @class Titanium.XML.NodeList
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/NodeList.yml
* <p>A list of {@link Titanium.XML.Node} objects. Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-536297177">DOM Level 2 API</a> on Android and iOS. Exposes the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-536297177">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @method item
* <p>Returns the {@link Titanium.XML.Node} object at the specified index.</p>
* @param {Number} index
<p>The index of the node to retrieve. Indexing starts at 0.</p>
* @returns {Titanium.XML.Node}The node at the index, or `null` if the index is out of bounds.
*/
/**
* @method getLength
* <p>Gets the value of the {@link Titanium.XML.NodeList#property-length} property.</p>
* @returns {Number}
*/
/**
* @property length
* @type Number
* @readonly
* <p>The length of the node list.</p>
*/
/**
* @class Titanium.XML.Notation
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/Notation.yml
* <p>Represents a notation declared in the DTD. Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-5431D1B9">DOM Level 2 API</a> on Android and iOS. Exposes the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-5431D1B9">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @method getPublicId
* <p>Gets the value of the {@link Titanium.XML.Notation#property-publicId} property.</p>
* @returns {String}
*/
/**
* @method getSystemId
* <p>Gets the value of the {@link Titanium.XML.Notation#property-systemId} property.</p>
* @returns {String}
*/
/**
* @property publicId
* @type String
* @readonly
* <p>The public identifier of this notation. If the public identifier was not specified, this is <code>null</code>.</p>
*/
/**
* @property systemId
* @type String
* @readonly
* <p>The system identifier of this notation. If the system identifier was not specified, this is <code>null</code>.</p>
*/
/**
* @class Titanium.XML.ProcessingInstruction
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/ProcessingInstruction.yml
* <p>A way to keep processor-specific information in the text of the document. Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1004215813">DOM Level 2 API</a> on Android and iOS. Exposes the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1004215813">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @method getData
* <p>Gets the value of the {@link Titanium.XML.ProcessingInstruction#property-data} property.</p>
* @returns {String}
*/
/**
* @method setData
* <p>Sets the value of the {@link Titanium.XML.ProcessingInstruction#property-data} property.</p>
* @param {String} data
<p>New value for the property.</p>
*/
/**
* @method getTarget
* <p>Gets the value of the {@link Titanium.XML.ProcessingInstruction#property-target} property.</p>
* @returns {String}
*/
/**
* @property data
* @type String
* <p>Retrieve the content of this processing instruction. This from the first non white space character after the target to the character immediatly preceding the ?>. When setting a processing instruction, a DOMException may be thrown on an invalid instruction.</p>
*/
/**
* @property target
* @type String
* @readonly
* <p>Retrieve the target of this processing instruction. XML defines this as being the first token following the markup that begins the processing instruction.</p>
*/
/**
* @class Titanium.XML.Text
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.XML.CharacterData
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/Text.yml
* <p>Represents the textual content of an {@link Titanium.XML.Element} or {@link Titanium.XML.Attr} Implements the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1312295772">DOM Level 2 API</a> on Android and iOS. Exposes the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1312295772">DOM Level 3 API</a> implementation on Mobile Web.</p>
*/
/**
* @method splitText
* <p>Breaks this node into two nodes at the specified by offset, and returns a new node of the same type, which contains all the content at and after the offset point. Throws an exception if the specified offset is negative or if this node is read only.</p>
* @param {Number} offset
<p>The offset at which to split, starting from 0.</p>
* @returns {Titanium.XML.Text}The new node, of the same type as this node
*/
/**
* @method getTextContent
* <p>Gets the value of the {@link Titanium.XML.Text#property-textContent} property.</p>
* @returns {String}
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @property textContent
* @type String
* @readonly
* <p>Content (value) of all text nodes within this node.</p>
* @description <p>On Android, <code>textContent</code> is supported on {@link Titanium.XML.Element Element} and
{@link Titanium.XML.Text Text} nodes only.</p>
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
*/
/**
* @class Titanium.XML
* @platform android 0.9
* @platform iphone 0.9
* @platform ipad 0.9
* @platform mobileweb 1.8
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/XML/XML.yml
* <p>The top level XML module. The XML module is used for parsing and processing XML-based content.</p>
* @description <p>The API for this module is based on the W3C DOM specification.</p>
<p>Android and iOS implement the <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html">DOM Level 2</a> specification
with some non-standard extensions, which are documented in the appropriate places.</p>
<p>Both iOS and Android lack DTD support.</p>
<p>Mobile Web directly exposes the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html">DOM Level 3</a>
implementation in the browser. New features introduced in DOM Level 3 are not documented here
for brevity. For information on these features, please use the W3C documentation.</p>
*/
/**
* @method parseString
* <p>Parses an XML string into a {@link Titanium.XML.Document} object.</p>
* @description <p>Throws an exception if the string can't be parsed into a valid document.</p>
* @param {String} xml
<p>XML content as a string.</p>
* @returns {Titanium.XML.Document}
*/
/**
* @method serializeToString
* <p>Serializes a {@link Titanium.XML.Node Node} object into a string.</p>
* @param {Titanium.XML.Node} node
<p>XML {@link Titanium.XML.Node Node} to serialize.</p>
* @returns {String}
*/
/**
* @class Titanium.Yahoo
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @extends Titanium.Module
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Yahoo/Yahoo.yml
* <p>The top level Yahoo module. The Yahoo module is used for accessing Yahoo related API services.</p>
*/
/**
* @method yql
* <p>invoke a Yahoo YQL query</p>
* @description <p>On Mobile Web, only public YQL queries are supported. Public YQL queries do not require a consumer key and shared secret key.</p>
* @param {String} yql
<p>the YQL query to execute</p>
* @param {Callback<YQLResponse>} callback
<p>the function to execute when the query completes.</p>
*/
/**
* @class YQLResponse
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends ErrorResponse
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Yahoo/Yahoo.yml
* <p>Properties passed to a yql callback to report a success or failure.</p>
*/
/**
* @property error
* @type String
* <p>Error message, if any returned.</p>
* @description <p>Will be undefined if <code>success</code> is <code>true</code>.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property code
* @type Number
* <p>Error code. Returns 0 if <code>success</code> is <code>true</code>.</p>
* @description <p>Error code will be 0 if <code>success</code> is <code>true</code>, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.</p>
* @platform android 3.1.0
* @platform iphone 3.1.0
* @platform ipad 3.1.0
* @platform mobileweb 3.1.0
*/
/**
* @property message
* @type String
* <p>Error message, if any returned. Use <code>error</code> instead</p>
* @deprecated 3.1.0
* @description <p>Will be undefined if <code>success</code> is <code>true</code>.</p>
*/
/**
* @property data
* @type Object
* <p>The data payload received from the YQL.</p>
* @description <p>May be undefined if <code>success</code> is <code>false</code>.</p>
*/
/**
* @class Dictionary
* @platform android 0.8
* @platform iphone 0.8
* @platform ipad 0.8
* @platform mobileweb 1.8
* @pseudo
* @extends
* @editurl https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/common/Dictionary.yml
* <p>Plain JavaScript object.</p>
* @description <p>The type <code>Dictionary</code> is used to describe a plain JavaScript object used to pass a
set of properties.</p>
<p>The type <code>Dictionary<</code> <em>Type</em> <code>></code> is used to describe a dictionary
where the properties correspond to the properties of the named <em>Type</em>. So
<code>Dictionary<</code> <code>Titanium.UI.Window</code> <code>></code> refers to a dictionary of <code>Window</code>
properties. </p>
<p>Property dictionaries are used extensively in the Titanium API, especially when
creating objects. For example, You can specify the initial properties for
a new window by passing a <code>Dictionary<</code> <code>Titanium.UI.Window</code> <code>></code> object to the
{@link Titanium.UI#method-createWindow createWindow} method:</p>
<pre><code>var window = Ti.UI.createWindow({
title: "Test",
fullscreen: true,
backgroundColor: '#aea'
});
</code></pre>
*/
/**
* @class Titanium.App.Windows.BackgroundService
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* <p>Background Service for Windows</p>
* @description <p>BackgroundService provides a basic way to register background tasks.</p>
<p>// Clear all tasks that is associated with this app
Ti.App.Windows.BackgroundService.unregisterAllTasks();</p>
<p>// Register new task that is invoked for each 15 minutes interval.
var task = Ti.App.Windows.BackgroundService.registerTimerTask('ComExampleTest.BackgroundServiceTask', 15, false);
if (task) {
Ti.API.info("Background task is registered: task id=" + task.taskId);
}</p>
<p>For more information see <a href="http://docs.appcelerator.com/platform/latest/#!/guide/Windows_Background_Service_Quick_Start">Windows Background Service Quick Start</a></p>
*/
/**
* @method registerTimerTask
* <p>Register a time event that triggers a background task to run.</p>
* @description <p>Provides a way to register TimeTrigger that runs in background that is invoked with specific time interval.</p>
* @param {String} entryPoint
<p>Callback C++/CX class name that is invoked on time event. Callback class should implement Windows::ApplicationModel::Background::IBackgroundTask.</p>
* @param {Number} freshnessTime
<p>Interval of a time event in minutes. Windows requires at least 15 minutes.</p>
* @param {Boolean} oneShot
<p>Sets whether the time event trigger will be used only once or each time the FreshnessTime interval elapses.</p>
* @returns {Titanium.App.Windows.BackgroundServiceTask}
*/
/**
* @method registerPushNotificationTask
* <p>Register a push notification event that triggers a background task to run.</p>
* @description <p>Provides a way to register PushNotificationTrigger that runs in background that is invoked along with push notification.</p>
* @param {String} entryPoint
<p>Callback C++/CX class name that is invoked on time event. Callback class should implement Windows::ApplicationModel::Background::IBackgroundTask.</p>
* @returns {Titanium.App.Windows.BackgroundServiceTask}
*/
/**
* @method unregisterTask
* <p>Unregisters registered background task associated with this application.</p>
* @param {Number/Titanium.App.Windows.BackgroundServiceTask} task
<p>Task id as number, or BackgroundServiceTask object to unregister.</p>
* @returns {void}
*/
/**
* @method unregisterAllTasks
* <p>Unregisters all registered background task associated with this application.</p>
* @returns {void}
*/
/**
* @class Titanium.App.Windows.BackgroundServiceTask
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* <p>Background Task for Windows</p>
* @description <p>BackgroundServiceTask represents background task for Windows.</p>
<p>// Register new task that is invoked for each 15 minutes interval.
var task = Ti.App.Windows.BackgroundService.registerTimerTask('ComExampleTest.BackgroundServiceTask', 15, false);
if (task) {
Ti.API.info("Background task is registered: task id=" + task.taskId);</p>
<p>//
// Unregister task. Equivalent to
//
// Ti.App.Windows.BackgroundService.unregisterTask(task);
// or
// Ti.App.Windows.BackgroundService.unregisterTask(task.taskId);
//
task.unregister();</p>
<p>}</p>
<p>For more information see <a href="http://docs.appcelerator.com/platform/latest/#!/guide/Windows_Background_Service_Quick_Start">Windows Background Service Quick Start</a></p>
*/
/**
* @method unregister
* <p>Unregisters this background task associated with this application.</p>
* @returns {void}
*/
/**
* @method getTaskId
* <p>Gets the value of the {@link Titanium.App.Windows.BackgroundServiceTask#property-taskId} property.</p>
* @returns {Number}
*/
/**
* @method setTaskId
* <p>Sets the value of the {@link Titanium.App.Windows.BackgroundServiceTask#property-taskId} property.</p>
* @param {Number} taskId
<p>New value for the property.</p>
*/
/**
* @property taskId
* @type Number
* <p>Identification number for this task</p>
*/
/**
* @class Titanium.Network.Socket.UDP
* @platform windowsphone 4.1.0
* @extends Titanium.IOStream
* <p>UDP socket.</p>
* @description <p>Most socket operations are asynchronous. When you create a socket, you can define
callback funtions to receive the results of API calls, as well as to handle incoming
data.</p>
<p>For example, for a client-side socket, you define
{@link Titanium.Network.Socket.UDP#property-started started} and
{@link Titanium.Network.Socket.UDP#property-error error} callback functions.</p>
<p>A familiarity with the basics of BSD socket programming is a recommended before using
sockets with Titanium.</p>
<p>Use the {@link Titanium.Network.Socket#method-createUDP} method to create a UDP socket.</p>
* <h3>Examples</h3>
<h4>Simple UDP Socket</h4>
<pre><code>var socket = Ti.Network.Socket.createUDP();
socket.addEventListener('started', function (e) {
Ti.API.info('Socket started');
});
socket.addEventListener('data', function (e) {
Ti.API.info('Socket received data: '+e.stringData);
Ti.API.info('bytes: '+e.bytesData);
Ti.API.info('address: '+e.address);
Ti.API.info('port: '+e.port);
});
socket.addEventListener('error',function (e) {
Ti.API.info('Socket error: '+e);
});
socket.start({ port: 6100 });
for (var i = 0; i < 5; ++i) {
socket.sendString({ data: "Hello, World!"});
socket.sendBytes({ data: [73, 116, 32, 119, 111, 114, 107, 115, 33] });
}</code></pre>
*/
/**
* @method start
* <p>Will start up the local UDP socket.</p>
* @param {Number} port
<p>The local port number.</p>
*/
/**
* @method stop
* <p>Will tear down the local UDP socket.</p>
*/
/**
* @method sendString
* <p>Will send the string as a UDP packet to designated host and port.</p>
* @param {Number} port
<p>The local port number.</p>
* @param {String} host
<p>The host address to send the UDP packet to.</p>
* @param {String} data
<p>The data to send in the UDP packet.</p>
*/
/**
* @method sendBytes
* <p>Will send the bytes as a UDP packet to designated host and port.</p>
* @param {Number} port
<p>The local port number.</p>
* @param {String} host
<p>The host address to send the UDP packet to.</p>
* @param {Array<Number>} data
<p>The data to send in the UDP packet.</p>
*/
/**
* @method getPort
* <p>Gets the value of the {@link Titanium.Network.Socket.UDP#property-port} property.</p>
* @returns {Number}
*/
/**
* @method setPort
* <p>Sets the value of the {@link Titanium.Network.Socket.UDP#property-port} property.</p>
* @param {Number} port
<p>New value for the property.</p>
*/
/**
* @method getStarted
* <p>Gets the value of the {@link Titanium.Network.Socket.UDP#property-started} property.</p>
* @returns {Callback<void>}
*/
/**
* @method setStarted
* <p>Sets the value of the {@link Titanium.Network.Socket.UDP#property-started} property.</p>
* @param {Callback<void>} started
<p>New value for the property.</p>
*/
/**
* @method getData
* <p>Gets the value of the {@link Titanium.Network.Socket.UDP#property-data} property.</p>
* @returns {Callback<DataCallbackArgs>}
*/
/**
* @method setData
* <p>Sets the value of the {@link Titanium.Network.Socket.UDP#property-data} property.</p>
* @param {Callback<DataCallbackArgs>} data
<p>New value for the property.</p>
*/
/**
* @method getError
* <p>Gets the value of the {@link Titanium.Network.Socket.UDP#property-error} property.</p>
* @returns {Callback<FailureResponse>}
*/
/**
* @method setError
* <p>Sets the value of the {@link Titanium.Network.Socket.UDP#property-error} property.</p>
* @param {Callback<FailureResponse>} error
<p>New value for the property.</p>
*/
/**
* @property port
* @type Number
* <p>The port to connect to or listen on.</p>
*/
/**
* @property started
* @type Callback<void>
* <p>Callback to be fired when the local UDP socket enters the "bound" state.</p>
*/
/**
* @property data
* @type Callback<DataCallbackArgs>
* <p>Callback to be fired when data arrives on the UDP socket.</p>
*/
/**
* @property error
* @type Callback<FailureResponse>
* <p>Callback to be fired if an error occurs during the UDP sockect session.</p>
*/
/**
* @class DataCallbackArgs
* @platform android 4.1.0
* @platform iphone 4.1.0
* @platform ipad 4.1.0
* @platform mobileweb 4.1.0
* @pseudo
* @extends
* <p>Argument object passed to the data callback when data arrives on the
{@link Titanium.Network.Socket.UDP#property-data UDP socket}.</p>
*/
/**
* @property stringData
* @type String
* <p>The data returned as a string.</p>
*/
/**
* @property bytesData
* @type Number[]
* <p>The data returned as an array of bytes.</p>
*/
/**
* @property address
* @type String
* <p>The remote host address where the data came from.</p>
*/
/**
* @property port
* @type String
* <p>The local port on which the data arrived.</p>
*/
/**
* @class Titanium.UI.Windows.AppBarButton
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* <p>Windows application bar button.</p>
* @description <p>To create an application bar button, use the
{@link Titanium.UI.Windows#method-createAppBarButton Titanium.UI.Windows.createAppBarButton()} method
and set the <code>icon</code> property to one of the <code>Titanium.UI.Windows.SystemIcon</code> constants.</p>
<pre><code>var addButton = Ti.UI.Windows.createAppBarButton({
icon: Titanium.UI.Windows.SystemIcon.ADD
});
</code></pre>
<p>Then, add the button to a <code>Titanium.UI.Windows.CommandBar</code> object.</p>
*/
/**
* @event click
* <p>Fired when the user presses the button.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method getIcon
* <p>Gets the value of the {@link Titanium.UI.Windows.AppBarButton#property-icon} property.</p>
* @returns {Number}
*/
/**
* @method setIcon
* <p>Sets the value of the {@link Titanium.UI.Windows.AppBarButton#property-icon} property.</p>
* @param {Number} icon
<p>New value for the property.</p>
*/
/**
* @method getTouchEnabled
* <p>Gets the value of the {@link Titanium.UI.Windows.AppBarButton#property-touchEnabled} property.</p>
* @returns {Boolean}
*/
/**
* @method setTouchEnabled
* <p>Sets the value of the {@link Titanium.UI.Windows.AppBarButton#property-touchEnabled} property.</p>
* @param {Boolean} touchEnabled
<p>New value for the property.</p>
*/
/**
* @property icon
* @type Number
* <p>Icon to display for the button.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Windows.SystemIcon#property-ACCEPT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ACCOUNT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ADD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ADDFRIEND}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ADMIN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ALIGNCENTER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ALIGNLEFT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ALIGNRIGHT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ALLAPPS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ATTACH}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ATTACHCAMERA}
<li> {@link Titanium.UI.Windows.SystemIcon#property-AUDIO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BACK}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BACKTOWINDOW}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BLOCKCONTACT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BOLD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BOOKMARKS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BROWSEPHOTOS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BULLETS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CALCULATOR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CALENDAR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CALENDARDAY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CALENDARREPLY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CALENDARWEEK}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CAMERA}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CANCEL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CAPTION}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CELLPHONE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CHARACTER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CLEAR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CLEARSELECTION}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CLOCK}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CLOSEDCAPTION}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CLOSEPANE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-COMMENT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CONTACT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CONTACT2}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CONTACTINFO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CONTACTPRESENCE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-COPY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CROP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CUT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DELETE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DIRECTIONS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DISABLEUPDATES}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DISCONNECTDRIVE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DISLIKE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DOCKBOTTOM}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DOCKLEFT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DOCKRIGHT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DOCUMENT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DOWNLOAD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-EDIT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-EMOJI}
<li> {@link Titanium.UI.Windows.SystemIcon#property-EMOJI2}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FAVORITE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FILTER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FIND}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FLAG}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FOLDER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FONT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FONTCOLOR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FONTDECREASE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FONTINCREASE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FONTSIZE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FORWARD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FOURBARS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FULLSCREEN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-GLOBE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-GO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-GOTOSTART}
<li> {@link Titanium.UI.Windows.SystemIcon#property-GOTOTODAY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-HANGUP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-HELP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-HIDEBCC}
<li> {@link Titanium.UI.Windows.SystemIcon#property-HIGHLIGHT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-HOME}
<li> {@link Titanium.UI.Windows.SystemIcon#property-IMPORT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-IMPORTALL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-IMPORTANT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ITALIC}
<li> {@link Titanium.UI.Windows.SystemIcon#property-KEYBOARD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-LEAVECHAT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-LIBRARY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-LIKE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-LIKEDISLIKE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-LINK}
<li> {@link Titanium.UI.Windows.SystemIcon#property-LIST}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAIL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAILFILLED}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAILFORWARD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAILREPLY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAILREPLYALL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MANAGE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAPDRIVE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAPPIN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MEMO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MESSAGE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MICROPHONE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MORE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MOVETOFOLDER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MUSICINFO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MUTE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-NEWFOLDER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-NEWWINDOW}
<li> {@link Titanium.UI.Windows.SystemIcon#property-NEXT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ONEBAR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-OPENFILE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-OPENLOCAL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-OPENPANE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-OPENWITH}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ORIENTATION}
<li> {@link Titanium.UI.Windows.SystemIcon#property-OTHERUSER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-OUTLINESTAR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PAGE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PAGE2}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PASTE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PAUSE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PEOPLE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PERMISSIONS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PHONE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PHONEBOOK}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PICTURES}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PIN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PLACEHOLDER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PLAY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-POSTUPDATE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PREVIEW}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PREVIEWLINK}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PREVIOUS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PRIORITY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PROTECTEDDOCUMENT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-READ}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REDO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REFRESH}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REMOTE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REMOVE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-RENAME}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REPAIR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REPEATALL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REPEATONE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REPORTHACKED}
<li> {@link Titanium.UI.Windows.SystemIcon#property-RESHARE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ROTATE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ROTATECAMERA}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SAVE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SAVELOCAL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SCAN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SELECTALL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SEND}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SETLOCKSCREEN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SETTILE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SETTING}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SHOP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SHOWBCC}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SHOWRESULTS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SHUFFLE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SLIDESHOW}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SOLIDSTAR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SORT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-STOP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-STOPSLIDESHOW}
<li> {@link Titanium.UI.Windows.SystemIcon#property-STREET}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SWITCH}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SWITCHAPPS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SYNC}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SYNCFOLDER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-TAG}
<li> {@link Titanium.UI.Windows.SystemIcon#property-TARGET}
<li> {@link Titanium.UI.Windows.SystemIcon#property-THREEBARS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-TOUCHPOINTER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-TRIM}
<li> {@link Titanium.UI.Windows.SystemIcon#property-TWOBARS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-TWOPAGE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UNDERLINE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UNDO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UNFAVORITE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UNPIN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UNSYNCFOLDER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UPLOAD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-VIDEO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-VIDEOCHAT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-VIEW}
<li> {@link Titanium.UI.Windows.SystemIcon#property-VIEWALL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-VOLUME}
<li> {@link Titanium.UI.Windows.SystemIcon#property-WEBCAM}
<li> {@link Titanium.UI.Windows.SystemIcon#property-WORLD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ZEROBARS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ZOOM}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ZOOMIN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ZOOMOUT}
</ul></p>
*/
/**
* @property [touchEnabled=true]
* @type Boolean
* <p>Determines whether the view should receive touch events.</p>
*/
/**
* @class Titanium.UI.Windows.AppBarSeparator
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* <p>Vertical bar to divide controls in a Windows application bar</p>
* @description <p>To create an application bar separator, use the
{@link Titanium.UI.Windows#method-createAppBarSeparator Titanium.UI.Windows.createAppBarSeparator()} method.</p>
<p>The separator only appears on Windows Store applications.</p>
*/
/**
* @class Titanium.UI.Windows.AppBarToggleButton
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* <p>Toggle button for the Windows application bar.</p>
* @description <p>Unlike the {@link Titanium.UI.Windows.AppBarButton}, the toggle button has a swtich state, like a
checkbox.</p>
<p>To create an application bar button, use the
{@link Titanium.UI.Windows#method-createAppBarToggleButton Titanium.UI.Windows.createAppBarToggleButton()} method
and set the <code>icon</code> property to one of the <code>Titanium.UI.Windows.SystemIcon</code> constants.</p>
<pre><code>var likeButton = Ti.UI.Windows.createAppBarToggleButton({
icon: Titanium.UI.Windows.SystemIcon.LIKEDISLIKE
});
</code></pre>
<p>Then, add the button to a <code>Titanium.UI.Windows.CommandBar</code> object.</p>
*/
/**
* @event click
* <p>Fired when the user presses the button.</p>
* @param {Boolean} checked
<p>Indicates if the button is checked or not.</p>
* @param {Boolean} (android iphone ipad) bubbles
<p>True if the event will try to bubble up if possible.</p>
* @param {Boolean} (android iphone ipad) cancelBubble
<p>Set to true to stop the event from bubbling.</p>
* @param {Object} (android iphone ipad mobileweb windowsphone) source
<p>Source object that fired the event.</p>
* @param {String} (android iphone ipad mobileweb windowsphone) type
<p>Name of the event fired.</p>
*/
/**
* @method getChecked
* <p>Gets the value of the {@link Titanium.UI.Windows.AppBarToggleButton#property-checked} property.</p>
* @returns {Boolean}
*/
/**
* @method setChecked
* <p>Sets the value of the {@link Titanium.UI.Windows.AppBarToggleButton#property-checked} property.</p>
* @param {Boolean} checked
<p>New value for the property.</p>
*/
/**
* @method getIcon
* <p>Gets the value of the {@link Titanium.UI.Windows.AppBarToggleButton#property-icon} property.</p>
* @returns {Number}
*/
/**
* @method setIcon
* <p>Sets the value of the {@link Titanium.UI.Windows.AppBarToggleButton#property-icon} property.</p>
* @param {Number} icon
<p>New value for the property.</p>
*/
/**
* @method getTouchEnabled
* <p>Gets the value of the {@link Titanium.UI.Windows.AppBarToggleButton#property-touchEnabled} property.</p>
* @returns {Boolean}
*/
/**
* @method setTouchEnabled
* <p>Sets the value of the {@link Titanium.UI.Windows.AppBarToggleButton#property-touchEnabled} property.</p>
* @param {Boolean} touchEnabled
<p>New value for the property.</p>
*/
/**
* @property [checked=false]
* @type Boolean
* <p>Indicates if the button is toggled on or off.</p>
*/
/**
* @property icon
* @type Number
* <p>Icon to display for the button.</p>
*
<p>This API can be assigned the following constants:<ul>
<li> {@link Titanium.UI.Windows.SystemIcon#property-ACCEPT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ACCOUNT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ADD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ADDFRIEND}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ADMIN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ALIGNCENTER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ALIGNLEFT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ALIGNRIGHT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ALLAPPS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ATTACH}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ATTACHCAMERA}
<li> {@link Titanium.UI.Windows.SystemIcon#property-AUDIO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BACK}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BACKTOWINDOW}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BLOCKCONTACT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BOLD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BOOKMARKS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BROWSEPHOTOS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-BULLETS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CALCULATOR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CALENDAR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CALENDARDAY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CALENDARREPLY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CALENDARWEEK}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CAMERA}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CANCEL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CAPTION}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CELLPHONE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CHARACTER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CLEAR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CLEARSELECTION}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CLOCK}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CLOSEDCAPTION}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CLOSEPANE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-COMMENT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CONTACT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CONTACT2}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CONTACTINFO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CONTACTPRESENCE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-COPY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CROP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-CUT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DELETE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DIRECTIONS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DISABLEUPDATES}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DISCONNECTDRIVE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DISLIKE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DOCKBOTTOM}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DOCKLEFT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DOCKRIGHT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DOCUMENT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-DOWNLOAD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-EDIT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-EMOJI}
<li> {@link Titanium.UI.Windows.SystemIcon#property-EMOJI2}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FAVORITE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FILTER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FIND}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FLAG}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FOLDER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FONT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FONTCOLOR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FONTDECREASE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FONTINCREASE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FONTSIZE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FORWARD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FOURBARS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-FULLSCREEN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-GLOBE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-GO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-GOTOSTART}
<li> {@link Titanium.UI.Windows.SystemIcon#property-GOTOTODAY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-HANGUP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-HELP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-HIDEBCC}
<li> {@link Titanium.UI.Windows.SystemIcon#property-HIGHLIGHT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-HOME}
<li> {@link Titanium.UI.Windows.SystemIcon#property-IMPORT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-IMPORTALL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-IMPORTANT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ITALIC}
<li> {@link Titanium.UI.Windows.SystemIcon#property-KEYBOARD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-LEAVECHAT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-LIBRARY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-LIKE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-LIKEDISLIKE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-LINK}
<li> {@link Titanium.UI.Windows.SystemIcon#property-LIST}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAIL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAILFILLED}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAILFORWARD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAILREPLY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAILREPLYALL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MANAGE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAPDRIVE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MAPPIN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MEMO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MESSAGE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MICROPHONE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MORE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MOVETOFOLDER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MUSICINFO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-MUTE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-NEWFOLDER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-NEWWINDOW}
<li> {@link Titanium.UI.Windows.SystemIcon#property-NEXT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ONEBAR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-OPENFILE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-OPENLOCAL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-OPENPANE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-OPENWITH}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ORIENTATION}
<li> {@link Titanium.UI.Windows.SystemIcon#property-OTHERUSER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-OUTLINESTAR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PAGE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PAGE2}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PASTE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PAUSE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PEOPLE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PERMISSIONS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PHONE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PHONEBOOK}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PICTURES}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PIN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PLACEHOLDER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PLAY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-POSTUPDATE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PREVIEW}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PREVIEWLINK}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PREVIOUS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PRIORITY}
<li> {@link Titanium.UI.Windows.SystemIcon#property-PROTECTEDDOCUMENT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-READ}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REDO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REFRESH}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REMOTE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REMOVE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-RENAME}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REPAIR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REPEATALL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REPEATONE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-REPORTHACKED}
<li> {@link Titanium.UI.Windows.SystemIcon#property-RESHARE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ROTATE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ROTATECAMERA}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SAVE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SAVELOCAL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SCAN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SELECTALL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SEND}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SETLOCKSCREEN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SETTILE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SETTING}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SHOP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SHOWBCC}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SHOWRESULTS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SHUFFLE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SLIDESHOW}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SOLIDSTAR}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SORT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-STOP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-STOPSLIDESHOW}
<li> {@link Titanium.UI.Windows.SystemIcon#property-STREET}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SWITCH}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SWITCHAPPS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SYNC}
<li> {@link Titanium.UI.Windows.SystemIcon#property-SYNCFOLDER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-TAG}
<li> {@link Titanium.UI.Windows.SystemIcon#property-TARGET}
<li> {@link Titanium.UI.Windows.SystemIcon#property-THREEBARS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-TOUCHPOINTER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-TRIM}
<li> {@link Titanium.UI.Windows.SystemIcon#property-TWOBARS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-TWOPAGE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UNDERLINE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UNDO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UNFAVORITE}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UNPIN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UNSYNCFOLDER}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UP}
<li> {@link Titanium.UI.Windows.SystemIcon#property-UPLOAD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-VIDEO}
<li> {@link Titanium.UI.Windows.SystemIcon#property-VIDEOCHAT}
<li> {@link Titanium.UI.Windows.SystemIcon#property-VIEW}
<li> {@link Titanium.UI.Windows.SystemIcon#property-VIEWALL}
<li> {@link Titanium.UI.Windows.SystemIcon#property-VOLUME}
<li> {@link Titanium.UI.Windows.SystemIcon#property-WEBCAM}
<li> {@link Titanium.UI.Windows.SystemIcon#property-WORLD}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ZEROBARS}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ZOOM}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ZOOMIN}
<li> {@link Titanium.UI.Windows.SystemIcon#property-ZOOMOUT}
</ul></p>
*/
/**
* @property [touchEnabled=true]
* @type Boolean
* <p>Determines whether the view should receive touch events.</p>
*/
/**
* @class Titanium.UI.Windows.CommandBar
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* <p>A Windows application bar located at the bottom of the window.</p>
* @description <p>The command bar displays a row of buttons used to indicate additional actions the user can
perform. For Windows Store applications, right-click on the application to reveal the command
bar.</p>
<p>To create a command bar, first create buttons and separator objects using the following methods:</p>
<ul>
<li>{@link Titanium.UI.Windows#method-createAppBarButton Titanium.UI.Windows.createAppBarButton()}</li>
<li>{@link Titanium.UI.Windows#method-createAppBarToggleButton Titanium.UI.Windows.createAppBarToggleButton()}</li>
<li>{@link Titanium.UI.Windows#method-createAppBarSeparator Titanium.UI.Windows.createAppBarSeparator()} --
only appears on Windows Store applications.</li>
</ul>
<p>Then, pass an array of button and separator objects to the <code>items</code> property when creating a
command bar with the {@link Titanium.UI.Windows#method-createCommandBar Titanium.UI.Windows.createCommandBar()}
method.</p>
<p>Finally, add the command bar to a Titanium.UI.Window object.</p>
<pre><code>var backButton = Ti.UI.Windows.createAppBarButton({
icon: Ti.UI.Windows.SystemIcon.BACK
}),
likeButton = Ti.UI.Windows.createAppBarToggleButton({
icon: Ti.UI.Windows.SystemIcon.LIKEDISLIKE
}),
forwardButton = Titanium.UI.Windows.createAppBarButton({
icon: Ti.UI.Windows.SystemIcon.FORWARD
}),
commandBar = Ti.UI.Windows.createCommandBar({
items: [backButton, likeButton, forwardButton]
}),
win = Ti.UI.createWindow();
win.add(commandBar);
win.open();
</code></pre>
*/
/**
* @method getItems
* <p>Gets the value of the {@link Titanium.UI.Windows.CommandBar#property-items} property.</p>
* @returns {Object[]}
*/
/**
* @method setItems
* <p>Sets the value of the {@link Titanium.UI.Windows.CommandBar#property-items} property.</p>
* @param {Array<Object>} items
<p>New value for the property.</p>
*/
/**
* @property items
* @type Object[]
* <p>Items to display in the command bar.</p>
* @description <p>Add {@link Titanium.UI.Windows.AppBarButton} and {@link Titanium.UI.Windows.AppBarToggleButton} objects
as well as separators created with the {@link Titanium.UI.Windows#method-createAppBarSeparator} method.</p>
<p>On Windows Phone applications, up to four items may be added. If more than four items are added,
only the first four items will appear.</p>
*/
/**
* @class Titanium.UI.Windows.SystemIcon
* @platform windowsphone 4.1.0
* @extends Titanium.Proxy
* <p>A set of constants used to create Windows system buttons.</p>
* @description <p>Assign one of the constants to the <code>icon</code> property of either a
{@link Titanium.UI.Windows.AppBarButton} or {@link Titanium.UI.Windows.AppBarToggleButton}
object to create a Windows Phone system button for an application bar.</p>
<pre><code>var addButton = Ti.UI.Windows.createAppBarButton({
icon: Titanium.UI.Windows.SystemIcon.ADD
});
</code></pre>
<p>For screenshots of each system icon, refer to
<a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.symbol">Windows Dev Center: System enumeration</a>.</p>
*/
/**
* @property ACCEPT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
an <strong>Accept</strong> button.</p>
*/
/**
* @property ACCOUNT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
an <strong>Account</strong> button.</p>
*/
/**
* @property ADD
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
an <strong>Add</strong> button.</p>
*/
/**
* @property ADDFRIEND
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
an <strong>Add Friend</strong> button.</p>
*/
/**
* @property ADMIN
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
an <strong>Admin</strong> button.</p>
*/
/**
* @property ALIGNCENTER
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
an <strong>Align Center</strong> button.</p>
*/
/**
* @property ALIGNLEFT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
an <strong>Align Left</strong> button.</p>
*/
/**
* @property ALIGNRIGHT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
an <strong>Align Right</strong> button.</p>
*/
/**
* @property ALLAPPS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
an <strong>All Apps</strong> button.</p>
*/
/**
* @property ATTACH
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
an <strong>Attach</strong> button.</p>
*/
/**
* @property ATTACHCAMERA
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
an <strong>Attach Camera</strong> button.</p>
*/
/**
* @property AUDIO
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
an <strong>Audio</strong> button.</p>
*/
/**
* @property BACK
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Back</strong> button.</p>
*/
/**
* @property BACKTOWINDOW
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Back to Window</strong> button.</p>
*/
/**
* @property BLOCKCONTACT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Block Contact</strong> button.</p>
*/
/**
* @property BOLD
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Bold</strong> button.</p>
*/
/**
* @property BOOKMARKS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Bookmarks</strong> button.</p>
*/
/**
* @property BROWSEPHOTOS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Browse Photos</strong> button.</p>
*/
/**
* @property BULLETS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Bullets</strong> button.</p>
*/
/**
* @property CALCULATOR
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Calculator</strong> button.</p>
*/
/**
* @property CALENDAR
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Calendar</strong> button.</p>
*/
/**
* @property CALENDARDAY
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Calendar Day</strong> button.</p>
*/
/**
* @property CALENDARREPLY
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Calendar Reply</strong> button.</p>
*/
/**
* @property CALENDARWEEK
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Calendar Week</strong> button.</p>
*/
/**
* @property CAMERA
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Camera</strong> button.</p>
*/
/**
* @property CANCEL
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Cancel</strong> button.</p>
*/
/**
* @property CAPTION
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Caption</strong> button.</p>
*/
/**
* @property CELLPHONE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Cellphone</strong> button.</p>
*/
/**
* @property CHARACTER
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Character</strong> button.</p>
*/
/**
* @property CLEAR
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Clear</strong> button.</p>
*/
/**
* @property CLEARSELECTION
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Clear Selection</strong> button.</p>
*/
/**
* @property CLOCK
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Clock</strong> button.</p>
*/
/**
* @property CLOSEDCAPTION
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Closed Caption</strong> button.</p>
*/
/**
* @property CLOSEPANE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Close Pane</strong> button.</p>
*/
* @property COMMENT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Comment</strong> button.</p>
*/
/**
* @property CONTACT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Contact</strong> button.</p>
*/
/**
* @property CONTACT2
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Contact 2</strong> button.</p>
*/
/**
* @property CONTACTINFO
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Contact Info</strong> button.</p>
*/
/**
* @property CONTACTPRESENCE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Contact Presence</strong> button.</p>
*/
/**
* @property COPY
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Copy</strong> button.</p>
*/
/**
* @property CROP
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Crop</strong> button.</p>
*/
/**
* @property CUT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Cut</strong> button.</p>
*/
/**
* @property DELETE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Delete</strong> button.</p>
*/
/**
* @property DIRECTIONS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Directions</strong> button.</p>
*/
/**
* @property DISABLEUPDATES
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Disable Updates</strong> button.</p>
*/
/**
* @property DISCONNECTDRIVE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Disconnect Drive</strong> button.</p>
*/
/**
* @property DISLIKE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Dislike</strong> button.</p>
*/
/**
* @property DOCKBOTTOM
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Dock Bottom</strong> button.</p>
*/
/**
* @property DOCKLEFT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Dock Left</strong> button.</p>
*/
/**
* @property DOCKRIGHT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Dock Right</strong> button.</p>
*/
/**
* @property DOCUMENT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Document</strong> button.</p>
*/
/**
* @property DOWNLOAD
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Download</strong> button.</p>
*/
/**
* @property EDIT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Edit</strong> button.</p>
*/
/**
* @property EMOJI
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Emoji</strong> button.</p>
*/
/**
* @property EMOJI2
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Emoji 2</strong> button.</p>
*/
/**
* @property FAVORITE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Favorite</strong> button.</p>
*/
/**
* @property FILTER
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Filter</strong> button.</p>
*/
/**
* @property FIND
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Find</strong> button.</p>
*/
/**
* @property FLAG
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Flag</strong> button.</p>
*/
/**
* @property FOLDER
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Folder</strong> button.</p>
*/
/**
* @property FONT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Font</strong> button.</p>
*/
/**
* @property FONTCOLOR
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Font Color</strong> button.</p>
*/
/**
* @property FONTDECREASE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Font Decrease</strong> button.</p>
*/
/**
* @property FONTINCREASE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Font Increase</strong> button.</p>
*/
/**
* @property FONTSIZE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Font Size</strong> button.</p>
*/
/**
* @property FORWARD
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Forward</strong> button.</p>
*/
/**
* @property FOURBARS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Four Bars</strong> button.</p>
*/
/**
* @property FULLSCREEN
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Fullscreen</strong> button.</p>
*/
/**
* @property GLOBE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Globe</strong> button.</p>
*/
/**
* @property GO
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Go</strong> button.</p>
*/
/**
* @property GOTOSTART
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Go to Start</strong> button.</p>
*/
/**
* @property GOTOTODAY
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Go to Today</strong> button.</p>
*/
/**
* @property HANGUP
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Hangup</strong> button.</p>
*/
/**
* @property HELP
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Help</strong> button.</p>
*/
/**
* @property HIDEBCC
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Hide BCC</strong> button.</p>
*/
/**
* @property HIGHLIGHT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Highlight</strong> button.</p>
*/
/**
* @property HOME
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Home</strong> button.</p>
*/
/**
* @property IMPORT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Import</strong> button.</p>
*/
/**
* @property IMPORTALL
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Import All</strong> button.</p>
*/
/**
* @property IMPORTANT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Important</strong> button.</p>
*/
/**
* @property ITALIC
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Italic</strong> button.</p>
*/
/**
* @property KEYBOARD
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Keyboard</strong> button.</p>
*/
/**
* @property LEAVECHAT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Leave Chat</strong> button.</p>
*/
/**
* @property LIBRARY
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Library</strong> button.</p>
*/
/**
* @property LIKE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Like</strong> button.</p>
*/
/**
* @property LIKEDISLIKE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Like-Dislike</strong> button.</p>
*/
/**
* @property LINK
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Link</strong> button.</p>
*/
/**
* @property LIST
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>List</strong> button.</p>
*/
/**
* @property MAIL
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Mail</strong> button.</p>
*/
/**
* @property MAILFILLED
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Mail Filled</strong> button.</p>
*/
/**
* @property MAILFORWARD
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Mail Forward</strong> button.</p>
*/
/**
* @property MAILREPLY
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Mail Reply</strong> button.</p>
*/
/**
* @property MAILREPLYALL
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Mail Reply All</strong> button.</p>
*/
/**
* @property MANAGE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Manage</strong> button.</p>
*/
/**
* @property MAP
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Map</strong> button.</p>
*/
/**
* @property MAPDRIVE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Map Drive</strong> button.</p>
*/
/**
* @property MAPPIN
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Map Pin</strong> button.</p>
*/
/**
* @property MEMO
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Memo</strong> button.</p>
*/
/**
* @property MESSAGE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Message</strong> button.</p>
*/
/**
* @property MICROPHONE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Microphone</strong> button.</p>
*/
/**
* @property MORE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>More</strong> button.</p>
*/
/**
* @property MOVETOFOLDER
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Move to Folder</strong> button.</p>
*/
/**
* @property MUSICINFO
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Music Info</strong> button.</p>
*/
/**
* @property MUTE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Mute</strong> button.</p>
*/
/**
* @property NEWFOLDER
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>New Folder</strong> button.</p>
*/
/**
* @property NEWWINDOW
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>New Window</strong> button.</p>
*/
/**
* @property NEXT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Next</strong> button.</p>
*/
/**
* @property ONEBAR
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>One Bar</strong> button.</p>
*/
/**
* @property OPENFILE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Open File</strong> button.</p>
*/
/**
* @property OPENLOCAL
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Open Local</strong> button.</p>
*/
/**
* @property OPENPANE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Open Pane</strong> button.</p>
*/
/**
* @property OPENWITH
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Open With</strong> button.</p>
*/
/**
* @property ORIENTATION
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Orientation</strong> button.</p>
*/
/**
* @property OTHERUSER
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Other User</strong> button.</p>
*/
/**
* @property OUTLINESTAR
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Outline Star</strong> button.</p>
*/
/**
* @property PAGE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Page</strong> button.</p>
*/
/**
* @property PAGE2
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Page 2</strong> button.</p>
*/
/**
* @property PASTE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Paste</strong> button.</p>
*/
/**
* @property PAUSE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Pause</strong> button.</p>
*/
/**
* @property PEOPLE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>People</strong> button.</p>
*/
/**
* @property PERMISSIONS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Permissions</strong> button.</p>
*/
/**
* @property PHONE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Phone</strong> button.</p>
*/
/**
* @property PHONEBOOK
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Phonebook</strong> button.</p>
*/
/**
* @property PICTURES
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Pictures</strong> button.</p>
*/
/**
* @property PIN
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Pin</strong> button.</p>
*/
/**
* @property PLACEHOLDER
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Placeholder</strong> button.</p>
*/
/**
* @property PLAY
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Play</strong> button.</p>
*/
/**
* @property POSTUPDATE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Post Update</strong> button.</p>
*/
/**
* @property PREVIEW
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Preview</strong> button.</p>
*/
/**
* @property PREVIEWLINK
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Preview Link</strong> button.</p>
*/
/**
* @property PREVIOUS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Previous</strong> button.</p>
*/
/**
* @property PRIORITY
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Priority</strong> button.</p>
*/
/**
* @property PROTECTEDDOCUMENT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Protected Document</strong> button.</p>
*/
/**
* @property READ
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Read</strong> button.</p>
*/
/**
* @property REDO
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Redo</strong> button.</p>
*/
/**
* @property REFRESH
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Refresh</strong> button.</p>
*/
/**
* @property REMOTE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Remote</strong> button.</p>
*/
/**
* @property REMOVE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Remove</strong> button.</p>
*/
/**
* @property RENAME
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Rename</strong> button.</p>
*/
/**
* @property REPAIR
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Repair</strong> button.</p>
*/
/**
* @property REPEATALL
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Repeat All</strong> button.</p>
*/
/**
* @property REPEATONE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Repeat One</strong> button.</p>
*/
/**
* @property REPORTHACKED
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Report Hacked</strong> button.</p>
*/
/**
* @property RESHARE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Reshare</strong> button.</p>
*/
/**
* @property ROTATE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Rotate</strong> button.</p>
*/
/**
* @property ROTATECAMERA
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Rotate Camera</strong> button.</p>
*/
/**
* @property SAVE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Save</strong> button.</p>
*/
/**
* @property SAVELOCAL
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Save Local</strong> button.</p>
*/
/**
* @property SCAN
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Scan</strong> button.</p>
*/
/**
* @property SELECTALL
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Select All</strong> button.</p>
*/
/**
* @property SEND
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Send</strong> button.</p>
*/
/**
* @property SETLOCKSCREEN
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Set Lock Screen</strong> button.</p>
*/
/**
* @property SETTILE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Set Tile</strong> button.</p>
*/
/**
* @property SETTING
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Setting</strong> button.</p>
*/
/**
* @property SHOP
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Shop</strong> button.</p>
*/
/**
* @property SHOWBCC
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Show BCC</strong> button.</p>
*/
/**
* @property SHOWRESULTS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Show Results</strong> button.</p>
*/
/**
* @property SHUFFLE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Shuffle</strong> button.</p>
*/
/**
* @property SLIDESHOW
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Slideshow</strong> button.</p>
*/
/**
* @property SOLIDSTAR
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Solid Star</strong> button.</p>
*/
/**
* @property SORT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Sort</strong> button.</p>
*/
/**
* @property STOP
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Stop</strong> button.</p>
*/
/**
* @property STOPSLIDESHOW
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Stop Slideshow</strong> button.</p>
*/
/**
* @property STREET
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Street</strong> button.</p>
*/
/**
* @property SWITCH
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Switch</strong> button.</p>
*/
/**
* @property SWITCHAPPS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Switch Apps</strong> button.</p>
*/
/**
* @property SYNC
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Sync</strong> button.</p>
*/
/**
* @property SYNCFOLDER
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Sync Folder</strong> button.</p>
*/
/**
* @property TAG
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Tag</strong> button.</p>
*/
/**
* @property TARGET
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Target</strong> button.</p>
*/
/**
* @property THREEBARS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Three Bars</strong> button.</p>
*/
/**
* @property TOUCHPOINTER
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Touch Pointer</strong> button.</p>
*/
/**
* @property TRIM
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Trim</strong> button.</p>
*/
/**
* @property TWOBARS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Two Bars</strong> button.</p>
*/
/**
* @property TWOPAGE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Two Page</strong> button.</p>
*/
/**
* @property UNDERLINE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Underline</strong> button.</p>
*/
/**
* @property UNDO
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Undo</strong> button.</p>
*/
/**
* @property UNFAVORITE
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Unfavorite</strong> button.</p>
*/
/**
* @property UNPIN
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Unpin</strong> button.</p>
*/
/**
* @property UNSYNCFOLDER
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Unsync Folder</strong> button.</p>
*/
/**
* @property UP
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Up</strong> button.</p>
*/
/**
* @property UPLOAD
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Upload</strong> button.</p>
*/
/**
* @property VIDEO
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Video</strong> button.</p>
*/
/**
* @property VIDEOCHAT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Video Chat</strong> button.</p>
*/
/**
* @property VIEW
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>View</strong> button.</p>
*/
/**
* @property VIEWALL
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>View All</strong> button.</p>
*/
/**
* @property VOLUME
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Volume</strong> button.</p>
*/
/**
* @property WEBCAM
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Webcam</strong> button.</p>
*/
/**
* @property WORLD
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>World</strong> button.</p>
*/
/**
* @property ZEROBARS
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Zero Bars</strong> button.</p>
*/
/**
* @property ZOOM
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Zoom</strong> button.</p>
*/
/**
* @property ZOOMIN
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Zoom In</strong> button.</p>
*/
/**
* @property ZOOMOUT
* @type Number
* @readonly
* <p>Use with either the {@link Titanium.UI.Windows.AppBarButton#property-icon AppBarButton.icon} or
{@link Titanium.UI.Windows.AppBarToggleButton#property-icon AppBarToggleButton.icon} properties to specify
a <strong>Zoom Out</strong> button.</p>
*/
/**
* @class Titanium.UI.Windows
* @platform windowsphone 4.1.0
* @extends Titanium.Module
* <p>Windows Phone specific UI capabilities.
All properties, methods and events in this namespace will only work on Windows or Windows Phone devices.</p>
*/
/**
* @method createAppBarButton
* <p>Creates and returns an instance of a {@link Titanium.UI.Windows.AppBarButton}.</p>
* @param {Dictionary<Titanium.UI.Windows.AppBarButton>} params
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Windows.AppBarButton}
except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Windows.AppBarButton}
*/
/**
* @method createAppBarSeparator
* <p>Creates a separator for the command bar.</p>
* @returns {Titanium.UI.Windows.AppBarSeparator}
*/
/**
* @method createAppBarToggleButton
* <p>Creates and returns an instance of a {@link Titanium.UI.Windows.AppBarToggleButton}.</p>
* @param {Dictionary<Titanium.UI.Windows.AppBarToggleButton>} params
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Windows.AppBarToggleButton}
except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Windows.AppBarToggleButton}
*/
/**
* @method createCommandBar
* <p>Creates and returns an instance of a {@link Titanium.UI.Windows.CommandBar}.</p>
* @param {Dictionary<Titanium.UI.Windows.CommandBar>} params
<p>Properties to set on a new object, including any defined by {@link Titanium.UI.Windows.CommandBar}
except those marked not-creation or read-only.</p>
* @returns {Titanium.UI.Windows.CommandBar}
*/
/**
* @class Titanium.UI.ListView
* @platform windowsphone 4.1.0
* @pseudo
* @extends
*
*/
/**
* @method scrollToItem
*
*/
/**
* @method appendSection
*
*/
/**
* @method deleteSectionAt
*
*/
/**
* @method insertSectionAt
*
*/
/**
* @method replaceSectionAt
*
*/
/**
* @method getTemplates
*
*/
/**
* @method setTemplates
*
*/
/**
* @method getSections
*
*/
/**
* @method setSections
*
*/
* @method getFooterTitle
*
*/
* @method setFooterTitle
*
*/
* @method getFooterView
*
*/
* @method setFooterView
*
*/
* @method getHeaderTitle
*
*/
* @method setHeaderTitle
*
*/
* @method getHeaderView
*
*/
* @method setHeaderView
*
*/
/**
* @method getSearchView
*
*/
/**
* @method setSearchView
*
*/
/**
* @method getSearchText
*
*/
/**
* @method setSearchText
*
*/
/**
* @method getCaseInsensitiveSearch
*
*/
/**
* @method setCaseInsensitiveSearch
*
*/
/**
* @method getSectionCount
*
*/
/**
* @method getDefaultItemTemplate
*
*/
/**
* @method setDefaultItemTemplate
*
*/
/**
* @property sections
* @type String
*
*/
* @property footerTitle
* @type String
*
*/
* @property headerTitle
* @type String
*
*/
/**
* @property searchText
* @type String
*
*/
* @property footerView
* @type String
*
*/
* @property headerView
* @type String
*
*/
/**
* @property searchView
* @type String
*
*/
/**
* @property caseInsensitiveSearch
* @type String
*
*/
/**
* @property sectionCount
* @type String
*
*/
/**
* @property defaultItemTemplate
* @type String
*
*/